From: Scott Schwartz <schwartz@bio.cse.psu.edu>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] unpacking plan9.9gz from unix
Date: Sun, 3 Dec 2000 18:04:52 -0500 [thread overview]
Message-ID: <20001203230452.28631.qmail@g.bio.cse.psu.edu> (raw)
In-Reply-To: Message from erik quanstrom <quanstro@clark.net> of "Sun, 03 Dec 2000 17:53:08 EST." <20001203225308.A0CBBC47C@conchobor.berzerked.org>
| apologies if this question has been asked before,
| but is there any easy way of unpacking plan9.9gz
| from linux?
Steve Kotsopoulos and Fabricio Chalub produced this perl script
(from the archives of 16 June 2000).
#!/usr/bin/perl
# unwrap gzipped Plan9 wrap(8) format packages
# usage: unwrap pkg.9gz
#
# unpack-plan9.pl, v 11062000
# (c) Fabricio Chalub, chalub@gnu.org
$pkg = $ARGV[0];
open F, "zcat $pkg |" or die "cannot open pipe: $!";
while (<F>)
{
/(.*) (.*) (.*) (.*) (.*) (.*)/;
$filename = $1;
$filename = substr ($filename, 1);
$length = $6;
read F, $buffer, $length;
print "$filename\n";
if ($length == 0)
{
mkdir $filename, 0700;
}
else
{
open O, ">$filename";
print O $buffer;
close O;
}
}
next prev parent reply other threads:[~2000-12-03 23:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <quanstro@clark.net>
2000-12-03 22:53 ` erik quanstrom
2000-12-03 23:04 ` Scott Schwartz [this message]
2000-12-04 0:19 ` William K. Josephson
2000-12-04 9:50 ` Andreas Zell
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=20001203230452.28631.qmail@g.bio.cse.psu.edu \
--to=schwartz@bio.cse.psu.edu \
--cc=9fans@cse.psu.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.
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).