Using echo with ksh on Linux...
Has there been some sort of change in the use of the echo command relatively recently?
About a year, maybe year and a half ago, I wrote a shellscript on a Solaris 2.6 machine, executing in a ksh, that basically takes a certain text file as input and formats it nicely to make a table on a web page.
Lot of use of the echo command, of course, and redirected output to a file.
So now I tried running the thing on my Mandrake 8.1 machine, and I get some really weird output.
I used the \n and \t escape codes to create newlines and tabs, but for some reason, on my Linux box, instead of actually doing newlines and tabs, it literally shows the characters "\t" and "\n" as text.
A friend of mine tried it on his Red Hat 7.1 box, as well as his Solaris 2.8 machine, same deal.
He later found out that using the -e option makes the echo command behave as expected.
However, when did this become a requirement? I never needed to specify that before, and was wondering why the change happened. I just did a lookup of the man page on the web (ack, I'm on my Win9x box right now) and it doesn't make mention of the need for any -e argument.
What am I missing here?
|