User:Kkalme
From ICO wiki
Bashi kodunetöö.
#!/bin/bash
for k in *.JPG;
do
j=`exiv2 $k | grep timestamp | awk '{ print $5 }' | tr ":" "-"`;
if [ -d $j]; then
echo "Kaust on juba olemas."
else
mkdir $j
echo "Kausta ei olnud, loon"
fi
mv $k $j;
echo "Liigutasin faili $k kausta $j";
done