If I execute exiftool -exif:Make -exif:Model -exif:FocalLength -exif:ExposureTime -exif:ISO -exif:LightSource -exif:LensModel -common_args -s3 k-20181224-170120-000_tps.jpg I#ll get:
SONY
ILCE-9
30.0 mm
1/640
250
Daylight
15-30mm F2.8 SSM
Any way to have it print
"SONY"
"ILCE-9"
"30.0 mm"
"1/640"
"250"
"Daylight"
"15-30mm F2.8 SSM"
I could not find any option or something like that to add '"'.
You can use the -api Filter option. On Windows CMD, you would add -api "filter=s/^|$/\"/g" or -api "filter=s/^|$/"""/g" as the double quote needs to be escaped. On linux/Mac, I think it would be -api 'filter=s/^|$/"/g'.
Yes, that works, but it does not help to push output to single bash variables to print them as needed.
What I'd like to have is
exiftool \
-exif:Make \
-exif:Model \
-exif:FocalLength \
-exif:ExposureTime \
-exif:ISO \
-exif:LightSource \
-exif:LensModel \
-common_args -s3 k-20181224-170120-000_tps.jpg
this gives:
SONY
ILCE-9
30.0 mm
1/640
250
Daylight
15-30mm F2.8 SSM
Now any idea how to have that formated:
SONY ILCE-9 • 30.0mm • 1/640s • 250iso • Daylight
Lens: 15-30mm F2.8 SSM
Any hint where I could start would be nice!
Take a look at the -p option (https://exiftool.org/exiftool_pod.html#p-FMTFILE-or-STR--printFormat).
exiftool -p "$exif:Make $exif:Model • $exif:FocalLength • $exif:ExposureTime • $exif:ISO • $exif:LightSource$/Lens: $exif:LensModel" k-20181224-170120-000_tps.jpg
The -Common_Args option (https://exiftool.org/exiftool_pod.html#common_args) in your command isn't needed. It doesn't do anything except in conjunction with the -execute option (https://exiftool.org/exiftool_pod.html#execute-NUM).
See FAQ #21 (https://exiftool.org/faq.html#Q21) for details on the $/ in the above command