2011/4/4 <smi...@zenzebra.mv.com>: > Unfortunately, echon.c doesn't solve the problem either, because it > doesn't output a trailing newline. The crux of the problem is how to > output "-n" on a line by itself, followed by a newline. I don't think > it can be done symmetrically without adding another option to echo.
This has been discussed before: http://9fans.net/archive/2008/03/491 Rob Pike gave an excellent answer to your question: echo -n -n' ' Lyndon's echon.c and echo.c are another solution, as many others which have been discussed here and in the 2008 thread. I'm really impressed of how much we can talk about such a simple program as echo. -- - yiyus || JGL .