I'm not sure I address this problem correctly, but I've search and search over the net and found nothing, yet.
I'm writing a bash script and I want to see what the script is really doing when being executed, like a log of all the commands, one by one, what are executed - this way, I'll be able to see why my script is falling.
Note : I've post similar question in the past, someone told me I run my bash script with sh -xe script.sh but it doesn't give me enough information to debug properly.
Please advise. Thanks!
logger, I want to see what are all the commands that my script is running. In fact,I got a curl with a variable in it, and it always giving me an error. For testing purpose, I'm able to run it by writing the content of the variable manually, and it works, but I need it with a variable.And I've many other curl with variables, they all works fine, but a specific one always give me an error and it makes no sense. So I'm trying to see what is the final command exactly, that the bash terminal is receiving from my scriptset -xin your script is exactly the same thing as runningbash -x yourscript, which is what you're saying someone already told you to do (except that they were suggestingset -eas well, which is generally a bad idea, and suggesting use ofsh, which is not bash).