debug scripts tip | PS4='+ ${BASH_SOURCE} : ${LINENO} :${FUNCNAME[0]}() '
root@ubuntu:/home/awsc1/linuxlessons/linuxscripts# bash -x debugPS4tip.sh ls
+ PS4='+ ${BASH_SOURCE} : ${LINENO} :${FUNCNAME[0]}() '
+ debugPS4tip.sh : 3 :main() TEST_VAR=test
+ debugPS4tip.sh : 4 :main() echo test
test
+ debugPS4tip.sh : 10 :main() debug ls
+ debugPS4tip.sh : 7 :debug() echo 'Executing: ls'
Executing: ls
+ debugPS4tip.sh : 8 :debug() ls
associative_array check_multiple_proc.sh EOF.sh paralleping.sh showecho.sh test.file
calc.sh debugPS4tip.sh funechoerror.sh README.md sleeppid.sh trap.sh
capacity.sh dollar_sc.sh fu.sh shellscripts.sh systemdtarget.service
root@ubuntu:/home/awsc1/linuxlessons/linuxscripts#
+ PS4='+ ${BASH_SOURCE} : ${LINENO} :${FUNCNAME[0]}() '
+ debugPS4tip.sh : 3 :main() TEST_VAR=test
+ debugPS4tip.sh : 4 :main() echo test
test
+ debugPS4tip.sh : 10 :main() debug ls
+ debugPS4tip.sh : 7 :debug() echo 'Executing: ls'
Executing: ls
+ debugPS4tip.sh : 8 :debug() ls
associative_array check_multiple_proc.sh EOF.sh paralleping.sh showecho.sh test.file
calc.sh debugPS4tip.sh funechoerror.sh README.md sleeppid.sh trap.sh
capacity.sh dollar_sc.sh fu.sh shellscripts.sh systemdtarget.service
root@ubuntu:/home/awsc1/linuxlessons/linuxscripts#
Comments
Post a Comment