home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / unix / question / 9318 < prev    next >
Encoding:
Internet Message Format  |  1992-07-22  |  1.5 KB

  1. Path: sparky!uunet!mcsun!fuug!demos!kiae!glas!demos!jhunix.hcf.jhu.edu!kuo_wy
  2. From: kuo_wy@jhunix.hcf.jhu.edu
  3. Newsgroups: comp.unix.questions
  4. Date: 18 Jul 92 01:54 MDT
  5. Subject: Removing control codes, underscores
  6. Sender: Notesfile to Usenet Gateway <notes@glas.apc.org>
  7. Message-ID: <1992Jul17.215441.2717@jhunix.hcf>
  8. Nf-ID: #N:1992Jul17.215441.2717@jhunix.hcf:1752817653:001:1033
  9. Nf-From: jhunix.hcf.jhu.edu!kuo_wy    Jul 18 01:54:00 1992
  10. Lines: 32
  11.  
  12.  
  13. Hi.  I was wondering if anyone could help me with the following problem.
  14. I'd like to be able to print a man file or ftp it do a Macintosh for
  15. viewing.
  16. Suppose I man command > temp
  17. Then, lpr temp.
  18. What I receive on the printout is, e.g.:
  19. KKKKSSSSHHHH SSSSiiiilllliiiiccccoooonnnn
  20. GGGGrrrraaaapppphhhhiiiiccccssss
  21.  
  22. _K_s_h_ is a...
  23.  
  24. and so on, if I did man ksh > temp.
  25.  
  26. If I ftp the file to a Mac, transferring it in ascii mode, and
  27. view the file with Microsoft Word 4.0, I get the following:
  28. K*K*K*K*S*S*S*S*...
  29. and _*K_*s_*h...
  30.  
  31. and so forth, where * represents some unknown control character which
  32. is the same for everything.
  33.  
  34. So, my question is how do I remove the repeated characters, the underscores
  35. and the control codes?  I could always do a search and replace with
  36. Microsoft Word or pg the file and cut and paste to an MS Word document,
  37.  but as both of these solutions are rather tedious, I was wondering if
  38. anyone could write a Korn shell script for me to do the job.
  39.  
  40. Please e-mail your reply, and thanks in advance.
  41.  
  42. Wilbur
  43.  
  44.