home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / unix / question / 9467 < prev    next >
Encoding:
Text File  |  1992-07-27  |  1009 b   |  34 lines

  1. Newsgroups: comp.unix.questions
  2. Path: sparky!uunet!sequent!muncher.sequent.com!gregf
  3. From: gregf@sequent.com (Greg Fuller)
  4. Subject: Re: Removing control codes, underscores
  5. Message-ID: <1992Jul28.031523.16602@sequent.com>
  6. Sender: usenet@sequent.com (usenet )
  7. Nntp-Posting-Host: eng3.sequent.com
  8. Organization: Sequent Computer Systems, Inc.
  9. References: <1992Jul17.215441.2717@jhunix.hcf>
  10. Date: Tue, 28 Jul 92 03:15:23 GMT
  11. Lines: 21
  12.  
  13. kuo_wy@jhunix.hcf.jhu.edu writes:
  14.  
  15. > Hi.  I was wondering if anyone could help me with the following problem.
  16. > I'd like to be able to print a man file or ftp it do a Macintosh for
  17. > viewing.
  18. > Suppose I man command > temp
  19. > Then, lpr temp.
  20. > What I receive on the printout is, e.g.:
  21. > KKKKSSSSHHHH SSSSiiiilllliiiiccccoooonnnn
  22. > GGGGrrrraaaapppphhhhiiiiccccssss
  23.  
  24. [ etc. ]
  25.  
  26. > So, my question is how do I remove the repeated characters, the underscores
  27. > and the control codes?
  28.  
  29. I would recommend using sed like this: (^H is control H)
  30.  
  31. man command | sed 's/.^H//g' > temp
  32.  
  33. greg
  34.