# You may use echo:
echo "this is line one"
"
""this is line two"
"
""this is line three"
> filename
#It does not work if you put "
" just before on the end of a line.
# Alternatively, you can use printf for better portability (I happened to have a lot of problems with echo):
printf '%s
'
"this is line one"
"this is line two"
"this is line three"
> filename
# Yet another solution might be:
text=''
text="${text}this is line one
"
text="${text}this is line two
"
text="${text}this is line three
"
printf "%b" "$text" > filename
#or
text=''
text+="this is line one
"
text+="this is line two
"
text+="this is line three
"
printf "%b" "$text" > filename