linux move text to the next line if hit the specific character code example Example: echo new line to file echo $'username=user\npassword=pass' > ~/samba-credentials