for i in `find . -iname '*.jpg'` ;do exiv2 pr $i 2>/dev/null | awk '{count = 0} { if ( $1 == "Brennweite"){if ($3 > 1.0) {printf $3; printf(" "); count++}}} {if ( $1 == "Belichtungszeit") { split($3, a, "/"); if (a[2]==""){a[2] = 1} $3=sprintf("%8.5f",a[1]/a[2]); printf $3 ; printf(" "); count++}} {if ($1 == "Blende") {sub("F",""); printf $3; printf(" "); count++}} {if (count == 3) {printf("\n")}} END {if (count !=3) {printf("\n")} }' ;done > Exifs.txt
gnuplot -e "set size ratio 0.5;
set style data histogram;
set style fill solid border -1;
set boxwidth 2 absolute;
set tics out;
set tics scale 5,2;
set mxtics 5;
set mytics 2;
set grid x y;
set xlabel 'Brennweite';
set ylabel '# Pics';
set terminal png 20;
set output 'Brennweite.png' ;
set yrange [0:9999999];
set autoscale yfixmin;
set autoscale ymax;
plot 'Exifs.txt' using (\$3):(1) title '' smooth frequency with boxes;
set output 'Verschlusszeiten.png';
set size ratio 0.4;
set style data histogram;
set style fill solid border -1;
set boxwidth 0.05 absolute;
set tics out;
set tics scale 2,1;
set xtics rotate by -90;
set grid x y;
set xlabel 'Verschlusszeit';
set ylabel '# Pics';
set terminal png 10;
set xrange [0.000125:60];
set logscale x;
set xtics ('1/8000' 0.000125, '1/6000' 0.00016, '1/4000' 0.00025, '1/3000' 0.00033, '1/2000' 0.0005, '1/1500' 0.00066, '1/1000' 0.001, '1/750' 0.00133, '1/500' 0.002, '1/350' 0.00285, '1/250' 0.004, '1/200' 0.005, '1/125' 0.008, '1/90' 0.01111, '1/60' 0.01666, '1/45' 0.02222, '1/30' 0.03333, '1/20' 0.05, '1/15' 0.06666, '1/10' 0.1, '1/8' 0.125, '1/6' 0.16666, '1/4' 0.25,'1/3' 0.33333,'1/2' 0.5,'0.7' 0.7,'1' 1,'2' 2,'4' 4,'5' 5,'8' 8,'10' 10,'15' 15,'20' 20,'25' 25,'30' 30, '40' 45,'45' 45,'64' 64);
plot 'Exifs.txt' using (\$1):(1) title '' smooth frequency with boxes;
set xrange [1:64];
set size ratio 0.4;
set style data histogram;
set style fill solid border -1;
set boxwidth 0.01 absolute;
set tics out;
set tics scale 2,1;
set xtics rotate by -45;
set mxtics 1;
set mytics 2;
set grid x y;
set xlabel 'Blende';
set ylabel '# Pics';
set terminal png 10;
set output 'Blenden.png';
set xtics ('1' 1,'1,1' 1.1, '1,2' 1.2,'1,3' 1.3,'1,4' 1.4,'1,6' 1.6,'1,7' 1.7,'1,8' 1.8,'2' 2,'2,2' 2.2,'2,5' 2.5,'2,8' 2.8,'3,2' 3.2,'3,5' 3.5,'4' 4,'4,5' 4.5,'4,8' 4.8,'5' 5,'5,6' 5.6,'6,3' 6.3,'6,7' 6.7,'7,1' 7.1,'8' 8,'9' 9,'10' 10,'11' 11,'13' 13,'14' 14,'16' 16,'18' 18,'20' 20,'22' 22,'32' 32,'45' 45,'64' 64);
set logscale x;
plot 'Exifs.txt' using (\$2):(1) title '' smooth frequency with boxes;"