home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / sys / hp / 14407 < prev    next >
Encoding:
Text File  |  1992-12-29  |  1.6 KB  |  43 lines

  1. Newsgroups: comp.sys.hp
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!cbnewsi!cbnewsh!gls
  3. From: gls@cbnewsh.cb.att.com (Col. G. L. Sicherman)
  4. Subject: pr -n <file doesn't work in HP-UX 9
  5. Organization: AT&T
  6. Date: Tue, 29 Dec 1992 18:20:02 GMT
  7. Message-ID: <1992Dec29.182002.12259@cbnewsh.cb.att.com>
  8. Keywords: pr 9.0
  9. Lines: 32
  10.  
  11. This weekend I discovered that the -n option (line numbering) of pr
  12. doesn't work on standard input in HP-UX 9.0.  Try
  13.  
  14.     pr -n < /etc/motd
  15.  
  16. and see what you get!
  17.  
  18. This is going to break a lot of shell scripts all over the world.
  19. In System V clones, pr -n is the *only* simple way to get line
  20. numbers.  (System V pr is a crock anyway.  I've had to throw it
  21. out of many scripts because of what it does with tab characters.
  22. Check out Berkeley pr(1) and num(1) to see how it ought to be done.)
  23.  
  24. The quick fix is to say "-n5" instead of "-n" -- assuming that you have
  25. discovered why your script doesn't work any more.
  26.  
  27. Or you can copy /bin/pr from 7.0 or 8.0 over the 9.0 version.  But
  28. I hope this bug doesn't survive into 10.0....
  29.  
  30. -:-
  31.     A transition from a programmer's design to his code is too often
  32.     like an entrance into a large city after a distant prospect.
  33.     Remotely, we see nothing but spires of temples and turrets of
  34.     palaces, and imagine it the residence of splendour, grandeur,
  35.     and magnificence; but, when we have passed the gates, we find it
  36.     perplexed with narrow passages, disgraced with despicable
  37.     cottages, embarrassed with obstructions, and clouded with smoke.
  38.  
  39.                         --Samuel Johnson, updated
  40. -- 
  41. Col. G. L. Sicherman
  42. gls@windmill.att.COM
  43.