Execute Shell Script Help

Hi, I'm using the following Terminal command line in the Execute Shell Script action…

mogrify -modulate 100,140 filepath

This works fine on Terminal but not in the Execute Shell Script action.

I know you have to specify the path beforehand but, as of today, I've hardly ever used Terminal commands - so don't really know where to start or if my situation is different since I'm using an addon called ImageMagick. Any idea how to find the path and set this up?

Last question: as you can see from my script, I'm changing the saturation of an image. Is there any way to change the “140” I have here to a random number between 100 and 140 instead?

Thanks!
Chris

Oops actually one more last question!

I've set the Execute Shell Script to receive an input from a named clipboard. Do I have to specify the named clipboard in the script? E.g.

mogrify -modulate 100,140 (specify the named clipboard somehow)

This is my text at the moment in the Execute Shell Script action. It doesn't work, but here's where I'm up to!

/opt/ImageMagick/bin mogrify -modulate 100,1000 /Users/chris/Desktop/Workflow/Workground/pin_2.png

I'd like to make it so I don't need to put in the file path at the end of the script but simply use the input from the named clipboard. Moreover, my file path at the beginning doesn't work - but I don't know how to find the right path.