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

angular ui router - 10 digest iterations reached in angularjs when using $state.go -

symfony - InvalidConfigurationException in SecurityExtension.php line 429: No authentication listener registered for firewall "secured_area" -

javascript - Can Piwik report referrer in real time? -