0

I am unclear about two options when invoking a bash shell process or for set:

-v Print shell input lines as they are read.

-x Print a trace of simple commands, for commands, case commands, select commands, and arithmetic for commands and their argu- ments or associated word lists after they are expanded and before they are executed. The value of the PS4 variable is expanded and the resultant value is printed before the command and its expanded arguments

How is a trace of commands different from shell input lines?

2

The trace shows the lines which are executed, counting variable-substitution. A verbose trace shows the lines which are read.

For comparison, csh has a verbose setting, which shows only lines read. It is not as useful for debugging scripting problems.

By the way, both -v and -x are described in the POSIX shell command language. So this question is not bash-specific.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.