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

Re: RFT: Request for a trick :O)



On Mon, Aug 08, 2005 at 11:04:14AM +0100, Peter Stephenson wrote:
> Meino Christian Cramer wrote:
> >  The following line:
> > 
> >      cmp <(7z x -so render/GlassBowl001.blend.7z ) <(7z x -so  render2/Glas=
> > sBowl001.blend.7z )
> > 
> >  gaves:
> >     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 "$@"
> 
> Not sure this is the error, but: it's quite likely cmp needs to be able
> to seek backwards. <(...) is often implemented using a pipe on which you
> can't do that.  (Results may vary, so you can't assume it will always
> work from the behaviour on one system.)
[...]

I think it's rather because cmp stops reading at the first
difference -> so exit -> so close the pipes -> so the feeders
get a SIGPIPE.

That's normal and expected, you'd get the same with:

7z ... | cmp - other-file

-- 
Stephane



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