摘要:
for 循环用于重复一组命令 语法: for var in list do commands done 带有单引号的参数可以通过转义字符\ 或者双引号来定义用到单引号的值 #!/bin/bash for test in I don\'t know if "this'll" work do echo 阅读全文
摘要:
case命令用于处理一连串的匹配需求 语法格式: case variable in pattern1 | pattern2) commands1;; pattern3) commands2;; *) default commands;; esac 举例: #!/bin/bash case $USER 阅读全文