Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Is this possible with MULTIOS
- X-seq: zsh-users 10892
- From: Meino Christian Cramer <Meino.Cramer@xxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Is this possible with MULTIOS
- Date: Sun, 22 Oct 2006 16:16:34 +0200 (CEST)
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
Hi,
I have several cvs/svn-snapshots on my hd, which I update on a
regular basis.
Sometimes not all snapshots are update.
Currently my script, which does the cvs/svn updates, pipes the output
of the according cvs/svn-command through a filter to echo all lines,
which signals, that files have been uopdated/merged/modifed etc to
stdout. I have to watch the output to decide whether I want to
recompile the source.
What I want is something like:
upcnt=`<update-cmd> | <filter> | wc -l`
if [ 0 -ne upcnt ]
then
<recompile source
else
echo "No file has been changed!"
fi
BUT!
"<filter>" should still print all lines which signal changes to files
to the terminal....
Unfortunately the "| wc -l"-part catches stdout and supress echoing
those lines that way.
"tee" seems no to work here, since it copies stdout to a _file_ and I
want to avoid writing temporary files.....it seems I need something
like two stdouts here...
Or may be I had thought for too long about this so I don't see the (for
others) obvious solution ???
Any light against my blindness ??? ;))))
Keep hacking and thank you very much for any help in advance !
Have a nice weekend!
mcc
Messages sorted by:
Reverse Date,
Date,
Thread,
Author