有如下的shell/ target=_blank class=infotextkey>shell脚本代码:
parameter.sh
#!/bin/bash
echo "show all the parameter : "
echo "the scirpt name is : $0"
echo "the first parameter is : $1"
echo "the second parameter is : $2"
echo "the third parameter is : $3"
echo "the four parameter is : $4"
echo "the five parameter is : $5"
exit
运行该shell脚本,接收命令行参数,如下图: