From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3591 invoked from network); 26 Nov 2002 17:21:18 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 26 Nov 2002 17:21:18 -0000 Received: (qmail 18346 invoked by alias); 26 Nov 2002 17:20:52 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 5540 Received: (qmail 18324 invoked from network); 26 Nov 2002 17:20:48 -0000 Date: Tue, 26 Nov 2002 09:20:44 -0800 From: Danek Duvall To: zsh-users@sunsite.dk Subject: Re: why does "jobs | wc" not work? Message-ID: <20021126172044.GB15324@lorien.emufarm.org> Mail-Followup-To: Danek Duvall , zsh-users@sunsite.dk References: <20021126124814.GH1937@gmx.de> <29376.1038315921@csr.com> <20021126133333.GI1937@gmx.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20021126133333.GI1937@gmx.de> User-Agent: Mutt/1.5.1i On Tue, Nov 26, 2002 at 02:33:33PM +0100, Dominik Vogt wrote: > jobs > x; I=0; while read X; do I=$[I+1]; done < x; echo $I > > Can anyone think of a more efficient way (speed does matter here)? Assuming you have a recent enough version of zsh (4.0.x has it, but I'm not sure when it was introduced): echo $#jobstates $jobdirs and $jobtexts are also available. They're in the zsh/parameter module if you don't already have it loaded. Danek