I am debugging an old shell script; I want to see the values of all the variables used, this is a big ugly script that has been used with more than 140 variables. Anyway, I can extract the variable names from the script and put them in a convenient format. I:
#! / Bin / sh if [$ {BLAH} .... ... .. rm -rf $ {JUNK} ..... Reverse
Try running your script as follows : Enable
bash -x ./script.bash or script setting: < Pre> set -x
No comments:
Post a Comment