GNU Bourne-Again shell
medium risk
The default shell on most Linux systems. `bash -c` runs a string as a command; `bash script.sh` runs a script.
| Flag | Meaning |
|---|---|
-c | Run a command string |
-x | Trace commands as they run |
-n | Syntax check without running |
-e | Exit on first error |
-u | Treat unset variables as errors |
-l | Login shell |
bash -n script.shSyntax-check a script · explain & risk-check →bash -x script.shDebug by tracing · explain & risk-check →Reference text is hand-written and may be incomplete — check man bash for your version. Test destructive commands on a non-production system first.