I'm trying to execute the following command through a shell (on Mac OS):
exiftool -overwrite_original_in_place -usageterms<= /Users/JohnDoe/Library/Application Support/MyApp/UsageTerms.txt /Users/JohnDoe/Library/Application Support/MyApp/Image.jpg
What I'm getting is "bash: =: No such file or directory"
Both files do exist at the paths sent to exiftool.
It seems as though exiftool is ignoring everything after the "<" symbol.
For example, if I have a space after the equals sign I get the message above.
If I have no spaces after the "<=" combination I get:
bash: =/Users/JohnDoe/Library/Application Support/MyApp/UsageTerms.txt: No such file or directory
What am I doing wrong?
Thanks!
From the docs (https://exiftool.org/exiftool_pod.html#TAG-DATFILE-or--TAG-FMT)
Note that quotes are required around this argument to prevent shell redirection since it contains a < symbol.
Try
'-usageterms<=/Users/JohnDoe/Library/Application Support/MyApp/UsageTerms.txt'
Additionally, any argument that has a space in it either needs quotes or needs to escape the space
'/Users/JohnDoe/Library/Application Support/MyApp/Image.jpg'
or
/Users/JohnDoe/Library/Application\ Support/MyApp/Image.jpg
Thanks for that. I feel I'm getting closer.
Now, however, my new command is:
exiftool -overwrite_original_in_place '-UsageTerms<=/Users/JohnDoe/Library/Application\ Support/MyApp/UsageTerms.txt' /Users/JohnDoe/Library/Application\ Support/MyApp/Image.jpg
And I'm getting the error:
Error opening file /Users/JohnDoe/Library/Application\ Support/MyApp/UsageTerms.txt
Nothing to do.
Ah... never mind.
I forgot to "un" escape the spaces in the path once I single quoted.