zsh-users
 help / color / mirror / code / Atom feed
From: Szekeres Istvan <szekeres@fornax.hu>
To: zsh-users@math.gatech.edu
Cc: Helmut Jarausch <jarausch@igpm.rwth-aachen.de>
Subject: Re: How to gunzip a binary on the fly
Date: Fri, 27 Dec 1996 20:09:53 +0100 (CET)	[thread overview]
Message-ID: <Pine.SCO.3.95.961227195143.23168C-100000@develop.FORNAX.HU> (raw)
In-Reply-To: <jarausch-961227160137.A0117741@numa1>


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.
> 
> 
> 
> 
> 




  parent reply	other threads:[~1996-12-27 16:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-12-27 15:01 Helmut Jarausch
1996-12-27 15:52 ` Marc Baudoin
1996-12-27 19:09 ` Szekeres Istvan [this message]
1996-12-27 20:03   ` Zoltan Hidvegi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.SCO.3.95.961227195143.23168C-100000@develop.FORNAX.HU \
    --to=szekeres@fornax.hu \
    --cc=jarausch@igpm.rwth-aachen.de \
    --cc=zsh-users@math.gatech.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).