home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / lang / perl / 7475 < prev    next >
Encoding:
Text File  |  1992-12-16  |  1.3 KB  |  35 lines

  1. Newsgroups: comp.lang.perl
  2. Path: sparky!uunet!munnari.oz.au!metro!bnd2.bnd.oz.au!johnw
  3. From: johnw@bnd2.bnd.oz.au (John Warburton)
  4. Subject: Re: programming challenge
  5. Message-ID: <1992Dec17.030134.29161@bnd2.bnd.oz.au>
  6. Organization: B&D Doors, Sydney, NSW, Australia
  7. References: <1992Dec16.043128.7616@bby.com.au>
  8. Date: Thu, 17 Dec 1992 03:01:34 GMT
  9. Lines: 24
  10.  
  11. From article <1992Dec16.043128.7616@bby.com.au>, by gnb@baby.bby.com.au (Gregory N. Bond):
  12. > If you are editing man pages, they probably contain things like
  13. > E^HE to make things bold, and _^HE (or E^H_, depending on your
  14. > nroff) to underline them.  Rather than stripping the ^Hs then
  15. > compressing the repeats, what about doing both at once:
  16. >     perl -pi.bak -e 's/(.)\cH$1/$1/g;s/_\cH(.)/$1/g;' {files}
  17. I did this for a while & was reading the man page for col.
  18. now the above is col -b     :-( had I been wasting some time typing that out!
  19.  
  20. > Greg.
  21. John
  22.  
  23. > --
  24. > Gregory Bond <gnb@bby.com.au> Burdett Buckeridge & Young Ltd Melbourne Australia
  25. >       If I hear "Jingle Bell Rock" one more time, I will _scream_!
  26. would that be the Abba or the Chipmunks version?
  27. -- 
  28. John Warburton                Internet:    johnw@bnd2.bnd.oz.au
  29. Systems Administrator            Phone:       +61 2 771 5566
  30. B & D Australia                Fax:         +61 2 771 6385
  31.           Living on ice-cream and chocolate kisses...
  32.