delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2011/12/06/02:13:31

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-1.4 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,TVD_RCVD_IP
X-Spam-Check-By: sourceware.org
Date: Mon, 5 Dec 2011 23:11:21 -0800 (PST)
From: "Peter A. Castro" <doctor AT fruitbat DOT org>
To: Thomas Hafner <{^_^}@hafner.NL.EU.ORG>
cc: "cygwin AT cygwin DOT com" <cygwin AT cygwin DOT com>
Subject: Re: 1.7.9: zsh, "unexpected end of file"
In-Reply-To: <20111130204840.8840E1412D4@faun.hafner.NL.EU.ORG>
Message-ID: <alpine.LNX.2.00.1112052258320.3448@gremlin.fruitbat.org>
References: <20111130204840 DOT 8840E1412D4 AT faun DOT hafner DOT NL DOT EU DOT ORG>
User-Agent: Alpine 2.00 (LNX 1167 2008-08-23)
MIME-Version: 1.0
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

On Wed, 30 Nov 2011, Thomas Hafner wrote:

> Hello,

Greetings, Thomas,
   (sorry for the late reply)

> could zsh be repaired such that it behaves successfully like bash?
> Here goes the problem description.
>
> 1. In shell /usr/bin/zsh-4.3.12.exe:
>  gunzip < r1s.gz > r1s
>  - Expected: unpack to r1s
>  - Observed: command fails with output "gzip: stdin: unexpected end of
>    file"
> 2. However this works:
>  gunzip r1s.gz
> 3. If I repeat 1. with bash rather than zsh, it works.
>
> The file r1s.gz can be get there http://tinyurl.com/bs7kefh .

Most curious.
I can repro your symptoms.  However, the following combinations do work:

   cat r1s.gz | gunzip > r1s
   zcat r1s.gz > r1s

It seems only directly re-directing stdin fails.

Hmm...there's something rather strange about this specific .gz file of
yours.  I'll have to analyse it a little more to determine what's going
on.  On a guess, I'd say there's a control sequence in it that's tickling
the I/O handler in some interesting way.

How, exactly, (if I may ask), did you create this file?
It looks like random noise to me.

> Regards
>  Thomas Hafner

-- 
Peter A. Castro <doctor AT fruitbat DOT org> or <Peter DOT Castro AT oracle DOT com>
 	"Cats are just autistic Dogs" -- Dr. Tony Attwood

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


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