shell中的[]可以用来做各种测试,在测试比较时,比如字符串的比较,必须给字符串加上双引号,否则会报[too many arguements的错误a='abc'if [ "$a" ];thenecho $afi