Shell
wenchenzhao113
为今天比昨天进步一点而努力奋斗
展开
-
Operators in condition compare. (man test)
-h file True if file exists and is a symbolic link.-e file True if file exists. (Not available in sh.)翻译 2009-08-12 11:09:00 · 302 阅读 · 0 评论 -
compare
1. [[ ]] VS. [][root@vcsv245c work]# [ -z "$var1" || -z "$var2" ] && echo "var1 or var2 is empty"-bash: [: missing `]-bash: -z: command not found[root@vcsv245c work]# [[ -z "$var1" || -z "$va原创 2009-10-27 15:45:00 · 337 阅读 · 0 评论