On Sun, 3 Jun 2001, Bob Proulx wrote:

> > a guy in irc had a problem with this file which he couldn't view
> > correctly.. it did seem like a dos-->unix prob at the beggining and the
> > sollution is simple (:s/^v^m/^v<enter>/g in vi ) but ..
> > cat won't show the first lines .. tail too .. and strange things happen
> > when i add text .. (cat huh.pl.1)
> > tail is the tool everybody uses for monitoring log files .. so i thought i
> > should send this over ..
> 
> Thanks for the report.  But I believe you had the answer to your
> problem already.  This is not a bug in a program but due to the choice
> of characters in your file.  The file contains carriage returns all by
> themself.  That does not fit either unix or dos conventions.  That
> will move the cursor to the left margin but will not scroll the lines
> up.  Therefore later characters overwrite earlier characters.  DOS
> uses CR-NL pairs.  UNIX uses single NL characters.  A single CR is
> commonly used to show status by continuously overwriting a status line
> with new information.
> 
> You might try to view the file with 'cat -v' which will make those
> non-printable characters visible.  Assuming GNU cat in textutils which
> supports that.
> 
>   [bob@torment bob]$ gunzip < huh.pl.gz | cat
>   require "cgi-lib.pl";ocal/httpd/cgi-bin");
>   [bob@torment bob]$ gunzip < huh.pl.gz | cat -v
>   #!/usr/local/bin/perl^M#unshift(@INC,"/usr/local/httpd/cgi-bin");^M^Mrequire 
>"cgi-lib.pl";^M^M^M
> 
> Bob
> 

True. Should have thought of cat -v . But i do wish tail had an option to
show non-printable chars .. i do use chattr for my log files (append
only) so deleting and appending do need different perms for me ..

from this story i learned something though : the paste command and i just
need to thank somebody for it :))




_______________________________________________
Bug-textutils mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-textutils

Reply via email to