Linux Scripting with Bash

Test your ability to automate tasks using shell scripts and variables.

1. What is the standard shebang line to specify a Bash script?
2. Which is the correct way to assign a value to a variable in Bash (no spaces)?
3. Which loop runs as long as a condition is true?
4. What does $? represent in Bash?
5. Which syntax captures command output into a variable?
6. Which operator checks if a file is a regular file?
7. What terminates a case statement?
8. How to declare an array in Bash?
9. What exit status indicates command success?
10. Which variable holds the script name?
11. Valid Bash loop structures:
12. Check if a file exists:
13. Reference command-line arguments:
14. Valid conditional constructs:
15. Bash functions must be defined before use.
16. 'break' exits the entire script.
17. Backticks (`) work for command substitution like $(...).
18. Command to read user input into a variable (no options):
19. Symbol to start a comment line (single character):
20. Variable with all arguments as separate elements:
Answered 0 of 0 — 0 correct