CompTIA Server+ (SK0-005) — Question 60
Which of the following should be placed at the top of a Bash script to ensure it can be executed?
Answer options
- A. bash
- B. !execute
- C. #!
- D. @echo off
Correct answer: C
Explanation
The correct answer is C, as the '#!' symbol, known as a shebang, tells the system which interpreter to use to execute the script. Options A and B do not serve this purpose, while D is used in Windows batch files, not in Bash scripts.