#!/bin/bashecho a1 is $0echo a2 is $1echo a3 is $2echo a4 is $72echo a5 is $#
echo a5 is $?
输出:
root@dlxa02 test]# ./bb.sh a1 is ./bb.sha2 isa3 isa4 is 2a5 is 0a6 is 0
说明:$0 调用脚本的名称,$#是脚本自变量的数据 ,$? 上一条命令返回值(1为真)
posted on 2011-12-15 15:55 wangbokun 阅读(167) 评论(0) 编辑 收藏 举报