Summarizing the debugging options for the Bash shell

The following is a summary of various debugging options used for debugging, such as -x, -v, and -n with their details:

    $ bash -n script_name  // interpretation without execution
    $ bash -v script_name  // Display commands in script
    $ bash -x script_name  // Trace the execution of script
    
    $ bash -xv script_name    // Enable options x and v for debugging
    $ bash +xv script_name    //Disable options x and v for debugging
  

Get Learning Linux Shell Scripting - Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.