Hi,
I have a list of files that I want to check to see if they exist and then count how many of these files exist, I also want to do the same for the files that arent found.
I have done this by creating temp files see below but want ot do this using variables instead:
Code:
for FILE in $FILELIST
do
ls -l $OKAYDIR/$FILE >>countload.txt 2>/dev/null
done
LOADCOUNT=`cat countload.txt|wc -l`
cat countload.txt >>results.txt
echo >>results.txt
echo "$LOADCOUNT files loaded">>results.txt