bash - Simplest way to "forward" script arguments to another command -
i have following script
#!/bin/bash docker exec my_container ./bin/cli
and have append arguments passed script command inside script. example executing
./script some_command -t --option
should run
docker exec my_container ./bin/cli some_command -t --option
inside script. looking simplest/most elegant way.
"$@" represent arguments , support quoted arguments too:
docker exec my_container ./bin/cli "$@"
Comments
Post a Comment