处理用户输入_特殊参数变量_参数统计(3) #!/bin/bash # ${!#}: 代表了最后一个位置变量。 # testing grabbing the last parameter echo the number of parameter is $# echo the last parameter is ${!#} exit # ./countparameter3.sh # ./countparameter3.sh one two three four ./countparameter3.sh ./countparameter3.sh one two three four