CompTIA
XK0-004 · Question #137
An administrator has written the following Bash script: All necessary files exist in the correct locations. However, when the administrator executes /home/user/test.sh the following error is…
The correct answer is A. The shebang points to the wrong path. The shebang line is the absolute path to the Bash interpreter, and the interpreter usually lives in
Troubleshooting and Diagnostics
Question
An administrator has written the following Bash script:
All necessary files exist in the correct locations. However, when the administrator executes /home/user/test.sh the following error is received:
No such file or directory Which of the following is the MOST likely cause of the error?
Exhibit
Options
- AThe shebang points to the wrong path.
- BThe script is not executable.
- CThe formatting of the file is incorrect.
- DNslookup is not installed.
How the community answered
(49 responses)- A76% (37)
- B14% (7)
- C4% (2)
- D6% (3)
Explanation
The shebang line is the absolute path to the Bash interpreter, and the interpreter usually lives in
Topics
#bash shebang#script execution#file encoding#interpreter path
Community Discussion
No community discussion yet for this question.
