摘要:
while 循环是 Shell 脚本中最简单的一种循环,当条件满足时,while 重复地执行一组语句,当条件不满足时,就退出 while 循环。 while 循环的用法如下: #!/bin/bashwhile condition do statements done condition 表示判断条件 阅读全文
摘要:
1. if 语句 语法格式为: if condition then statement(s) fi 或者: if condition ; then statement(s) fi condition 是判断条件,如果 condition 成立(返回“真”),那么 then 后边的语句将会被执行;如果 阅读全文