4.2.2 接收用户的参数
# vim example.sh
#!/bin/bash
echo "当前脚本名称为$0"
echo "总共有$#个参数,分别为$*"
echo "第1个参数为$1,第5个参数为$5"# chmod u+x example.sh
# ./example.sh 1 2 3 4 5 6 7最后更新于
# vim example.sh
#!/bin/bash
echo "当前脚本名称为$0"
echo "总共有$#个参数,分别为$*"
echo "第1个参数为$1,第5个参数为$5"# chmod u+x example.sh
# ./example.sh 1 2 3 4 5 6 7最后更新于