摘要:[ a file ] 如果file存在,返回值为真。 [ b file ] 如果file存在且为块特殊文件,返回值为真。 [ c file ] 如果file存在且为字特殊文件,返回值为真。 [ d file ] 如果file存在且为目录,返回值为真。 [ e file ] 如果file存在,返回值为
阅读全文
posted @ 2016-11-02 17:38
|
|
|
随笔分类 - shell脚本编程
摘要:[ a file ] 如果file存在,返回值为真。 [ b file ] 如果file存在且为块特殊文件,返回值为真。 [ c file ] 如果file存在且为字特殊文件,返回值为真。 [ d file ] 如果file存在且为目录,返回值为真。 [ e file ] 如果file存在,返回值为
阅读全文
posted @ 2016-11-02 17:38
摘要:1. linux命令返回值介绍 shell 在执行某个命令时,会有一个返回值,该值保存在shell变量$?中。当$?为0时,表示命令执行成功;当$?为1时,表示命令执行失败。 2. && 语法格式如下: command1 && command2 &&... command之间用&&连接,实现逻辑与功
阅读全文
posted @ 2016-09-19 12:33
|
|