zoukankan      html  css  js  c++  java
  • Bash debug

    Debugging bash scripts

    Bash can help us to find problems in bash scripts in some ways. You don't expect too much or gdb like environment but it has a few helpful options.

    Running a shell script with -x option:

    bash -x script.sh

    Or you can use set builtin function in shell script:

    set -x # display executed commands and arguments
    set -v # display shell input lines

    You can also turn off this functionality as below:

    set +x

  • 相关阅读:
    leetcode211
    leetcode209
    leetcode201
    leetcode1396
    leetcode1395
    leetcode1394
    leetcode1386
    leetcode1387
    leetcode1382
    leetcode1376
  • 原文地址:https://www.cnblogs.com/diyunpeng/p/3546593.html
Copyright © 2011-2022 走看看