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 19:55:29 -0700 (PDT)
- From: Steve Smith <sjs@example.com>
- Subject: Re: [tlug] stdin/stderr redirection under Solaris
- References: <412C3FED.4000901@example.com> <Pine.LNX.4.50L0.0408250826570.31427-100000@example.com><412D47C1.4000902@example.com>
On Thu, 26 Aug 2004, Jean-Christian Imbeault wrote: > > Steve Smith wrote: > > > > > What shell are you trying to use? > > echo $SHELL > > should tell you. > > I'll use whatever shell makes this easiest :) And is normally installed > on Solaris. I thins I have at least access to csh, tcsh, bash, sh. > > Jc > Bourne, Korn and csh are usually on Solaris. I think you're trying to do this from the command line, so what shell you get as a login shell is determined by your login. That's what echo $SHELL will tell you. I wrote a simple test script in bourne shell. This sends the string 'std err' to stderr and 'std out' to stdout. #!/bin/sh echo std err 1>&2 echo std out and for csh/tcsh did this: ( t.sh | cat > f1) |& cat > f2 This uses cat to send stdout to f1 and stderr to f2. The first '|' sends stdout to the first cat, but does nothing with stderr. the ()'s fork another process and the '|&' appends stderr to stdout and sends that to the second cat. betty,sjs:~/ > cat f1 std out betty,sjs:~/ > cat f2 std err for bourne/korn/bash the syntax is much easier because you can redirect based on the file number: sh-2.05b$ (t.sh | cat > f1) 2>&1 | cat > f2 and again, you can see stdout is in one file and stderr is in the other. sh-2.05b$ cat f1 std out sh-2.05b$ cat f2 std err Your process would replace the 'cat > f*' above. This is what you were trying to do, right? Steve S.
- Follow-Ups:
- Re: [tlug] stdin/stderr redirection under Solaris
- From: Jean-Christian Imbeault
- Re: [tlug] stdin/stderr redirection under Solaris
- From: Jean-Christian Imbeault
- References:
- [tlug] stdin/stderr redirection under Solaris
- From: Jean-Christian Imbeault
- Re: [tlug] stdin/stderr redirection under Solaris
- From: Steve Smith
- Re: [tlug] stdin/stderr redirection under Solaris
- From: Jean-Christian Imbeault
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] stdin/stderr redirection under Solaris
- 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