Can the script take parameters?
e.g.
foo.sh arg_1 arg_2 arg_3
Splunk runs the script from $SPLUNK_HOME/bin/scripts/
Yes! Details at: http://docs.splunk.com/Documentation/Splunk/5.0.2/alert/ConfiguringScriptedAlerts
Not only can you pass it whatever arguments you want, you can use a variety of environment variables, as well.