This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: gunzip question


Lord Vorp wrote:
> 
> At 12:19 PM 3/22/97 -0800, Jim Balter wrote:
> >Sheik wrote:
> >>
> >> On Fri, 21 Mar 1997, Jim Balter wrote:
> >>
> >> > Trey Jackson wrote:
> >> > >
> >> > > e.g. This is what I encounter:
> >> > >
> >> > >    C:\cygnus\H-i386-cygwin32\bin>gunzip resume.txt.gz
> >> > >    GUNZIP.EXE: resume.txt.gz already has .gz suffix -- unchanged
> >> >
> >> > Subtle.  What command processor are you using?  For some reason it is
> >> > passing the command name as "GUNZIP.EXE" instead of "gunzip",
> >>
> >>  I have noticed this too, whats even odder still... run this puppy in
> >> bash, and the problem goes away.
> 
> This is silly...I subscribed to this newsgroup to lurk awhile and learn,
> and I already have an answer...<i think :>
> 
> Try gunzip -d...  the -d is for decompression.  Gunzip is actually Gzip
> renamed... gzip defaults to compression.

Since the original poster already noted that but specifically wanted
to *avoid* specifying -d, perhaps you have delurked prematurely.
As I pointed out, gunzip checks the name under which it is invoked,
but the check is case-sensitive, so if it is invoked as GUNZIP or
GUNZIP.EXE (or your "Gunzip"), as opposed to gunzip (or even gunzip.exe;
it only checks for "gun..."), it won't turn on -d.  bash passes the
command name as entered, so gunzip works properly, but some command
processors convert the name to upper case, thus causing the name
comparison to fail.  So, to achieve the original objective of avoiding
-d, run gunzip from bash or NT 4.0 cmd or some other command processor
without this quirk, or modify gzip.c to do a case-insensitive comparison
(and, while you are at it, modify the ifdef in tailor.h so that gzip
sets binary mode on stdin/stdout under __CYGWIN32__).

--
<J Q B>
-
For help on using this list, send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]