home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.shell
- Path: sparky!uunet!munnari.oz.au!cs.mu.OZ.AU!munta.cs.mu.OZ.AU!fjh
- From: fjh@munta.cs.mu.OZ.AU (Fergus James HENDERSON)
- Subject: Re: >& redirects stderr AND stdout.
- Message-ID: <9302422.23216@mulga.cs.mu.OZ.AU>
- Sender: news@cs.mu.OZ.AU
- Organization: Computer Science, University of Melbourne, Australia
- References: <aet.727670022@munagin>
- Date: Sun, 24 Jan 1993 11:56:03 GMT
- Lines: 36
-
- aet@mullian.ee.mu.OZ.AU (bert thompson) writes:
-
- >hi!
- >
- >i would like to know if there is a way to redirect ONLY stderr
- >rather than both stderr and stdout in csh (or in sh).
-
- It's not possible in csh.
- In sh, do
- command 2>errs
-
- >one other question:
- >
- >how would i write a shell script which writes some text to the
- >stdin of a program and then hands stdin over to the user (tty).
-
- Do something like this, in sh:
-
- {
- echo "some text"
- echo "some more text"
- cat # hand stdin over to the user
- } | program
-
- You can do something roughly similar in csh, but sh is a much better
- language for writing scripts in.
-
- >many thanks and sorry if these are FAQs,
-
- Apology accepted :-)
-
- --
- Fergus Henderson fjh@munta.cs.mu.OZ.AU
- This .signature virus is a self-referential statement that is true - but
- you will only be able to consistently believe it if you copy it to your own
- .signature file!
-