Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the '10.4: Pass input as var to Automator's Run Shell Script' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.4: Pass input as var to Automator's Run Shell Script
Authored by: gshenaut on Apr 10, '07 11:15:57AM
It might be worth mentioning that $* is another way to refer to all of a shell script's command line arguments, and that $@ and $* differ in one very important way: if the arguments need to be interpreted as a list of strings rather than as one all-encompassing string "$@" puts quotes around each separate argument and "$*" does not. For example, if you have the line
for x in "$*" ; do print -- $x ; done
you'll get all command line args printed on a single output line, but if you have
for x in "$@" ; do print -- $x; done
you'll get a separate line for each individual command line argument. In most cases, it doesn't matter, but in some cases it make a rather large difference.

[ Reply to This | # ]