From: Meino Christian Cramer <Meino.Cramer@gmx.de>
To: pws@csr.com
Cc: zsh-users@sunsite.dk
Subject: Re: RFT: Request for a trick :O)
Date: Mon, 08 Aug 2005 18:34:33 +0200 (CEST) [thread overview]
Message-ID: <20050808.183433.74747686.Meino.Cramer@gmx.de> (raw)
In-Reply-To: <24701.1123516949@csr.com>
From: Peter Stephenson <pws@csr.com>
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.
>
> **********************************************************************
>
prev parent reply other threads:[~2005-08-08 16:33 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-06 4:56 Meino Christian Cramer
2005-08-06 7:50 ` Michal Politowski
2005-08-06 8:35 ` Meino Christian Cramer
2005-08-08 10:04 ` Peter Stephenson
2005-08-08 10:35 ` Stephane Chazelas
2005-08-08 10:41 ` Peter Stephenson
2005-08-08 15:44 ` Meino Christian Cramer
2005-08-08 16:02 ` Peter Stephenson
2005-08-08 16:34 ` Meino Christian Cramer [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050808.183433.74747686.Meino.Cramer@gmx.de \
--to=meino.cramer@gmx.de \
--cc=pws@csr.com \
--cc=zsh-users@sunsite.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).