From owner-freebsd-questions Fri Jan 19 13:54:29 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 B203737B401 for ; Fri, 19 Jan 2001 13:54:10 -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 13:52:20 -0800 Received: (from cjc@localhost) by rfx-216-196-73-168.users.reflexcom.com (8.11.1/8.11.0) id f0JLs2O08975; Fri, 19 Jan 2001 13:54:02 -0800 (PST) (envelope-from cjc) Date: Fri, 19 Jan 2001 13:54:02 -0800 From: "Crist J. Clark" To: Dru Cc: Ken Bolingbroke , questions@FreeBSD.ORG Subject: Re: Command to Make "Printable" Text Message-ID: <20010119135402.A8945@rfx-216-196-73-168.users.reflex> Reply-To: cjclark@alum.mit.edu References: <20010119115217.B7958@rfx-216-196-73-168.users.reflex> 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 03:27:43PM -0500 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Fri, Jan 19, 2001 at 03:27:43PM -0500, Dru wrote: > > What shell are you using Crist? In the example, tcsh. TERM is xterm-color. > I just created a script called test from the tcsh shell, issued: > > col -b < test > clean > cat clean > > and she looked good. I didn't have any control characters except for the > strings in my customized prompt. I just tried again. Same problems. > On Fri, 19 Jan 2001, Crist J. Clark wrote: > > > 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 < > ? This is a test. > > ? In this line, I will type some stuff and then kill it with ctrl-D. > > ? Here I go past the end. > > ? This line is pristine. > > ? EOF > > This is a test. > > In this line, I will type some stuff and then kill it with ctrl-D. > > Here I go past the end. > > This line is pristine. > > [502:~] exit > > > > Script done, output file is typescript > > > > Use the '-v' switch on cat(1) to see all of my keystrokes and other > > goodies, > > > > [531:~] cat -v typescript > > Script started on Fri Jan 19 11:35:59 2001 > > [501:~] cat < > ? This is not^H^[[K^H^[[K^H^[[Ka test.^M^M > > ? In this line, I will type an extra^H^H^H^H^H^H^H^H^[[Pn^H^[[P ^H^[[Pe^Hxtra^[[K^H^H^H^Htra^[[K^H^H^Hra^[[K^H^Ha^[[K^H^[[Ksome stuff and then kill it with ctrl-D.^M^M > > ? Here I go past the end and kill with ctrl-K.^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^[[K.^M^M > > ? This line is pristine.^M^M > > ? EOD^H^[[KF^M^M > > This is a test.^M > > In this line, I will type some stuff and then kill it with ctrl-D.^M > > Here I go past the end.^M > > This line is pristine.^M > > [502:~] ^D^H^Hexit^M > > > > Script done on Fri Jan 19 11:37:43 2001 > > > > Now use col(1) followed by a look at the output with cat(1), > > > > [532:~] col < typescript > typescript1 > > [533:~] cat typescript1 > > Script started on Fri Jan 19 11:35:59 2001 > > [501:~] cat < > ? This is noKa test. > > ? In this line, I will type PPPxtraKsome stuff and then kill it with ctrl-D. > > ? Here I go past the endK.nd kill with ctrl-K. > > ? This line is pristine. > > ? EOKF > > This is a test. > > In this line, I will type some stuff and then kill it with ctrl-D. > > Here I go past the end. > > This line is pristine. > > [502:~] exit > > > > Script done on Fri Jan 19 11:37:43 2001 > > > > We see that col(1) did not clean things properly. The '-b' switch does > > the same thing. -- 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