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 -->
  #5 (permalink)  
Old 04-22-2009
abinaya abinaya is offline
Registered User
  
 

Join Date: Apr 2009
Posts: 24
Hi,

Check the below code


Code:
 
#!/bin/sh
for file in *.txt
do
        echo " \"$file\" delete(Y/N) :"
        read opt
        case $opt in
        [yY])rm "$file"
                echo "$file removed........."
        ;;
        esac
done