Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: RFT: Request for a trick :O)



From: Michal Politowski <mpol@xxxxxxxxxxxxxxxxxxx>
Subject: Re: RFT: Request for a trick :O)
Date: Sat, 6 Aug 2005 09:50:40 +0200

> On Sat,  6 Aug 2005 06:56:38 +0200, Meino Christian Cramer wrote:
> [...]
> > 	 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???
> 
> Almost there. Read about process substitution in the documentation.
> It looks like <(command), >(command) and =(command)
> so in your case
> cmp <(7z x -so foo.7z) <(7z x -so bar.7z)
> should work.
> 
> -- 
> Michał Politowski
> Talking has been known to lead to communication if practiced carelessly.
> 

Hi Michael !

 Thanks for your reply :O)

 The following line:

     cmp <(7z x -so render/GlassBowl001.blend.7z ) <(7z x -so  render2/GlassBowl001.blend.7z )

 gaves:


    7-Zip 4.20  Copyright (c) 1999-2005 Igor Pavlov  2005-05-30
    p7zip Version 4.20 (locale=C,Utf16=off,HugeFiles=on)
    
    Processing archive: render/GlassBowl001.blend.7z
    
    
    7-Zip 4.20  Copyright (c) 1999-2005 Igor Pavlov  2005-05-30
    p7zip Version 4.20 (locale=C,Utf16=off,HugeFiles=on)
    
    Processing archive: render2/GlassBowl001.blend.7z
    cmp (GNU diffutils) 2.8.1
    Copyright (C) 2002 Free Software Foundation, Inc.
    
    This program comes with NO WARRANTY, to the extent permitted by law.
    You may redistribute copies of this program
    under the terms of the GNU General Public License.
    For more information about these matters, see the file named COPYING.
    
    Written by Torbjorn Granlund and David MacKenzie.
    mccramer@solfire:.process> 
    Extracting  GlassBowl001.blend/usr/bin/7z: line 2:  5488 Broken pipe             /usr/lib/p7zip/7z "$@"
    Extracting  GlassBowl001.blend/usr/bin/7z: line 2:  5492 Broken pipe             /usr/lib/p7zip/7z "$@"

 

 Both files exists, the command was submitted being in the correct cwd
 and the files are processable by 7z (no corruption etc...)...

 What's going wrong here ?

 Keep zshing!
 Meino



Messages sorted by: Reverse Date, Date, Thread, Author