08 September 2012
  • 方法一

      if [ $x ];then  
     		echo 'not null'  
      else  
     		echo 'is null'  
      fi  
    
  • 方法二

      if [ -z "$x" ];  
     		echo 'is null'  
      else  
     		echo 'not null'  
      fi  
    


blog comments powered by Disqus