echo $'username=user
password=pass' > ~/samba-credentials
echo -e "Line 1
Line 2"
touch sample.txt
echo "this is line one" > sample.txt #adds this as first line
echo "this is line two" >> sample.txt #appends the line to sample.txt
#if you do echo "this will remain alone" > sample.txt
# it will rewrite the sample.txt file with the string passed above
echo -en 'first line
second line
third line
' > file