Trying to pass images to shell command using automator I am creating this service for Finder that will receive image files and pass to a shell command.

The idea is this:


I select image files on finder.
I right click and choose the service I am creating
the service receives the files and passes to sips, so it will scale the images to a given size.


this is how I created it.

sips would run on terminal if I type

sips -z 750 1334 *.png   (or any other extension, including *.*)


I am hoping that $* would pass a list of arguments to sips, but this is not working.

How do I do that?
I found a following solution that works for me:

for f in "$@"; do
  sips -z 750 1334 "$f"
done