bug-textutils
[Top][All Lists]
Advanced

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

Re: maybe not important..


From: Bob Proulx
Subject: Re: maybe not important..
Date: Sun, 3 Jun 2001 18:57:08 -0600

> 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




reply via email to

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