Shell Command Line MCQ
Shell Command Line MCQ
Questions
1. What does the shebang line `#!/bin/bash` indicate in a shell script?
a) A comment in the script
b) The start of a function
c) Specifies the interpreter to be used
d) Defines a system variable
2. b) chmod +x script.sh
6. b) >>
7. b) If a string is empty
8. a) function name() { }
10. b) wc -l
12. b) $2
14. a) ==
16. c) ${#string}
18. c) expr
20. b) -e file