From owner-freebsd-questions Fri Jan 19 11:52:56 2001 Delivered-To: freebsd-questions@freebsd.org Received: from mailhost01.reflexnet.net (mailhost01.reflexnet.net [64.6.192.82]) by hub.freebsd.org (Postfix) with ESMTP id CE87637B401 for ; Fri, 19 Jan 2001 11:52:36 -0800 (PST) Received: from rfx-216-196-73-168.users.reflexcom.com ([216.196.73.168]) by mailhost01.reflexnet.net with Microsoft SMTPSVC(5.5.1877.197.19); Fri, 19 Jan 2001 11:50:40 -0800 Received: (from cjc@localhost) by rfx-216-196-73-168.users.reflexcom.com (8.11.1/8.11.0) id f0JJqHY08309; Fri, 19 Jan 2001 11:52:17 -0800 (PST) (envelope-from cjc) Date: Fri, 19 Jan 2001 11:52:17 -0800 From: "Crist J. Clark" To: Dru Cc: Ken Bolingbroke , questions@FreeBSD.ORG Subject: Re: Command to Make "Printable" Text Message-ID: <20010119115217.B7958@rfx-216-196-73-168.users.reflex> Reply-To: cjclark@alum.mit.edu References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: ; from genisis@istar.ca on Fri, Jan 19, 2001 at 07:55:37AM -0500 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Fri, Jan 19, 2001 at 07:55:37AM -0500, Dru wrote: > > > On Fri, 19 Jan 2001, Ken Bolingbroke wrote: > > And for a good explanation of why, read: > > http://www.oreillynet.com/pub/a/bsd/2000/10/11/FreeBSD_Basics.html?page=2 But it does not actually work right for this kind of thing. First, I type something in using shell editing characters as I go. But this is what I see on my screen when I am done, [530:~] script Script started, output file is typescript [501:~] cat < typescript1 [533:~] cat typescript1 Script started on Fri Jan 19 11:35:59 2001 [501:~] cat < > > > The command you're looking for is 'col'. See 'man col'. > > > > Ken > > > > On Fri, 19 Jan 2001, Crist J. Clark wrote: > > > > > My mind is going. I know I figured out how to do this in a clever way > > > once before, but it is not coming to me now. > > > > > > I have a file that was, say, generated by using script(1). There is > > > user interaction recorded and knowing users, there are things like > > > backspaces, arrow keys, tabs for auto-completetion, etc. in the > > > recorded input. How do I convert this file into one that just contains > > > the characters that show up when the file is printed to the screen? > > > > > > That is, if I do a, > > > > > > $ cat script.txt > > > This is clean output. > > > > > > It looks good, but if I were to see what is really there, it looks > > > like, > > > > > > $ cat -v script.txt > > > This is not^H^[[K^H^[[K^H^[[Kclean output.^M^M > > > > > > However, I want to create a file that just contains what "looks like" > > > the final output in the first example. If I do, > > > > > > $ cat script.txt > newscript.txt > > > > > > All of the non-printed characters go. I know there is a command that > > > will do this, 'cause I have done it, but can't remember. > > > > > > Oh, and anyone thinking of saying something about cut-n-paste... Don't > > > even. > > > -- > > > Crist J. Clark cjclark@alum.mit.edu > > > > > > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > > > with "unsubscribe freebsd-questions" in the body of the message > > > > > > > > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > > with "unsubscribe freebsd-questions" in the body of the message > > > > > > > > -- Crist J. Clark cjclark@alum.mit.edu To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message