replace an empty string for exiv2 output

23 Views Asked by At

I'm trying to collect image metadata using exiv2 tool.

I do exiv2 -q -K Xmp.photoshop.Credit image.jpg if image haven't any value for such field, I don't get anything in the console. How I can replace an empty output by some stub like 'empty' word?

1

There are 1 best solutions below

5
mrbravo On

I guess you can replace it with code below:

exiv2 -q -K Xmp.photoshop.Credit -g Xmp.photoshop.Credit=empty image.jpg