Date: Thu, 6 Nov 2008 14:22:23 -0500
Reply-To: Phil Spence <linux70@COMCAST.NET>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Phil Spence <linux70@COMCAST.NET>
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.