Hello,
Can some one please help me? I am stuck on how to search one directory on a machine, the search against this one dir, will match what is in a static file. If a file does not match from a single dir with the static file, then a print or echo will be issued. I am not sure how to use my for statement with my while read statement. The goal is to create a menu and when the a product needs to be searched to see if the files are present, we will then press the appropirate menu number and the script below will run when chosen from a menu.
Here is what I have so far.
#!bin/ksh
SERVER=`uname -n`
FILELIST=/DJ/PUB/REGOLIST
while read -r xx
do
if [ ! -f $dir/$xx ] ;then
print "File Missing:$dir/$xx- On Machine:${SERVER}"
fi
done < ${FILELIST}
done
Can some one please help me? I am stuck on how to search one directory on a machine, the search against this one dir, will match what is in a static file. If a file does not match from a single dir with the static file, then a print or echo will be issued. I am not sure how to use my for statement with my while read statement. The goal is to create a menu and when the a product needs to be searched to see if the files are present, we will then press the appropirate menu number and the script below will run when chosen from a menu.
Here is what I have so far.
#!bin/ksh
SERVER=`uname -n`
FILELIST=/DJ/PUB/REGOLIST
while read -r xx
do
if [ ! -f $dir/$xx ] ;then
print "File Missing:$dir/$xx- On Machine:${SERVER}"
fi
done < ${FILELIST}
done