bug-textutils
[Top][All Lists]
Advanced

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

Re: maybe not important..


From: Manolis Mavrikakis
Subject: Re: maybe not important..
Date: Mon, 4 Jun 2001 04:23:27 +0300 (EEST)

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.
> 
>   address@hidden bob]$ gunzip < huh.pl.gz | cat
>   require "cgi-lib.pl";ocal/httpd/cgi-bin");
>   address@hidden 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 :))






reply via email to

[Prev in Thread] Current Thread [Next in Thread]