From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19853 invoked from network); 27 Dec 1996 16:16:10 -0000 Received: from euclid.skiles.gatech.edu (list@130.207.146.50) by coral.primenet.com.au with SMTP; 27 Dec 1996 16:16:10 -0000 Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id LAA27272; Fri, 27 Dec 1996 11:16:23 -0500 (EST) Resent-Date: Fri, 27 Dec 1996 11:06:59 -0500 (EST) Date: Fri, 27 Dec 1996 20:09:53 +0100 (CET) From: Szekeres Istvan Reply-To: Szekeres Istvan To: zsh-users@math.gatech.edu Cc: Helmut Jarausch Subject: Re: How to gunzip a binary on the fly In-Reply-To: Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Resent-Message-ID: <"8pKQy1.0.Ee6.ZG_mo"@euclid> Resent-From: zsh-users@math.gatech.edu X-Mailing-List: archive/latest/566 X-Loop: zsh-users@math.gatech.edu X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu If you mean the gzipped file is a shell script then it's pretty easy: exec_gz () { eval "$(gunzip -c $1)" } so you can do exec_gz myscript.gz In case the gzipped file is a binary (read: the file _before_ gzipping is a binary) I think there is no way to do this. The OS (at least a few unices, e.g. linux) needs the executable to be present as a file on a filesystem. Pista ps: Maybe the shell creates a temp file or pipe for the output of gunzip, I can't check it right now. > Hello, > does anybody know how to gunzip a gzipped binary file just for executing it. > Is it possible to do so without an intermediate file - just piping it > into the shell. > > Assume there is a file doit.gz > > I would like a function exec_gz and invoke doit by exec_gz doit.gz > without > > gunzip -c doit.gz >/tmp/doit > /tmp/doit > rm /tmp/doit > > > Thanks for any hints, > > a Happy New Year to all of you, > > Helmut Jarausch. > > > > >