zsh-users
 help / color / mirror / code / Atom feed
* zsh job control
@ 2002-02-25 18:55 frank
  2002-02-25 19:41 ` Bart Schaefer
  0 siblings, 1 reply; 3+ messages in thread
From: frank @ 2002-02-25 18:55 UTC (permalink / raw)
  To: zsh-users


Hello

I have rtfm and vast portions of the man page and not found the answer to
this... This is not a bug but may well be a wishlist item if it doesn't
exist already

What I am looking for is an integration of the control forms like while,
for, etc with job control.

For instance, to start 4 jobs decompressing with gzip, I might do

ls **/*.gz | xargs -n 1 -P 4 gunzip

but this doesn't work well when the command is more complicated

ls **/*.gz | xargs -n 1 -P 4 -iFILE zsh -c "zcat FILE | fgrep foobar" >
   results.txt

What I am hoping is that there is some sort of job control associated with
the standard zsh loops:

foreach[4] file (**/*.gz) 
do
  zcat $file | fgrep foobar
done > results.txt

or some such syntax. I recognize that I could simply background all the
processes but if I have hundreds of files, that creates hundreds of
processes- unworkable.

ideas?

---
frank@dicostanzo.com                                   Suum Cuique
"Who needs friends when you can sit alone in your room and drink?"


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2002-02-27  5:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-02-25 18:55 zsh job control frank
2002-02-25 19:41 ` Bart Schaefer
2002-02-27  5:57   ` Geoff Wing

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).