Horje
bash forward argv to command Code Example
bash forward argv to command
# in r.sh
echo "params only 2    : ${@:2:1}"
echo "params 2 and 3   : ${@:2:2}"
echo "params all from 2: ${@:2:99}"
echo "params all from 2: ${@:2}"

# run it:
$ chmod u+x r.sh
$ ./r.sh 1 2 3 4 5 6 7 8 9 10

# result:
params only 2    : 2
params 2 and 3   : 2 3
params all from 2: 2 3 4 5 6 7 8 9 10
params all from 2: 2 3 4 5 6 7 8 9 10




Shell

Related
how to make apache2 not autorestat when startup Code Example how to make apache2 not autorestat when startup Code Example
ssh only key Code Example ssh only key Code Example
shell run in background no output Code Example shell run in background no output Code Example
linux split with filename extension Code Example linux split with filename extension Code Example
postgre create user Code Example postgre create user Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
8