In my Unix bash shell script I am trying to run my SAS program "sasprog1.sas" and then search within the Unix directory for a file "sasprog1.LOG" and then checking for an ERROR within "sasprog1.LOG" file and then open another file ("file1.txt") and then writing some messages to "file1.txt" file?
"file1.txt" and "sasprog1.LOG" may or may not currently exist in the Unix directory.
Please see why my Unix bash shell script does not run/execute my SAS program. What am I doing wrong here?
Any examples or comments will be very appriciated!
$sas <$mydir/sasprog1.sas> $plog/$filename # is this a proper way to run a SAS program and then create SAS log??
find $plog -type f -name $filename |while read file
RESULT=$(grep $search $file) # is this correct?
if [[ ! -z $RESULT ]]
echo "Error(s) in $file: $RESULT" >> $outfile
Curently my script does not even run/execute sasprog1.sas