1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-29 23:24:55 +02:00
tldr/pages.zh/common/bash.md
Jin 67166ff0e7
common/a~g*:fix outdated Chinese pages (#14690)
* common/a~g*:fix outdated Chinese pages

* Update airmon-ng.md

* Update aria2c.md

* update chown

* Update ansible-playbook.md

---------

Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com>
2024-11-27 03:20:32 -08:00

37 lines
786 B
Markdown

# bash
> Bourne-Again SHell,兼容 `sh` 的命令行解释器。
> 此外请参阅:`zsh`,`histexpand`(历史展开)。
> 更多信息:<https://www.gnu.org/software/bash/>.
- 启动交互式 shell:
`bash`
- 启动一个不加载启动配置的交互式的 shell 会话:
`bash --norc`
- 执行命令:
`bash -c "{{echo '已执行bash命令'}}"`
- 执行脚本文件:
`bash {{路径/到/脚本文件.sh}}`
- 执行脚本文件,并将所有执行过的命令输出到终端:
`bash -x {{路径/到/脚本文件.sh}}`
- 执行脚本文件,并在第一个错误处终止:
`bash -e {{路径/到/脚本文件.sh}}`
-`stdin` 执行指定的命令:
`{{echo "echo '已执行bash命令'"}} | bash`
- 启动一个限制的 shell 会话:
`bash -r`