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
Post a Comment