add new chinese translations

This commit is contained in:
2024-12-30 15:25:56 +08:00
parent a850046d7b
commit 0d798759fd
5418 changed files with 105800 additions and 7052 deletions

View File

@@ -1,12 +1,12 @@
# case
> case ... esac 与其他语言中的 switch ... case 语句类似,是一种多分枝选择结构
> 更多信息:<https://www.gnu.org/software/bash/manual/bash.html#index-case>.
> Bash 内置结构,用于创建多选条件语句
> 更多信息:<https://www.gnu.org/software/bash/manual/bash.html#index-case>
- 通过字符串字面量判断执行分支
- 将变量与字符串字面量进行匹配,以决定运行哪个命令
`case {{入参变量}} in {{字符字面量}}) {{wc -w 执行语句块}}; ;; {{字符串}}) {{wc -l 执行语句块}}; ;; esac`
`case {{$tocount}} in {{words}}) {{wc -w README}}; ;; {{lines}}) {{wc -l README}}; ;; esac`
- 搭配通配符进行匹配,判断执行分支
- 使用 | 组合模式,使用 * 作为后备模式
`case {{入参变量}} in {{[wW]|字符字面量}}) {{wc -w 执行语句块}}; ;; {{[lL]|字符串}}) {{执行语句块}}; ;; *) {{echo "what?"}}; ;; esac`
`case {{$tocount}} in {{[wW]|words}}) {{wc -w README}}; ;; {{[lL]|lines}}) {{wc -l README}}; ;; *) {{echo "what?"}}; ;; esac`