doc: update bash.md (#312)

This commit is contained in:
jaywcjlove 2023-02-26 22:13:57 +08:00
parent 36f071de00
commit 30fa592d95

View File

@ -1016,18 +1016,18 @@ echo "${args[@]}"
以调试模式运行脚本(整个脚本都会打印调试信息) 以调试模式运行脚本(整个脚本都会打印调试信息)
~~~bash ```bash
$ bash -x myscript.sh $ bash -x myscript.sh
~~~ ```
在bash脚本中打开调试(针对部分内容打印调试信息)。 在bash脚本中打开调试(针对部分内容打印调试信息)。
~~~bash ```bash
#!/bin/bash #!/bin/bash
set -x # Enable debugging set -x # Enable debugging
# some code here # some code here
set +x # Disable debugging output. set +x # Disable debugging output.
~~~ ```
Bash 颜色 Bash 颜色
---- ----