The other day I created a script using Imagemagick for efficiently get my image ready for the web. After making a fantastic espresso coffee at home I decided to add my script to my local path. This helps because it will make your script ‘global’. This means you can invoke it from any location while in your Terminal – it will run as any other command such as ping, ssh, rsync and etc..
Adding your Script to your Local Path in macOS is easier than I expected. Just copy your script to this path in your macOS:
I know you can also do a link to it, but I decided to copy it for now and test.
Now, I can call my script from any directory in my Terminal. For example, when I have a folder full of images waiting to be optimized for the web, I just do:
cd /images_for_the_web and then type myimagescript
Hope this brief add your Script to your Local Path macOS tutorial helps. You can always contact me if you have any questions. Also, check out my coffee mugs and T-Shirt designs below. I made them myself. Thanks!