The UNIX and Linux Forums  


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




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #4 (permalink)  
Old 06-05-2008
nua7 nua7 is offline
Registered User
  
 

Join Date: Mar 2008
Location: /bin/sh
Posts: 353
This pseudo code may put you on right lines...

Code:
file_names=`find . -name "*.*" -size 0c`
for i in $file_names
do
print "Do you want to delete the file?"
read input
if ans='y' or 'Y'
rm -f $i
else 
#do nothing
echo "File not deleted"
fi
done