From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12723 invoked from network); 25 Feb 2002 18:56:32 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 25 Feb 2002 18:56:32 -0000 Received: (qmail 26863 invoked by alias); 25 Feb 2002 18:56:15 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 4691 Received: (qmail 26851 invoked from network); 25 Feb 2002 18:56:14 -0000 X-Authentication-Warning: espresso.hampshire.edu: frank owned process doing -bs Date: Mon, 25 Feb 2002 13:55:48 -0500 (EST) From: frank@espresso.hampshire.edu X-Sender: frank@espresso.hampshire.edu Reply-To: frank@espresso.hampshire.edu To: zsh-users@sunsite.dk Subject: zsh job control Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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?"