Guest User

Untitled

a guest
Aug 7th, 2020
230
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.27 KB | None | 0 0
  1. #!/usr/bin/bash
  2. path="."
  3. depth="1"
  4. for i in $(find "${path}" -maxdepth "${depth}"); do
  5.     case "${i}" in
  6.     *.png )
  7.         echo "Do something to PNG ${i}" ;;
  8.     *.jpg )
  9.         echo "Do something to JPG ${i}" ;;
  10.     * )
  11.         echo "${i} not a PNG nor a JPG" ;;
  12.     esac
  13. done
  14.  
Advertisement
Add Comment
Please, Sign In to add comment