Date: Fri, 6 Jun 2003 17:03:05 +0100
Reply-To: SAS User <sasuser@GUILDENSTERN.DYNDNS.ORG>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: SAS User <sasuser@GUILDENSTERN.DYNDNS.ORG>
Subject: Re: Removing line numbers in LOG?
In-Reply-To: <200306051750.h55HoGf13318@listserv.cc.uga.edu>
Content-Type: text/plain; charset=us-ascii
on Thu, Jun 05, 2003 at 01:50:16PM -0400, Peter Larsen (phlarsen@YAHOO.COM) wrote:
> Hi-
>
> I am one of those SAS programmers who will use the import wizard to read in
> CSV/XLS/TXT files. After using the wizard, I open up the log window and
> copy the actual code that SAS just used during the import wizard. This is
> a useful trick, because it allows you to easily customize your import
> statement with the actual formats, lengths, etc. that you wouldn't normally
> be able to control just using the wizard.
>
> Unfortunately, SAS also kicks out line numbers in the log (just in front of
> the code). Although pretty obvious, in order to get the code to run you
> need to manually delete these line numbers one line at a time (yikes).
> Does anyone out there in LISTSERV land know of a way (nifty code, options,
> etc.) to suppress the creation of line numbers in the log so that I don't
> have to manually remove them? In the example below, I would have to remove
> all of the numbers by hand (143-197). Sorry about the long email.
sed -ne '/^[0-9][0-9]*/s/...........//p' < foo.log > foo.sas
This misses 'CARDS' and 'DATALINES' statements, and may include
additional autoexec lines.
--
Charming man. I wish I had a daughter so I could forbid her to marry one...
|