ASCII and BINARY files. Why?
Fergus Henderson
fjh@cs.mu.OZ.AU
Sun Feb 2 01:04:00 GMT 1997
Francis Litterio, you wrote:
>
> Michael Paul Smith <mike@willingham.demon.co.uk> wrote:
>
> > The ASCII or BINARY thing is no big deal in practice.
>
> Then you've probably never done any of these things under UNIX:
>
> 1. Used cat to aggregate a partitioned gzip file:
>
> cat file.gz.1 file.gz.2 file.gz.3 | gunzip -c > file
That one is indeed a serious problem.
> 2. Used sed to change the names of symbols in an object file:
>
> sed 's;read;rEaD;g' < foo.o > newfoo.o
You shouldn't do this anyway! It's a hack that might happen to work,
if you're lucky, but you shouldn't complain if it breaks.
> 3. Or even just tried to see a hex or octal dump of what's
> in a file that doesn't contain text:
>
> od foo.gz
That one could be fixed without too much difficulty by changing
"od" to open the file in binary mode.
Problem "1" is a much stronger argument for always using binary
mode than problems "2" or "3".
--
Fergus Henderson <fjh@cs.mu.oz.au> | "I have always known that the pursuit
WWW: < http://www.cs.mu.oz.au/~fjh > | of excellence is a lethal habit"
PGP: finger fjh@128.250.37.3 | -- the last words of T. S. Garp.
-
For help on using this list, send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".
More information about the Cygwin
mailing list