LFCS 128 🐧 Shell Scripting — Debugging
A script that fails silently or behaves unexpectedly is a script that needs debugging. The shell provides three mechanisms for this: set -x prints each command before executing it, set -v prints each line before parsing it, and the -n flag parses the script without executing it. Beyond these, there are the PS4 prompt customization,…