Ravi Sir's Cards › AWS
bash -n vs bash -x
This comparison card contrasts bash -n and bash -x. bash -n is described as syntax only. bash -x Runs and traces. The card pairs bash -n with before commit, and bash -x with find logic bugs.
Read card text
What this card says
Debug
bash -n
Syntax only.
bash -x
Runs and traces.
Key points
Safe, runs nothing.
Shows real values.
Example
bash -n x.sh
Use when
Before commit.
Find logic bugs.