Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
long pipelines and coprocesses
- X-seq: zsh-users 2166
- From: opk@xxxxxxxxxxxxxxx (Oliver Kiddle)
- To: Zsh Users List <zsh-users@xxxxxxxxxxxxxx>
- Subject: long pipelines and coprocesses
- Date: Thu, 18 Feb 1999 00:48:52 +0000
- Mailing-list: contact zsh-users-help@xxxxxxxxxxxxxx; run by ezmlm
In a shell script I'm writing, I've got an enormous pipe of commands and
I've used the following construct as one of the commands in the pipe:
( ( [ "$dogrep" ] && grep "$1" ) || cat - ) | \
Does anyone know of a more efficient way of doing this (i.e. without the
cat -) other than having an outer if statement and repeating the whole
pipeline of commands.
What do I have to do to get coprocesses working in zsh scripts. They
aren't the best documented feature.
I have the following test script:
-----
while read file; do
rm $file
done |&
:>testfile
ls
print -p testfile
ls
-----
It seems to work fine in ksh but in zsh it just hangs. I've tried it on
both AIX and IRIX.
Thanks
Oliver Kiddle
Messages sorted by:
Reverse Date,
Date,
Thread,
Author