Debugging Bash scripts: -xv http://ift.tt/1lJWTpC bash -x script1...

Please Visit: http://ift.tt/1ajReyV



Debugging Bash scripts: -xv

http://ift.tt/1lJWTpC

bash -x script1.sh

Debugging on part(s) of the script

set -x # activate debugging from here

w

set +x # stop debugging from he

set -f set -o noglob Disable file name generation using metacharacters (globbing).

set -v set -o verbose Prints shell input lines as they are read.

set -x set -o xtrace Print command traces before executing command.



Debugging on the entire script. When things don't go according to plan, you need to determine what exactly causes the script to fail. Bash provides extensive debugging features. The most common is to start up the subshell with the -x option, which will run the entire script in debug mode.







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/PKTRXU

via LifeLong Community

No comments:

Post a Comment