From owner-freebsd-questions Fri Jan 19 1:19:44 2001 Delivered-To: freebsd-questions@freebsd.org Received: from fremont.bolingbroke.com (adsl-216-102-90-210.dsl.snfc21.pacbell.net [216.102.90.210]) by hub.freebsd.org (Postfix) with ESMTP id EB0FB37B69C for ; Fri, 19 Jan 2001 01:19:26 -0800 (PST) Received: from fremont.bolingbroke.com (fremont.bolingbroke.com [216.102.90.210]) by fremont.bolingbroke.com (Switch-2.1.0/Switch-2.1.0) with ESMTP id f0J9Iks23481; Fri, 19 Jan 2001 01:18:46 -0800 (PST) Date: Fri, 19 Jan 2001 01:18:46 -0800 (PST) From: Ken Bolingbroke To: cjclark@alum.mit.edu Cc: questions@FreeBSD.ORG Subject: Re: Command to Make "Printable" Text In-Reply-To: <20010119010855.G66998@rfx-216-196-73-168.users.reflex> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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