home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.questions
- Path: sparky!uunet!mcsun!dxcern!hp-osf2!rtb
- From: rtb@hp-osf2.cern.ch (Rainer Toebbicke)
- Subject: Re: How to print a message, from within a shell script, to its own stderr
- Message-ID: <rtb.726497765@hp-osf2>
- Sender: news@dxcern.cern.ch (USENET News System)
- Organization: CERN European Lab for Particle Physics
- References: <1993Jan8.111056.15969@edf.fr>
- Date: Fri, 8 Jan 1993 12:56:05 GMT
- Lines: 14
-
-
-
- In <1993Jan8.111056.15969@edf.fr> zi@edf.fr (Zixiong WANG) writes:
-
- > How do you print a message, from within a shell script, to its own stderr.
- > (as fprintf(stderr, "Error message") in C)
-
- In sh(Bourne),sh(Posix),ksh,bash,...etc...:
- echo "Error message" 1>&2
- In Posix sh and ksh alternatively: print -u2 "Error message"
- --
- Rainer Toebbicke - rtb@dxcern.cern.ch - rtb@cernvm.bitnet
- European Laboratory for Particle Physics - CERN
- Geneva, Switzerland
-