Re: bash skripta za razvrstavanje fotografija
Postano: 27 ožu 2012, 11:38
Regionalni Linux forum
https://www.linuxzasve.com/forum/
Kod: Označi sve
#!/bin/sh
# Goes through all jpeg files in current directory, grabs original date from each
# and sorts them into subdirectories according to the date
# Creates subdirectories corresponding to the dates as necessary.
for fil in * # Also try *.JPG # # Also try *.AVI
do
datepath="$(identify -verbose $fil | grep DateTimeOri | awk '{print $2 }' | sed s%:%/%g)"
if ! test -e "$datepath"; then
mkdir -pv "$datepath"
fi
mv -v $fil $datepath
doneNotice that the goal of the bash script is to identify similar photos (e.g. similar size, content, distribution ) and not exact duplicates.