echo new line to file

C++
echo -e "hello\nworld"echo $'username=user\npassword=pass' > ~/samba-credentials
Source

Also in C++: