Advertisement
cd62131

Split Path

Dec 21st, 2013
325
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.23 KB | None | 0 0
  1. #!/bin/bash -e
  2. typeset -ag EXT=('gif' 'bmp' 'jpg' 'jpeg' 'png')
  3. for ext in ${EXT[@]}
  4. do
  5.   for file in *.${ext}
  6.   do
  7.     if [[ ! -e ${file} ]]
  8.     then
  9.       continue;
  10.     fi
  11.     ./echo.sh ${file%.${ext}} ${ext}
  12.   done
  13. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement