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

Popular posts from this blog

mysql - FireDac error 314 - but DLLs are in program directory -

git - How to list all releases of public repository with GitHub API V3 -

c++ - Getting C2512 "no default constructor" for `ClassA` error on the first parentheses of constructor for `ClassB`? -