The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




Thread: File existance
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 07-17-2008
coolkid coolkid is offline
Registered User
  
 

Join Date: Jan 2008
Posts: 69
File existance

Guys
Iam trying to do a script to find what files are missing in particular directory.I came up with this

for i in file6 file7 file8 file9 file10 file11 file12; do
if [ ! -f $i ]; then
echo " $file not in /mnt/Server/base/i386/ "
else
echo " $file [O.K]... "
fi
done

Iam trying to print the exact file name which is missing but not able to get it.I know iam missing a little thing..any suggestions.