How will you debug a shell script?

Debugging options available in the bash shell can be turned on and off in various ways. For example, inside the script, you can use the set command or add options to the shebang line. However, an alternative is explicitly specifying debug options on the command line while running the script.

BY Best Interview Question ON 30 Dec 2022