Pass multiple Automator variables to Run Shell Script?

I have two Automator variables I'd like to pass to Run Shell Script. I'm missing something obvious, but how is this done?
Thanks in advance

Mac OS X (10.5.4)

Posted on Aug 10, 2008 12:46 PM

Reply
3 replies

Aug 10, 2008 1:11 PM in response to Frank Giraffe

i don't know a nice way to do it but in general any input passed to a shell script will be stored in $@ if input is passed as arguments.

in particular, if you stack two "get value of variable actions" one after another and follow it by "run shell script" both variables will be stored in $@ as a list. just try it out with the default

for f in "$@"
do
echo "$f"
done


You'll see that both variables will be echoed.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Pass multiple Automator variables to Run Shell Script?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.