On 20:22 03 Sep 2003, Lorenzo Prince <[EMAIL PROTECTED]> wrote:
| Try something like
| printf "first line\nsecond line\n"
| 
| According to the manual for the echo command,
| echo -e first line\nsecond line
| 
| should do the same thing, but it doesn't work on my system for some strange reason.  
The output of that command shows
| 
| first linensecond line

That's because you forgot to quote it. In the shell, \ is a single char quote,
so it is as if you'd written:

        echo -e first line'n'second line

which quotes the "n" character (unnecessary but permitted).

Try this:

        echo -e 'first line\nsecond line'

so that the \ is not treated as a shell punctuation character.

Myself, if I want it one one line I tend just to:

        echo foo; echo bar

Cheers,
-- 
Cameron Simpson <[EMAIL PROTECTED]> DoD#743
http://www.cskk.ezoshosting.com/cs/

Rearranged the networking in Telsa's room. This lets me get a single
address space for the entire house network so that machines can move
rooms without having to be reconfigured. More importantly although she
has yet to realise it leaves me with sufficient free ports downstairs
to later run cabling into the TV room and kitchen. - Alan Cox 12apr2001


-- 
redhat-list mailing list
unsubscribe mailto:[EMAIL PROTECTED]
https://www.redhat.com/mailman/listinfo/redhat-list

Reply via email to