you can do “slicing” as well, $@
gets all the arguments in bash.
echo "${@:2}"
gets 2nd argument onwards
eg
$ cat shell.sh
#!/bin/bash
echo "${@:2}"
$ ./shell.sh 1 2 3 4
2 3 4
you can do “slicing” as well, $@
gets all the arguments in bash.
echo "${@:2}"
gets 2nd argument onwards
eg
$ cat shell.sh
#!/bin/bash
echo "${@:2}"
$ ./shell.sh 1 2 3 4
2 3 4