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