Hello
I want to add text to the end of the existing text of the -Description tag.
I found one solution:
exiftool -use MWG '-Description<$Description text string' filepath
If I want to do this with (bash) variables (which may contain whitespace characters) i found this solution:
iitagstring="text string"
DescrAddCommandForExifTool="-Description<\$Description $iitagstring"
exiftool −P -m -overwrite_original -use MWG "${DescrAddCommandForExifTool}" "$filepath"
Are there any other ways to use variables ?
Thanks a lot :)
Anti
Hi Anti,
I don't see why this shouldn't work:
iitagstring="text string"
exiftool -P -m -overwrite_original -use MWG "-Description<\$Description $iitagstring" "$filepath"
- Phil
Yes Phil you are right.
It works exactly the way you wrote it (in Bash) !
I first tried single quotes instead of double quotes, but that didn't work..
Turns out that double quotes works fine in Bash !
Bash voodoo :)
Thanks !
Anti
Hi Anti,
Yes. Shell variables are interpolated within double-quoted strings but not single-quoted strings in bash.
- Phil