Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- #del.sh
- if [[ $# -eq 0 ]]; then
- echo "Usage: del [filename | dirname]" >&2
- elif [[ $# -eq 1 ]]; then
- if [[ -d $1 ]]; then
- rm -ri $1
- elif [[ -f $1 ]];then
- rm -i $1
- elif [[ !-e $1 ]];then
- echo "File or Directory does not Exisit" >&2
- fi
- fi
Add Comment
Please, Sign In to add comment