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: #!/bin/bash

IT Questions BankCategory: DevNetA 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: #!/bin/bash

Question:
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:

#!/bin/bash

  • 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.

Exam with this question: DevNet Associate – Practice Final Exam Answers

Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x