No semicolon in output using diff with groupheadings (-g) on 2nd line.

Started by FrankB, January 15, 2025, 10:47:12 AM

Previous topic - Next topic

FrankB

ExifTool 13.12
Windows 11 pro

Hi Phil,
This may be intentional and for a good reason, but I dont understand it. Why is there no semicolon in front of '50.0 mm' in the first command, while it is present in the other 3?

No hurry, thanks in advance,
Frank

Note: I only noticed it while trying to parse the output for use in GUI, searching for the semicolon as separator for the tag name and the value. A 'normal human' would probably not notice it.

C:\Foto\diff_Left>exiftool -s -g1 -FocalLength -diff _IGP0002.jpg _IGP0001.jpg
======== diff < _IGP0001.jpg > _IGP0002.jpg
---- ExifIFD ----
< FocalLength                     : 18.0 mm
>                                   50.0 mm
---- Pentax ----
< FocalLength                     : 18.0 mm
>                                   50.0 mm

C:\Foto\diff_Left>exiftool -s -G1 -FocalLength -diff _IGP0002.jpg _IGP0001.jpg
======== diff < _IGP0001.jpg > _IGP0002.jpg
< [ExifIFD]       FocalLength                     : 18.0 mm
>                                                 : 50.0 mm
< [Pentax]        FocalLength                     : 18.0 mm
>                                                 : 50.0 mm


Normal usage of -g1 or -G1:

C:\Foto\diff_Left>exiftool -a -s -g1 -FocalLength _IGP0001.jpg
---- ExifIFD ----
FocalLength                     : 18.0 mm
---- Pentax ----
FocalLength                     : 18.0 mm

C:\Foto\diff_Left>exiftool -a -s -G1 -FocalLength _IGP0001.jpg
[ExifIFD]       FocalLength                     : 18.0 mm
[Pentax]        FocalLength                     : 18.0 mm

C:\Foto\diff_Left>

Phil Harvey

Hi Frank,

You mean colon, not semicolon.

Good spotting.  This will be fixed in 13.13.

I'll add the missing colons in the -diff -g output.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

FrankB

You're fast!

Quote from: Phil Harvey on January 15, 2025, 10:49:35 AMYou mean colon, not semicolon.

My knowledge of the English language is not as good as I thought! I meant a colon.

Thanks,
Frank

Edit: Yes. Please keep the colon. For me it's better when I can be sure there's a colon in the output.