tldr/pages.zh/common/bash.md

26 lines
424 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

# bash
> Bourne-Again SHell.
> 兼容`sh`的命令行解释器。
> 更多信息:<https://www.gnu.org/software/bash/>.
- 启动交互式 shell
`bash`
- 执行命令:
`bash -c "{{command}}"`
- 执行脚本文件:
`bash {{file.sh}}`
- 执行脚本文件,并将所有执行过的命令输出到终端:
`bash -x {{file.sh}}`
- 执行脚本文件,并在第一个错误处终止:
`bash -e {{file.sh}}`