Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/bash
- path="."
- depth="1"
- for i in $(find "${path}" -maxdepth "${depth}"); do
- case "${i}" in
- *.png )
- echo "Do something to PNG ${i}" ;;
- *.jpg )
- echo "Do something to JPG ${i}" ;;
- * )
- echo "${i} not a PNG nor a JPG" ;;
- esac
- done
Advertisement
Add Comment
Please, Sign In to add comment