On 19 Feb 16:44, Chris Green wrote:
ENOTTRUE, echo, by default, won't do CR/LF, just LF. About the only place that a CR/LF pair is still used is in DOS format text files.
It depends how you interpret things.
It certainly *does* echo a CR/LF pair to the screen because otherwise the cursor wouldn't return to the LHS.
EWRONGAGIN ;)
To prove this:
echo -ne "test\n"
I.e. *only* echo the line feed, no carriage return. Note that your terminal still returns the cursor possition. See for example:
$ echo -ne "test\ntest2\n" test test2 $
(try it yourself if you don't believe me :)
UNIX systems have only ever bothered using the line feed character to mean both, it's up to the terminal what to do.
I do agree though that it will only write an LF to the file. :-)
My answer did what the OP wanted anyway! :-)
That's true :)