home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.questions
- Path: sparky!uunet!gatech!usenet.ins.cwru.edu!wariat!zbig
- From: zbig@wariat.org (Zbigniew J. Tyrlik)
- Subject: Re: Removing control codes, underscores
- Message-ID: <1992Jul28.141208.27017@wariat.org>
- Followup-To: comp.unix.questions
- Reply-To: zbig@wariat.org (Zbigniew J. Tyrlik)
- Organization: Akademia Pana Kleksa, Public Access Uni* Site
- References: <1992Jul17.215441.2717@jhunix.hcf> <1992Jul28.031523.16602@sequent.com>
- Date: Tue, 28 Jul 1992 14:12:08 GMT
- Lines: 41
-
- As quoted from <1992Jul28.031523.16602@sequent.com> by gregf@sequent.com (Greg Fuller):
-
- +---------------
- > kuo_wy@jhunix.hcf.jhu.edu writes:
- >
- > > Hi. I was wondering if anyone could help me with the following problem.
- > > I'd like to be able to print a man file or ftp it do a Macintosh for
- > > viewing.
- > > Suppose I man command > temp
- > > Then, lpr temp.
- > > What I receive on the printout is, e.g.:
- > > KKKKSSSSHHHH SSSSiiiilllliiiiccccoooonnnn
- > > GGGGrrrraaaapppphhhhiiiiccccssss
- >
- > [ etc. ]
- >
- > > So, my question is how do I remove the repeated characters, the underscores
- > > and the control codes?
- >
- > I would recommend using sed like this: (^H is control H)
- >
- > man command | sed 's/.^H//g' > temp
- >
- > greg
-
-
- What about:
- man command | col -b > temp
-
- Where col -b will assume that device is incapable of backspacing,
- and will take care of all of it....
-
- _zjt
-
- --
- ********************************************************************
- Zbigniew J. Tyrlik wariat!zbig zbig@wariat.org
- IBM PC SIG Sysop - Cleveland Free-Net aa609@cleveland.freenet.edu
- Akademia Pana Kleksa Public Access UNI* Cleveland, (216)-481-9445
- E-mail, news feeds, shell accounts UnixBBS distribution point
- ********************************************************************
-