Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: RFT: Request for a trick :O)
- X-seq: zsh-users 9271
- From: Meino Christian Cramer <Meino.Cramer@xxxxxx>
- To: pws@xxxxxxx
- Subject: Re: RFT: Request for a trick :O)
- Date: Mon, 08 Aug 2005 18:34:33 +0200 (CEST)
- Cc: zsh-users@xxxxxxxxxx
- In-reply-to: <24701.1123516949@xxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <23359.1123497689@xxxxxxx> <20050808.174428.74748814.Meino.Cramer@xxxxxx> <24701.1123516949@xxxxxxx>
From: Peter Stephenson <pws@xxxxxxx>
Subject: Re: RFT: Request for a trick :O)
Date: Mon, 08 Aug 2005 17:02:29 +0100
Hi,
...oh sorry..I think I have caused more confusion as I had
intended...:)
The script was speculativ (and buggy)...just a thought written down
in an email.
The corrected script is:
#!/bin/zsh
function zipcmp ()
{
cmp -s <(7z x -so $1 2>/dev/null ) <(7z x -so $2 2>/dev/null )
}
if zipcmp $1 $2
then
echo "$1 and $2 are identical..."
fi
which works fine for me.
When I will struggle again about similiar things, an email will be on
the way... :O)
If you find any bug or things to improve in the above script, please
email me...I will use this script as a base for a
compare-files-and-remove-doubles-script...
Happy zshing!
Meino
> Meino Christian Cramer wrote:
> > How can I get the return code of cmp, if <( is implemented as a pipe
> > ?
>
> You may be running across a problem that someone else did recently,
> that if a program running in the shell gets a SIGPIPE the shell pretends
> it did when it's running interactively, and so aborts. This isn't
> particularly useful and we changed it on the head of the main line.
> However, I can't get it to happen at all at the moment.
>
> If that's not the problem (the shell is not aborting at the cmp), please
> say what is.
>
> pws
>
>
> **********************************************************************
> This email and any files transmitted with it are confidential and
> intended solely for the use of the individual or entity to whom they
> are addressed. If you have received this email in error please notify
> the system manager.
>
> **********************************************************************
>
Messages sorted by:
Reverse Date,
Date,
Thread,
Author