linux:shell 编程 条件判断 以及 判断条件
判断语句
test -e 文件 判断文件是否存在
或者
[ -e 文件 ]
对其中一些判断的解析
-nt-> newer than
-ot-> older than
-ef -> equal than
-eq -> equal
-ne -> not equal
-gt -> greate than
-lt -> lower than
-ge -> greate equal
-le -> lower equal
-z -> zero
-n ->non empty
-a -> and
-o -> or
! -> non
还没有评论,来说两句吧...