A network engineer is working on a bash script in order to automate some mundane tasks needed by the department. Why would the engineer add a she-bang (#!) to the top of the script as shown:
- The script file has specific commands that are preceded by the exclamation mark (!) and should not be executed.
- The script file has specific commands that are preceded by the pound sign (#) and should not be executed.
- The commands within the script fie are to have the output stored in the /bin/bash directory.
- The script file has commands that need to be run in the bash shell.
Explanation: A she-bang is the pound sign (#) followed by an exclamation mark (!) and designates the path to the command interpreter. In this case, the interpreter is bash and bash will be used to interpret the script that follows.
More Questions: DevNet Associate – Practice Final Exam Answers