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

Re: RFT: Request for a trick :O)



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.



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