zsh-users
 help / color / mirror / code / Atom feed
From: gj@sdf.lonestar.org
To: zsh-users@sunsite.dk
Subject: problem piping output of shell builtin
Date: Mon, 5 Jan 2004 19:26:15 +0000 (UTC)	[thread overview]
Message-ID: <Pine.NEB.4.58.0401051856430.2690@norge.freeshell.org> (raw)

Hi all,

I'm migrating from bash to zsh. It hasn't been so bad because I'm sort of new
to shell programming anyways ( though I did have "fun" figuring out that zsh
arrays start incrementing from 1 as opposed to bash's 0 :). I thought I'd
share the latest hiccup...

Why can't I pipe the output of 'jobs' thusly?

	% zsh --version
	zsh 4.0.7 (alpha--netbsd)
	% sleep 100
	^Z
	zsh: suspended  sleep 100
	% sleep 100
	^Z
	zsh: suspended  sleep 100
	% jobs
	[1]    suspended  pine
	[2]  - suspended  sleep 100
	[3]  + suspended  sleep 100
	% jobs | while read line; do echo $line; done
	%

I expect the output of last sequence of commands to be more or less the same
to the sequence before it, as under bash. How can I approximate the bashlike
behavior I expect under zsh?

Thanks for any insight,
Gerald.


             reply	other threads:[~2004-01-05 19:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-05 19:26 gj [this message]
2004-01-05 20:36 ` Pavol Juhas
2004-01-05 21:30   ` Vincent Stemen
2004-01-06  1:24     ` Bart Schaefer
2004-01-06  1:39     ` Pavol Juhas
2004-01-05 20:44 ` Vincent Stemen

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.NEB.4.58.0401051856430.2690@norge.freeshell.org \
    --to=gj@sdf.lonestar.org \
    --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).