#!/bin/bashfunWithParam(){
echo"The value of the first parameter is $1 !"echo"The value of the second parameter is $2 !"echo"The value of the tenth parameter is $10 !"echo"The value of the tenth parameter is ${10} !"echo"The value of the eleventh parameter is ${11} !"echo"The amount of the parameters is $# !"echo"The string of the parameters is $* !"
}
funWithParam 1234567893473
1
2
3
4
5
6
7
8
9
10
11
输出结果:
The value ofthefirst parameter is1 !
The value ofthesecond parameter is2 !
The value ofthetenth parameter is10 !
The value ofthetenth parameter is34 !
The value ofthe eleventh parameter is73 !
The amount ofthe parameters is12 !
The stringofthe parameters is1234567893473 !"