From: Meino Christian Cramer <Meino.Cramer@gmx.de>
To: zsh-users@sunsite.dk
Subject: RFT: Request for a trick :O)
Date: Sat, 06 Aug 2005 06:56:38 +0200 (CEST) [thread overview]
Message-ID: <20050806.065638.92586082.Meino.Cramer@gmx.de> (raw)
Hi,
I read about the magic of MULTIOS in the zshall manpage and I am
wondering whether it is possible to achieve the following without
using "the standard way" (i.e. visible temporyry files)...
In my directory there are two files:
a.7z
and
b.7z
with both the same length. Both are packed with the p7zip-packer (by
the way: The compression ratio of this tool is even better as that of
bzip2 and it is available for Mi*ft Wi*ows and Linux/UNIX!).
A md5sum shows, that both files are "different", but it seems this is
due to the packer, which (may be) include the packing date. So md5sum
returns different hash value even if the contents of the archives is
identical.
The standard way to check both archives for identity is to unpack
both into temporary files, md5sum both files, compare the hash
values and at last remove both temporary files.
In the zshall I saw constructions (if MULTIOS is set) like
sort < foo < bar
which have the same result as:
cat foo bar | sort
.
Hmmmm.....
May be something like
cmp < `7z x -so foo.7z` < `7z x -so bar.7z`
may work I thought...but it doesnt (the assumption was totally
wrong)... ( "7z x -so <file>.7z" means "unpack <file>.7z to stdout)
But...may be someone else knows a tricky way to prevent temporary
files to compare the (single file) contents of two archives in one
go???
Keep zshing!
Meino
next reply other threads:[~2005-08-06 4:55 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-06 4:56 Meino Christian Cramer [this message]
2005-08-06 7:50 ` Michal Politowski
2005-08-06 8:35 ` Meino Christian Cramer
2005-08-08 10:04 ` Peter Stephenson
2005-08-08 10:35 ` Stephane Chazelas
2005-08-08 10:41 ` Peter Stephenson
2005-08-08 15:44 ` Meino Christian Cramer
2005-08-08 16:02 ` Peter Stephenson
2005-08-08 16:34 ` Meino Christian Cramer
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=20050806.065638.92586082.Meino.Cramer@gmx.de \
--to=meino.cramer@gmx.de \
--cc=zsh-users@sunsite.dk \
/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).