I'm currently thinking about upgrading my camera to an EOS R or Z6 and, as result, I'm thinking about which lenses I should get. While discussing options with Stuart, I wondered which were my favourite focal lengths for the photos that I've taken in the past. To work this out, I decided to use the wonderful exiftool and some scripting. This is the analyse.sh script:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
|
#!/bin/bash DIR="$1" if [ "$DIR" == "" ]; then echo "Usage: analyse.sh {directory}" exit fi exiftool -r -T -focallengthin35mmformat -aperture -lens -ext NEF -ext ARW $DIR > analysis.txt awk '{print $1, $2}' analysis.txt | sort | uniq -c | \ awk 'BEGIN { OFS = ", " } ; {print $2 $3, $1}' | \ sort -n > analysis.csv echo -e "\"Focal length\",count\n$(cat analysis.csv)" > analysis.csv echo "Created analysis.csv" |
There's a couple of key things going on here.… continue reading.
Posted on
26 September 2018 in Photography