str=""
while [ -z "${str[*]}" ]; do
......
done
我想问一下 中括号里面的判断 是什么意思 为什么不直接while [ -z "$str" ];do 呢??
那样写的话,感觉把str当成数组了一样
一个shell字符的问题 ${str[*]} str为一个普通字符串
-
- 帖子: 108
- 注册时间: 2010-12-18 19:46
一个shell字符的问题 ${str[*]} str为一个普通字符串
keep the faith
- 枫叶饭团
- 帖子: 14683
- 注册时间: 2010-06-16 1:05
- 系统: Mac OS X
- 来自: Tencent
- 联系:
Re: 一个shell字符的问题 ${str[*]} str为一个普通字符串
运行一下试试就知道了嘛...