Shell脚本语法--位置参数和特殊变量
有很多特殊变量是被Shell自动赋值的,我们已经遇到了,例如可以用在
shift 1
。例如:
#! /bin/shecho "The program $0 is now running"echo "The first parameter is $1"echo "The second parameter is $2"echo "The parameter list is $@"shiftecho "The first parameter is $1"echo "The second parameter is $2"echo "The parameter list is $@"