Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!rutgers!sunybcs!ugbinns From: ugbinns@sunybcs.uucp (Leonard Binns) Newsgroups: comp.unix.wizards Subject: Re: shell stderr in popen() Message-ID: <4511@sunybcs.UUCP> Date: Thu, 6-Aug-87 17:18:37 EDT Article-I.D.: sunybcs.4511 Posted: Thu Aug 6 17:18:37 1987 Date-Received: Sat, 8-Aug-87 12:34:03 EDT Sender: nobody@sunybcs.UUCP Reply-To: ugbinns@marvin.UUCP (Leonard Binns) Distribution: na Organization: SUNY/Buffalo Computer Science Lines: 22 Keywords: shell popen stderr redirection Summary: Redirect with >& In article <124@foobar.UUCP> tw@foobar.UUCP (Tom Walsh) writes: > > hi, sortof like the scanf() contest... Oh no! :-) > i have a need to use popen(command, "r"). if command is not > found, i would like to dispose quietly of the shell's complaint: > sh: command: not found > the stderr of the command itself can be handled ala: > popen("/usr/bin/mynewcommand -flags 2> /dev/null", "r"); > > question: > is there an easier way than: Did you ever try: popen("/usr/bin/mynewcommand -flags 2>& /dev/null", "r"); ^^^ I think that should do the trick. Len Binns ugbinns@marvin.UUCP