Created
July 6, 2012 19:54
-
-
Save zendeavor/3062413 to your computer and use it in GitHub Desktop.
funky array test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
while read -d '' -r files; do | |
img="${files#*2012/}" | |
case "$img" in | |
*+(jpe+(g))*) | |
set -x | |
img_name="${img##*/}" | |
img_name="${img_name%.*}" | |
echo "$img" | |
jpeg_dir[$img_name]=("${img}") | |
echo "${jpeg_dir[@]:(-1)}" | |
;; | |
esac | |
done < <(find "$files_path" -type f -print0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment