Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Re: [tlug] stdin/stderr redirection under Solaris
- Date: Wed, 25 Aug 2004 08:13:11 -0400
- From: br@example.com
- Subject: Re: [tlug] stdin/stderr redirection under Solaris
- References: <200408250944.i7P9iGJ6026852@example.com>
- User-agent: Internet Messaging Program (IMP) 3.2.2
Quoting Shin MICHIMUKO <smitimko@example.com>: > The following command may answer to your question. > > $ man tee > > But if you are using bash on Linux, you can use this kind of trick: > > $ mkfifo fifo1 > $ mkfifo fifo2 > $ ./cmd > fifo1 2> fifo2 & cmd1 < fifo1 & cmd2 < fifo2 & Or, if you prefer to avoid fifos: test.sh: #! /bin/sh echo "standard output" >&1 echo "STANDARD ERROR" >&2 This command will do what you want, I guess (at least in bash): $ (./test.sh | tr a-z A-Z) 3>&1 1>&2 2>&3 | tr A-Z a-z The first "tr" receives stdout as input, and the second one receives stderr as input. Take care of one thing: The current state of stdout/stderr is messed up then. You may want to restore them, in case you have another pipe following, for instance: $ (((./test.sh | tr a-z A-Z) 3>&1 1>&2 2>&3 | tr A-Z a-z) 3>&1 1>&2 2>&3) br.
- Follow-Ups:
- References:
- Re: [tlug] stdin/stderr redirection under Solaris
- From: Shin MICHIMUKO
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] can't type in japanese
- Next by Date: Re: [tlug] stdin/stderr redirection under Solaris
- Previous by thread: Re: [tlug] stdin/stderr redirection under Solaris
- Next by thread: Re: [tlug] stdin/stderr redirection under Solaris
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links