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 doesn't 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?