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

RFT: Request for a trick :O)


 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:




 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

 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



 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

 Keep zshing!


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