zsh-users
 help / color / mirror / code / Atom feed
From: Hisham Muhammad <hisham@apple2.com>
To: Andy Spiegl <zsh.Andy@spiegl.de>, ZSH User List <zsh-users@sunsite.dk>
Subject: Re: how to pipe to stdout and stderr
Date: Thu, 18 Dec 2003 00:17:44 -0200	[thread overview]
Message-ID: <200312180017.44608.hisham@apple2.com> (raw)
In-Reply-To: <20031218020123.GA7059@spiegl.de>

On Thursday 18 December 2003 00:01, Andy Spiegl wrote:
> > <ibraheem@umarumohammed:~/try> ls foo bar > stdout 2> stderr
>
> Thanks, but I don't want to redirect to 2 files, but pipe to 2 programs.

Use mkfifo, maybe?

hisham@aria ~/test] mkfifo err
hisham@aria ~/test] mkfifo out

hisham@aria ~/test] cat out | tac > out.txt &
hisham@aria ~/test] cat err | tr '[:lower:]' '[:upper:]' > err.txt &
hisham@aria ~/test] ls * zzz > out 2> err

hisham@aria ~/test]cat err.txt
LS: ZZZ: NO SUCH FILE OR DIRECTORY

hisham@aria ~/test] ls -1
err
err.txt
out
out.txt

hisham@aria ~/test] cat out.txt
out.txt
out
err.txt
err

-- 
Hisham Muhammad
"...and this is the first step."


  reply	other threads:[~2003-12-18  2:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-18  0:12 Andy Spiegl
2003-12-18  1:44 ` Ibraheem Umaru-Mohammed
2003-12-18  2:01   ` Andy Spiegl
2003-12-18  2:17     ` Hisham Muhammad [this message]
2003-12-18  9:59     ` Ibraheem Umaru-Mohammed
2003-12-18  2:13 ` Dan Nelson
2003-12-18 10:17   ` Andy Spiegl

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=200312180017.44608.hisham@apple2.com \
    --to=hisham@apple2.com \
    --cc=zsh-users@sunsite.dk \
    --cc=zsh.Andy@spiegl.de \
    /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).