~jack/misc

ref: fc18319887e274897264bb352ccd33f20c42db4b misc/photoscripts/split-jpg-by-date -rwxr-xr-x 191 bytes
fc183198Jack Kelly nix 7 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
#!/bin/sh

get_date() {
    echo `exif -t'Date and Time' $1 | grep Value | awk '{print$2}' | tr ':' '-'`
}

for f in *.jpg; do
    d=`get_date $f`
    [ -d $d ] || mkdir $d
    mv $f $d
done