Skip to content

Commit 0e971ae

Browse files
committed
docs(set-shopt): fix typo
1 parent 08335b6 commit 0e971ae

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

docs/set.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -395,12 +395,12 @@ $ echo $?
395395

396396
上面命令查询`globstar`参数是否打开。返回状态为`1`,表示该参数是关闭的。
397397

398-
这个用法主要用于脚本,供`if`条件结构使用。
398+
这个用法主要用于脚本,供`if`条件结构使用。下面例子是如果打开了这个参数,就执行`if`结构内部的语句。
399399

400400
```bash
401-
if shopt -q globstar; then
401+
if !(shopt -q globstar); then
402402
...
403-
if
403+
fi
404404
```
405405

406406
## 参考链接

0 commit comments

Comments
 (0)