1

$(tail) into variable removing \n

view story
linux-howto

http://unix.stackexchange.com – I am doing the following: x="Hello to the world of tomorrow\n <pre>"; x="${x}$(tail -n 50 log/logfile.log)" x="${x}</pre>"; echo -e $x | ./perlscript The perl script #!perl # perlscript open(MAIL, "sendmail -t") print MAIL "EMAIL HEADERS\n\n" print MAIL <STDIN> close(MAIL); When I receive the email, the log file dosent have any \n inside the <pre> tag. The Hello to the world of tomorrow works fine and the \n is represented. How to I get tail not to remove any \n or is it something further down/up the chain? Thanks (HowTos)