Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
`jobs' builtin does not work with pipe in scripts
- X-seq: zsh-workers 28450
- From: ZyX <zyx.vim@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: `jobs' builtin does not work with pipe in scripts
- Date: Thu, 25 Nov 2010 23:41:43 +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:mime-version:content-type:content-transfer-encoding :message-id; bh=GKw8WkRGyB3OJib2pdpBtNTaQlumtGKgNJBJL//bRoA=; b=L4fN4JtXlG4Zwx5b/icNoGkRjCsBcbdJNrO4IY+uVn/7zeq9XQxyq8y8WUfZaN0+gD X1pQS2Gl/qZTOf5tinmknqt9O4E4CssDQ5kcquIeR85fnVJeWcTvozYpGxe9UT6JmDT8 yEEt5yU/dEWQCib++IgS1LmXWPfU5IlJz6mP0=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:reply-to:to:subject:date:user-agent:mime-version:content-type :content-transfer-encoding:message-id; b=HbDU3fKQdECNoFuOVJQ/ggSXLOeqype9tjVoOLEWMilUjvWUlQYWbkSmx+NaPzNKUB StqYd4KNnwWiHtYMYSuf6/uEJFzwovLG9XT2ClJJvHiHohHYlBPQSNnWOGbLW9OiIhmi MFwcFy7iWVfN1qZbNZK77FGYyogrj0VFkZpBY=
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- Reply-to: zyx.vim@xxxxxxxxx
Compare the following two commands:
sleep 1s & sleep 1s & jobs -p | while read line ; do echo $line ; done
and
zsh -c 'sleep 1s & sleep 1s & jobs -p | while read line ; do echo $line ; done'
. First command (in interactive shell) works just fine and prints output of
`jobs'. Second command prints nothing, while `jobs -p' without pipe works just
fine (but is useless for me). How can this be fixed?
zsh-4.3.10-r2 (USE: doc, examples, gdbm, maildir, pcre, unicode), gentoo, amd64.
Attachment:
signature.asc
Description: This is a digitally signed message part.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author