美文网首页
shell之判断

shell之判断

作者: IT小池 | 来源:发表于2019-05-28 21:13 被阅读0次
image.png image.png

判断一个文件是否存在

[root@localhost ~]# [ -e /root/install.log ]
[root@localhost ~]# echo $?

0 表示上条语句正确执行,非 0 表示不正确


image.png image.png image.png image.png image.png

相关文章

网友评论

      本文标题:shell之判断

      本文链接:https://www.haomeiwen.com/subject/lfijtctx.html