1. shift命令可使参数发生位移
如: shift 1 # 表示参数下标向右移动一位, 比如执行文件时输入参数file.sh 1 2 3 ; 在文件中加入shift 1 则$1变量接受到的值会变成2
一个示例如下: