shell循环基础

#!/bin/bash
echo a1 is $0
echo a2 is $1
echo a3 is $2
echo a4 is $72
echo a5 is $#

echo a5 is $?

 

输出:

root@dlxa02 test]# ./bb.sh
a1 is ./bb.sh
a2 is
a3 is
a4 is 2
a5 is 0
a6 is 0

说明:$0 调用脚本的名称,$#是脚本自变量的数据  ,$? 上一条命令返回值(1为真)

 

你可能感兴趣的:(shell)