-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexif.sh
34 lines (33 loc) · 1.12 KB
/
exif.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/usr/bin/bash
#------------------------------------------------------------------------------#
# Programmed By Liz #
#------------------------------------------------------------------------------#
# select exif data
#
# 2024-02-08
# rewrote program
# selecting individual tag gives a lot of data
# best to show all tags, default, then select from the list
# added [no data]
#-------------------------------------------------------------------------------
while IFS="|" read tag val # scan exif data
do
tag="$(echo $tag)" # trailing remove whitespace
if [[ "$tag" == "Manufacturer" ]] # select tags
then
mfg="$val"
elif [[ "$tag" == "Model" ]]
then
cam="$val"
elif [[ "$tag" == "Date and Time (Origi" ]]
then
dte="$val"
fi
done <<< $(exif "$1" 2> /dev/null)
if [[ $cam != "" ]] # no data detect
then
printf "%s|%s|%s" "$mfg" "$cam" "$dte"
else
printf "[no data]\n"
fi
#-------------------------------------------------------------------------------