#!/bin/sh # HP20040125 20050901 # # append-rot-date `( cd 139canon ; ls *.jpg )` > 139.list for h in $* do echo -n $h" " orientation=`jhead $h | grep Orientation` if [ -z "$orientation" ]; then echo -n "0 " else echo $orientation | awk '{printf "%d ",0+$4}' fi datetime=`jhead $h | grep Date/Time` isodate=`echo $datetime | awk '{printf "%s-%s-%s",substr($3,1,4),substr($3,6,2),substr($3,9,2)}'` echo -n `date +%a -d $isodate` $isodate echo $datetime | awk '{printf " %s ",$4}' echo done