How to pass all but the first argument to a second bash script? -


i'm trying write bash script executes bash script first argument, can't use:

bash abc.sh "$@"

because pass first argument don't want. how can remove first argument?

you can remove first argument shift:

shift #same as: shift 1 bash abc.sh "$@" 

(in bash, ksh, , zsh, can use "${@:2}" without modifying "$@" array, shift work in posix shell.)


Comments

Popular posts from this blog

cookies - Yii2 Advanced - Share session between frontend and mainsite (duplicate of frontend for www) -

angular - password and confirm password field validation angular2 reactive forms -

php - Permission denied. Laravel linux server -