Linux Essentials (010-160) — Question 16
Which of the following statements are true regarding a typical shell script? (Choose two.)
Answer options
- A. It has the executable permission bit set.
- B. It starts with the two character sequence #!.
- C. It is located in /usr/local/scripts/.
- D. It is located in /etc/bash/scripts/.
- E. It is compiled into a binary file compatible with the current machine architecture.
Correct answer: A, B
Explanation
Options A and B are correct because a typical shell script must have executable permissions and should begin with the #! sequence to indicate the interpreter. Options C and D are incorrect as shell scripts can be located in various directories, not just those specified. Option E is false as shell scripts are interpreted, not compiled into binary files.