delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/01/11/00:50:50

To: djgpp AT delorie DOT com
Subject: Re: Off behaviour with 'cat -b'
Message-ID: <19970110.200811.4855.2.chambersb@juno.com>
References: <slrn5dcgqu DOT jsu DOT davep AT hagbard DOT demon DOT co DOT uk>
From: chambersb AT juno DOT com (Benjamin D Chambers)
Date: Fri, 10 Jan 1997 23:09:09 EST

I don't know specifically about cat, but I believe if it was compiled
with djgpp you cannot use the standard DOS redirection/piping.  Use the
redir program that comes with djgpp instead.

On Fri, 10 Jan 1997 13:25:52 GMT Dave Pearson <davep AT hagbard DOT demon DOT co DOT uk>
writes:
>I wonder of anyone can comment on this? There appears to be an odd bug
>with the version of cat in the DJGPP textutils distribution concerning
>the use of the '-b' switch.
>
>Try this:
>
>----------------------------------------------------------------------
>C:\>cat --version
>cat - GNU textutils-1.19
>
>C:\>cat > foo
>This is line 1
>
>This is line 2
>
>This is line 3
>^Z
>
>C:\>cat -b foo
>     1  this is line 1
>
>     2  this is line 2
>
>     3  this is line 3
>
>C:\>cat -b foo | cat
>     1  this is line 1
>     2
>     3  this is line 2
>     4  
>     5  this is line 3
>----------------------------------------------------------------------
>
>It looks as if the -b is ignored when you redirect or pipe the output.
>Testing this on my Linux box:
>
>----------------------------------------------------------------------
>davep:~$cat --version
>GNU textutils 1.9
>davep:~$cat > foo
>this is line 1
>
>this is line 2
>
>this is line 3
>davep:~$cat -b foo
>     1	this is line 1
>
>     2	this is line 2
>
>     3	this is line 3
>davep:~$cat -b foo | cat
>     1	this is line 1
>
>     2	this is line 2
>
>     3	this is line 3
>davep:~$
>----------------------------------------------------------------------
>
>As you can see, on my Linux box, it does what you'd expect it to do.
>However, I currently have an older version of textutils on there so
>perhaps that has something to do with it?
>
>One other thing I've noticed with cat (not tested it with anything
>else) is that if you are cating a large file and you press Ctrl-C,
>rather than breaking, it appears to go to the start of the file and
>re-starts the output again. Only when it gets to the end of the file
>do you get a "Exiting due to signal SIGINT". Is this correct
>behaviour?
>
>-- 
>Take a look in Hagbard's World: |     w3ng - The WWW Norton Guide 
>reader.
>http://www.acemake.com/hagbard  |  ng2html - The NG to HTML converter.
>Also available in the UK:       |       eg - Norton Guide reader for 
>OS/2.
>http://www.hagbard.demon.co.uk  |   dgscan - DGROUP scanner for 
>Clipper.
>
>

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019