Subject: Re: gunzip question
From: [email-masked] (Jim Balter)

22 Mar 1997 19:46:09 -0800
Sender: [email-masked]
Approved: [email-masked]
Distribution: cygnus
Message-ID: <[email-masked]>
References: <[email-masked]> <[email-masked]>
X-Mailer: Mozilla 3.01Gold (WinNT; I)
MIME-Version: 1.0
Original-To: Lord Vorp <[email-masked]>
Original-CC: Sheik <[email-masked]>, [email-masked]
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Original-Sender: [email-masked]

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
"[email-masked]" with one line of text: "help".