trailing blank line in a text file
olga at urbantimes.net
Wed Jul 21 02:43:12 UTC 2004
> Have you used a hex editor to really see what the file contains?
> od -ha filename
> will dump the contents of the file in hex with the ascii.
> You can check the file before editing and after to really see what the
> contents are.
> Scot L. Harris
> webid at cfl.rr.com
I just ran the command you mentioned. In the file where I get an empty
line, I get the following after the last record: nl nul
Here's the end of that file:
0002420 6148 0a6d 6957 6c6c 6169 206d 6148 7272
H a m nl W i l l i a m sp H a r r
0002440 7369 6e6f 000a
i s o n nl nul
But in the file where there's no trailing blank line (the one that I
edited with mc) at the end I get nothing (here's the end of the output)
0000120 676c 0a61 6550 6574 0a72 6553 6e61 530a
l g a nl P e t e r nl S e a n nl S
0000140 6574 6576
t e v e
More information about the users