Multiple choice technology operating systems

For debugging shell Scripts which command is used?

  1. set filename

  2. set -x

  3. set +x

  4. set ls -l

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

The set -x command enables shell debugging by printing each command and its arguments to the terminal before execution. Conversely, set +x disables this debugging mode. The other options, like passing filenames or command outputs to set, are used for positional parameters rather than debugging.