Bash Built-In Debugging Options

Updated

October 31, 2026

Bash Built-In Debugging Options

  • bash -n script.sh: Dry-run syntax check without executing commands.
  • bash -v script.sh: Verbose mode (prints script lines as read).
  • bash -x script.sh: Execution tracing (prints commands after expansions).