Hey Bill,
This stuff confuses all shell scripting newbies.
Unix systems (and others) use an environment variable ($PATH) to keep track of where to look for executables when they are called by name.
A basic path might look like this:
/usr/bin:/bin:/usr/sbin:/sbin
Mine on the other hand has had several things added to it.
/opt/local/bin:/opt/local/sbin:/Users/myUserName/perl5/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin
If you want to be able to call exiftool
by name it MUST be within the path, so Unix can see it.
Here's where my copy of exiftool
is installed:
/usr/local/bin/exiftool
You can always call a Unix exe by using its full-path.
/usr/local/bin/exiftool -s ~/Downloads/test.jpg
I have a Keyboard Maestro variable called ENV_PATH set to:
/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
That lets Keyboard Maestro see everything in the given paths, and it doesn't change my system $PATH variable.
So I can call exiftool
from Keyboard Maestro without monkeying around.
exiftool -s ~/Downloads/test.jpg
Alternatively you can set the path when you call your shell script:
export PATH=/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin$PATH;
exiftool -s ~/Downloads/test.jpg
This is what I used to do before I started using Keyboard Maestro's ENV_PATH variable.
Hopefully I've clarified things a bit instead of adding to the confusion.
-Chris