nerdexam
LPI

102-500 · Question #186

Which of the following are requirements in order to run a shell script like a regular command from anywhere in the filesystem? (Choose THREE correct answers.)

The correct answer is B. The script file must be found in the $PATH. C. The script file must have the executable permission bit set. D. The script must begin with a shebang-line (#!) that points to the correct interpreter. See the full explanation below for the reasoning.

Question

Which of the following are requirements in order to run a shell script like a regular command from anywhere in the filesystem? (Choose THREE correct answers.)

Options

  • AThe user issuing the command must be in the group script.
  • BThe script file must be found in the $PATH.
  • CThe script file must have the executable permission bit set.
  • DThe script must begin with a shebang-line (#!) that points to the correct interpreter.
  • EThe file system on which the script resides must be mounted with the option scripts.

How the community answered

(56 responses)
  • A
    16% (9)
  • B
    73% (41)
  • E
    11% (6)

Community Discussion

No community discussion yet for this question.

Full 102-500 Practice