Pass ALL Arguments from Bash Script to Another Command

Urda picture Urda · Jul 7, 2010 · Viewed 58k times · Source

I am writing a very simple script that calls another script, and I need to propagate the parameters from my current script to the script I am executing.

For instance, my script name is foo.sh and calls bar.sh

foo.sh:

bar $1 $2 $3 $4

How can I do this without explicitly specifying each parameter?

Answer