Date: Thu, 6 Nov 2008 11:37:07 -0800
Reply-To: "Schwarz, Barry A" <barry.a.schwarz@BOEING.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Schwarz, Barry A" <barry.a.schwarz@BOEING.COM>
Subject: Re: ls pipe command in linux giving non-existent filename
In-Reply-To: <200811061922.mA6BkIbc002005@malibu.cc.uga.edu>
Content-Type: text/plain; charset="us-ascii"
Windows has an "ls" command?
-----Original Message-----
From: Phil Spence
Sent: Thursday, November 06, 2008 11:22 AM
To: SAS-L@LISTSERV.UGA.EDU
Subject: ls pipe command in linux giving non-existent filename
This only occurs when I run this in Linux, not on Windows.
The following code is just to read the filenames from a directory;
%let directory = /home/int;
filename indata pipe "ls &directory";
data file_list;
length filename $100;
infile indata truncover; /* infile statement for file names */ input
filename $100.; /* read the file names from the directory */ run;
The resulting dataset contains the following entries:
Obs filename
1 Unknown host type i386-linux
2 interview_test_edit1.csv
3 interview_test_edit2.csv
4 interview_test_edit3.csv
5 interview_test_edit4.csv
6 interview_test_edit5.csv
Observation 1 does not exist, it is a system message. Any idea how to
suppress it. When I run the generated command from the CLI, this file
does not show up. TIA.