Skip to content

Commit 3e84525

Browse files
committed
fix typo
1 parent b3b7ff1 commit 3e84525

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

docs/shellAdvanced/regular_expression.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,6 @@ $
295295
```bash
296296
$ sed -n '/[ch]at/p' data6
297297
The cat is sleeping.
298-
这里用到的数据文件和点号特殊字符例子中的一样,但得到的结果却不一样。这次我们成功滤掉了只包含单词at的行。匹配这个模式的单词只有cat和hat。还要注意以at开头的行也没有匹配。字符组中必须有个字符来匹配相应的位置。
299298
That is a very nice hat.
300299
$
301300
```
@@ -733,7 +732,7 @@ $
733732
734733
这个例子会匹配数据流文本中的 cat、hat 或 dog。
735734
736-
### 管道符号
735+
### 圆括号
737736
738737
正则表达式模式也可以用圆括号进行分组。当你将正则表达式模式分组时,该组会被视为一个标准字符。可以像对普通字符一样给该组使用特殊字符。举个例子:
739738

docs/shellAdvanced/sed_gawk_basic.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,8 @@ $
306306
```bash
307307
$ sed '3,${
308308
> s/brown/green/
309-
> s/lazy/active/ > }' data1.txt
309+
> s/lazy/active/
310+
> }' data1.txt
310311
The quick brown fox jumps over the lazy dog.
311312
The quick brown fox jumps over the lazy dog.
312313
The quick green fox jumps over the active dog.

docs/shellAdvanced/shell_function.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ Finally, try adding three numbers: -1
304304
$
305305
```
306306
307-
text6 脚本中的 addem 函数首先会检查脚本传给它的参数数目。如果没有任何参数,或者参数多于两个,addem 会返回值-1。如果只有一个参数,addem 会将参数与自身相加。如果有两个参数,addem 会将它们进行相加。
307+
test6 脚本中的 addem 函数首先会检查脚本传给它的参数数目。如果没有任何参数,或者参数多于两个,addem 会返回值-1。如果只有一个参数,addem 会将参数与自身相加。如果有两个参数,addem 会将它们进行相加。
308308
309309
由于函数使用特殊参数环境变量作为自己的参数值,因此它无法直接获取脚本在命令行中的参数值。下面的例子将会运行失败。
310310

0 commit comments

Comments
 (0)