> Lastly since ^J is a newline you can generate one with echo "\n".
That does not work in bash-4.x. Firstly, by default the bash builtin 'echo' supplies a trailing newline. Secondly, backslash translation requires the option "-e". $ echo "\n" \n $ echo "\n" | od -c 0000000 \ n \n 0000003 $ What does work is either of these: $ echo '' | od -c 0000000 \n 0000001 $ echo -e -n '\n' | od -c 0000000 \n 0000001 $ --