how to echo to a file in separate line code example Example: echo new line to file echo $'username=user\npassword=pass' > ~/samba-credentials