Every time I got the following output
0000000 012
0000001
But 012 is octal value for new line character .
Even though there is no apperent new line character in test file
the output of command showed 012.
Will anybody please explain the reason for the output ?
I believe that a file begins with a newline char or some other unseen chars.
I had trouble in a script one time trying to test for 0 bytes because of bogus chars in the file even though it shows 0 bytes from an "ls filename" output.
From the man page for echo, I found the following...
DESCRIPTION
The echo utility writes its arguments, separated by BLANKs
and terminated by a NEWLINE, to the standard output. If
there are no arguments, only the NEWLINE character will be
written.
So this explains why you always get a newline.
Also, in that man page, you'll see that some echos ( shell dependant ) allow for a flag to be passed to eliminate the adding of a NEWLINE to the end of the character.