home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / unix / shell / 3223 < prev    next >
Encoding:
Internet Message Format  |  1992-07-30  |  1.4 KB

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