This is the mail archive of the
cygwin@sourceware.cygnus.com
mailing list for the Cygwin project.
Re: ASCII and BINARY files. Why?
- To: franl at world dot std dot com (Francis Litterio)
- Subject: Re: ASCII and BINARY files. Why?
- From: Fergus Henderson <fjh at cs dot mu dot OZ dot AU>
- Date: Sun, 2 Feb 1997 17:27:37 +1100 (EST)
- Cc: gnu-win32 at cygnus dot com (gnu-win32)
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".