nerdexam
CompTIA

XK0-005 · Question #1132

An administrator has written the following Bash script: All necessary files exist in the correct locations. However, when the administrator executes the following error is received…

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

Question

An administrator has written the following Bash script: All necessary files exist in the correct locations. However, when the administrator executes the following error is received: /home/user/test.sh No such file or directory Which of the following is the MOST likely cause of the error?

Exhibit

XK0-005 question #1132 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

(27 responses)
  • A
    70% (19)
  • B
    11% (3)
  • C
    15% (4)
  • D
    4% (1)

Explanation

The shebang line is the absolute path to the Bash interpreter, and the interpreter usually lives in

Topics

#Bash scripting#Shebang#Script execution#Error diagnosis

Community Discussion

No community discussion yet for this question.

Full XK0-005 Practice