From: frank@espresso.hampshire.edu
To: zsh-users@sunsite.dk
Subject: zsh job control
Date: Mon, 25 Feb 2002 13:55:48 -0500 (EST) [thread overview]
Message-ID: <Pine.LNX.3.96.1020225134642.30105A-100000@espresso.hampshire.edu> (raw)
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?"
next reply other threads:[~2002-02-25 18:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-02-25 18:55 frank [this message]
2002-02-25 19:41 ` Bart Schaefer
2002-02-27 5:57 ` Geoff Wing
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=Pine.LNX.3.96.1020225134642.30105A-100000@espresso.hampshire.edu \
--to=frank@espresso.hampshire.edu \
--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).