Monday, 28 September 2009

Passing more than 9 parameters to a bash script

In order to process the tenth (and onwards) parameter in a bash script, you need to enclose the argument number in curly braces, e.g.:

echo "Parameter #11 is ${11}"

Not doing this introduces all kinds of weird problems.

No comments:

Post a Comment