传参数示例 文件——test1.sh 执行命令:sh xx.test $1 $2 #!/bin/bash echo "start..."; echo "start: $0"; echo "the first one: $1"; echo "the second one: $2"; 结果: 总结:$0——test1.sh,$1——第一个参数,$2——第二个参数