Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- dialog --yesno "Do You wish to delete the files in your system" 7 60 \
- sel=$?
- case $sel in
- 0) ls;dialog --inputbox "Enter the file to delete" 7 60 2>input.txt;na=`cat input.txt`;rm $na ;dialog --msgbox "The file has been deleted successfully " 7 60 ;;
- 1) dialog --msgbox "You have not entered the option " 7 60 ;;
- 255) dialog --msgbox "You have pressed the ESC key " 7 60 ;;
- esac
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement