기존 파일을 조금 업데이트 했다.
카톡 등 다른 사람에게 받은 사진에서 정보를 추출할 수 없다. 아쉬운대로 기록한 날을 찾아 기록했다.
date=$(eval "awk 'BEGIN{FS=\" \";}/DateTimeOriginal/{print \$4}' temp")
time=$(eval "awk 'BEGIN{FS=\" \";}/DateTimeOriginal/{print \$5}' temp")
#2018-9-29 삽입.
#파일 중, null로 date가 입력되는 파일에 파일 생성 날자로 강제로 삽입.
if [ -n $date]
then
date=$(ls $CMD -lh --full-time | awk '{print $6}')
echo "date is", $date
fi
if [ -n $time]
then
time=$(ls $CMD -lh --full-time | awk '{print $7}'| cut -d "." -f 1)
fi
#
#latitudeRef=$(eval "awk 'BEGIN{FS=\" \";}/GPSLatitudeRef/{print \$4}' temp")
latitude=$(eval "awk 'BEGIN{FS=\" \";}/GPSLatitude/{print \$4}' temp")
#longitudeRef=$(eval "awk 'BEGIN{FS=\" \";}/GPSLongitudeRef/{print \$4}' temp")
longitude=$(eval "awk 'BEGIN{FS=\" \";}/GPSLongitude/{print \$4}' temp")