Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- FILES=$(find /home/mattia/test/ -type f -name '*.*')
- for f in $FILES
- do
- ext=${f#*.}
- echo $ext
- if [[ "$ext" != "mp4" || "$ext" != "mkv" || "$ext" != "avi" ]]; then
- rm -f $f
- echo deleted
- fi
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement