Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!uunet!auspex!guy From: guy@auspex.auspex.com (Guy Harris) Newsgroups: comp.unix.questions Subject: Re: Closing only stderr in a sh(1) command. Message-ID: <3300@auspex.auspex.com> Date: 4 May 90 19:28:18 GMT References: <1605@dinl.mmc.UUCP> <1990May2.000457.9488@ecn.purdue.edu> <2711@wyse.wyse.com> Organization: Auspex Systems, Santa Clara Lines: 9 >The following should do what you want: > > ls *.o 2>/dev/null | some-util And may also do a bunch of stuff that he *doesn't* want, namely throwing out any *other* error messages that might occur (like "I/O error" - yes, I *have* had that happen, with a disk that occasionally went offline; the appearance of "I/O error" was a signal that it was time to run off and reset the disk - or "Connection timed out").