摘要:
文件比较允许你测试Linux 文件系统上文件和目录的状态 jump_directory=/home/wa/ if [-d $jump_directory] then 如果jump_directory存在并是一个目录,那么then 后面的命令将会被执行 符合条件测试 if -then 语句允许你使用布 阅读全文
摘要:
test 命令的格式非常简单 test condition condition 是test命令要测试的一系列参数和值。当用在if-then 语句中时,test 命令看起来是这样的 if test condition then commands f i 如果不写test 命令的condition 部分 阅读全文
摘要:
if -then 语句 if -then 语句有如下格式 if command then commands f i bash shell 的if语句会先运行if后面的那个命令,如果改命令的退出状态码是0的话,位于then 部分的命令就会被执行,如果该命令的状态码是其他值的话。then部分的命令就不会 阅读全文