how to echo, echo, a line return

Whilst trying to echo a line return (why use 8 lines when you can use one!!), I found the following…

    Irix 6.5.13

%echo '1\n22
1
22

    Gentoo linux (very recent one).

%echo '1\n22'
1\n22
%echo -e '1\n22'
1
22

So far so good!!!

    RHEL 3.0

echo -e '1\n22'

-e 1 n 22

    Solaris 5.8


% echo -e '1\n22'

-e 1\n22

WTF?

This entry was posted in trivial shennanigans. Bookmark the permalink.