User:Kkalme: Difference between revisions
From ICO wiki
Jump to navigationJump to search
Created page with 'Siia tuleb minu bashi kodune töö' |
No edit summary |
||
Line 1: | Line 1: | ||
Bashi kodunetöö. | |||
<source lang="bash"> | |||
#!/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 | |||
</source> |
Revision as of 15:15, 1 June 2011
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