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: Sat, 28 Aug 2004 17:16:21 +0900
- From: "Stephen J. Turnbull" <stephen@example.com>
- Subject: Re: [tlug] stdin/stderr redirection under Solaris
- References: <412C3FED.4000901@example.com>
- Organization: The XEmacs Project
- User-agent: Gnus/5.1006 (Gnus v5.10.6) XEmacs/21.5 (chayote, linux)
>>>>> "Jean-Christian" == Jean-Christian Imbeault <jean-christian.imbeault@example.com> writes: Jean-Christian> Sorry since this is not a Linux only question, but Jean-Christian> I've been having a hell of a time trying to figure Jean-Christian> out how to redirect stdout and stderr separately Jean-Christian> under Solaris (in any shell). It's a shell question, not an OS question. Your best bet is to use a Bourne shell, in which case file redirection use the syntax "prog N> file" where N is the file descriptor and defaults to 1. The syntax &M duplicates file descriptor M into an "lvalue", so that "prog N>&M" sends both N and M to wherever N was at the time. Note that it is a duplication, not an identification, so that "prog 1> file 2>&1" send both stdout and stderr to file, while "prog 2>&1 1>file" sends stdout to file and stderr to stdout (this actually has semantics: stderr is now buffered, where normally it is not). I don't think any of the shells have syntax for sending different FDs to different pipes; use the "y" program for that. However, I don't see a "y" program on Debian or an old Red Hat Linux. If you need two "consoles", you could use something like prog 1> tmp1 2> tmp2 & and tail -f tmp1 tail -f tmp2 in the separate consoles. -- Institute of Policy and Planning Sciences http://turnbull.sk.tsukuba.ac.jp University of Tsukuba Tennodai 1-1-1 Tsukuba 305-8573 JAPAN Ask not how you can "do" free software business; ask what your business can "do for" free software.
- Follow-Ups:
- Re: [tlug] stdin/stderr redirection under Solaris
- From: Jean-Christian Imbeault
- References:
- [tlug] stdin/stderr redirection under Solaris
- From: Jean-Christian Imbeault
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] funny error msg
- Next by Date: Re: [tlug] Sub: best thing on the internet
- 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