Use -x and -v switches to get more insight into what BASH is doing.To display commands and their arguments as they are executed -
bash -x scriptName
To display shell input lines as they are read -
bash -v scriptName
You can put the above two commands in the shell script itself, like so -
# turn on debug mode
set -x
set -v
OR change the shabang line -
#!/bin/bash -xv
No comments:
Post a Comment