Zsh Mailing List Archive
Messages sorted by:
Re: `jobs' builtin does not work with pipe in scripts
- X-seq: zsh-workers 28452
- From: ZyX <zyx.vim@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: `jobs' builtin does not work with pipe in scripts
- Date: Fri, 26 Nov 2010 00:40:33 +0300
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:reply-to:to:subject:date :user-agent:references:in-reply-to:mime-version:content-type :content-transfer-encoding:message-id; bh=+eMAKoNRxxtJbdLU00b1y0rvHWKviIC7ThghiFpoYys=; b=TJaas5vkpJxuLjZN/xgfCIOQI9/sFQUNAhtM0AMnhYAOceYOKdLrmqjT1iownaqtpO X9++dkCAsxHNQ+q9ey4k9KqQd3kRPPR1uAcNkAv3xYBHCYeFViH8aYcLEmIx/PQDmPPC M9qB3y2sjzyIEJK710GmsKA9SUyzeq3AY4D0w=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:reply-to:to:subject:date:user-agent:references:in-reply-to :mime-version:content-type:content-transfer-encoding:message-id; b=x4/gKMdRRiEnXaj09fwqXyLq774SvxTVz7c8GMM0wIG2pEM+73Pe5S6AuEfMgdjiWQ a0KWfnpmS1V3TZyAFAa8hk6oVs+K5xRGqOsABYGjUjgRnL894eg9zcvJS7UAfzAD0qQQ SHjQfVveoSCKfJIZVBRmYxUhtXyL7vqi34yj8=
- In-reply-to: <1290718646-sup-9791@nixos>
- List-help: <mailto:email@example.com>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:firstname.lastname@example.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <201011252341.44512@-zyx> <1290718646-sup-9791@nixos>
- Reply-to: zyx.vim@xxxxxxxxx
Reply to message ÂRe: `jobs' builtin does not work with pipe in scriptsÂ,
sent 23:57:53 26 November 2010, Friday
by Marc Weber:
> Excerpts from ZyX's message of Thu Nov 25 21:41:43 +0100 2010:
> > zsh -c 'sleep 1s & sleep 1s & jobs -p | while read line ; do echo
> > $line ; done'
> What about zsh -i -c ' ... ?
It works, but I was trying to use `jobs -p | ...' in a script that is intended
to be used as library, so I can't put something like `#!/bin/zsh -i' there. For
now it was replaced with `ps --ppid $$', though I do not like invoking
additional process in a signal handler.
Description: This is a digitally signed message part.
Messages sorted by: