7. Using Monitoring and Tracing Tools : UNIX Trace Facilities : Bourne Shell -x Option
 
Share this page                  
Bourne Shell -x Option
Invoking a Bourne shell with the -x option causes each shell command to be printed before it is executed. This is especially useful for diagnosing problems with installation shell scripts.
To use this trace on the Ingres shutdown script, call the Bourne shell (or Korn shell) with the -x option, passing the name ingstop as the script to be executed:
sh -x ingstop
This option can only be used with UNIX shell scripts, not with binary executables.
If you are in doubt as to whether a program or command is a binary or shell script, type:
file program_name
UNIX replies with “commands text,” “ASCII text,” or “executable shell script” if it is an executable shell script. Otherwise the file command returns a message specific to your machine—something like demand paged executable and possibly the designated chip on which it was compiled to run.