bash pass all function arguments to command code example
Example 1: bash function arguments
#!/usr/bin/env sh
foo 1 # this will fail because foo has not been declared yet.
foo() {
echo "Parameter #1 is $1"
}
foo 2 # this will work.
Example 2: bash pass all arguments
source script.sh "$@"