delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1997/03/22/19:46:09

From: jqb AT netcom DOT com (Jim Balter)
Subject: Re: gunzip question
22 Mar 1997 19:46:09 -0800 :
Sender: daemon AT cygnus DOT com
Approved: cygnus DOT gnu-win32 AT cygnus DOT com
Distribution: cygnus
Message-ID: <33348823.67FF.cygnus.gnu-win32@netcom.com>
References: <Pine DOT LNX DOT 3 DOT 91 DOT 970322062505 DOT 15981A-100000 AT spartan DOT pei DOT edu> <3 DOT 0 DOT 1 DOT 32 DOT 19970322155045 DOT 006b36dc AT pop DOT netaddress DOT com>
X-Mailer: Mozilla 3.01Gold (WinNT; I)
MIME-Version: 1.0
Original-To: Lord Vorp <lordvorp AT usa DOT net>
Original-CC: Sheik <sheikyy AT spartan DOT pei DOT edu>, gnu-win32 AT cygnus DOT com
Original-Sender: owner-gnu-win32 AT cygnus DOT com

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 AT cygnus DOT com" with one line of text: "help".

- Raw text -


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