shell中的if-then语句

shell 中的if-then语句的结构为:web 单条件 #if标志开始,当if后命令的返回码为0时执行then后的语句 if commands then commands #注意还有结尾,标志最近的一个if的结束 fi 例如:shell #!/bin/bash #test if-then if date then who fi #who执行成功,返回码为0,结果为: 2
相关文章
相关标签/搜索