shell学习4

分类:linux
2010-10-09 21:07 阅读(?)评论(0)

     

六、         快捷操作符&&

#!bin/sh

[ -r “./test” ] && echo “test can be read” //[]内为真,后边就会执行,与if相似

七、         case

#!/bin/sh

num=”aaa”

case $num               //判断变量是否等于下面字符串

  aaa)

   echo “this is aaa”;;

  "bbb")

   echo “this is bbb”;;

esac

  最后修改于 2010-10-15 22:16    阅读(?)评论(0)
 
表  情:
加载中...
 

请各位遵纪守法并注意语言文明