8.17 verbose and echo Variables Show QuotingThe C shell has two variables (6.9 ) that, when set, will help you follow the convoluted trail of variable and metacharacter expansion. This will echo every command line before shell variables have been evaluated:
This command will display each line after the variables and metacharacters have been substituted: % If you wish to turn the variables off, use unset (6.8 ) instead of set . The Bourne shell syntax is different. To turn on the verbose flag, use: $ The command If your version of UNIX
understands (44.4
)
scripts that start with #!/bin/sh -xv It is not necessary to modify the program. You can enable variable tracing in Bourne shell scripts by typing the shell name and options on the command line: $ Not all Bourne shells let you turn these variables off. If yours does, you can do it by using a plus sign instead of a minus sign: set +xv - |
|