home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / sources / wanted / 3763 < prev    next >
Encoding:
Internet Message Format  |  1992-07-27  |  916 b 

  1. Xref: sparky comp.sources.wanted:3763 alt.sources.wanted:1285
  2. Path: sparky!uunet!darwin.sura.net!mips!sdd.hp.com!uakari.primate.wisc.edu!usenet.coe.montana.edu!ogicse!das-news.harvard.edu!cantaloupe.srv.cs.cmu.edu!crabapple.srv.cs.cmu.edu!andrew.cmu.edu!es2j+
  3. From: es2j+@andrew.cmu.edu (Edward John Sabol)
  4. Newsgroups: comp.sources.wanted,alt.sources.wanted
  5. Subject: script to center text
  6. Message-ID: <AeRB8p600WB60JlPZc@andrew.cmu.edu>
  7. Date: 27 Jul 92 20:51:01 GMT
  8. Organization: Senior, Physics, Carnegie Mellon, Pittsburgh, PA
  9. Lines: 9
  10.  
  11. Could someone post a awk, perl, or sed script which can center text. I'd
  12. like to be able to pipe a file or region into it and get out the same
  13. text only centered in 80 columns.
  14.  
  15. It shouldn't be hard to do, but I don't know awk or perl very well. I
  16. can do it in C, of course, but I want a script for ease of portability
  17. and the smaller size. Speed needn't be an issue.
  18.  
  19. Thanks.
  20.