Re: trailing blank line in a text file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>
> 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@xxxxxxxxxx
>
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
0002445


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
0000144




[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux