home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!rutgers!netnews.upenn.edu!eniac.seas.upenn.edu!chip
- From: chip@eniac.seas.upenn.edu (Charles H. Buchholtz)
- Newsgroups: comp.unix.shell
- Subject: Where does the sugar go? (was Re: Sort problem )
- Message-ID: <84902@netnews.upenn.edu>
- Date: 31 Jul 92 03:30:28 GMT
- References: <33pmg <1992Jul31.000822.13317@convex.com>
- Sender: news@netnews.upenn.edu
- Organization: University of Pennsylvania
- Lines: 22
- Nntp-Posting-Host: eniac.seas.upenn.edu
-
- tchrist@convex.COM (Tom Christiansen) writes:
- >
- >Expected output should go out to stdout. Exceptional output related
- >to diagnostics or other error messages should go out stderr.
-
- I agree, but I often wonder what to do with the output "sugar", such
- as prompts or headers, which are not well suited for filtering. It's
- nice when someone is looking at the output, but takes extra effort to
- remove when piped into a filter, eg
-
- finger | tail +2l | [...]
- ps | (read header; echo "$header"; [...])
-
- So, folks, what's the verdict? Output goes to stdout, preferably
- arranged in lines and fields for easy filtering. Error messages and
- diagnostics (abnormal stuff) goes to stderr. Where should the sugar
- go? stdout? /dev/tty? /dev/null? >&3?
-
-
- Charles H. Buchholtz Systems Programmer chip@seas.upenn.edu
- School of Engineering and Applied Science
- University of Pennsylvania
-