Bash Shell Scripting Fundamentals
By Devin Park · Updated May 25, 2026
Question catalog for this preview
Catalog listing of the 5 preview questions for this quiz.
Question 1
In Bash, `[[blank1]] -eq 0` checks if a command succeeded (tests the exit code), and the construct `cmd1 [[blank2]] cmd2` executes cmd2 ONLY if cmd1 fails (non-zero exit code).
Question 2
In Bash, `$(command)` is used for [[blank1]], allowing the output of a command to be captured and used as a value in another command or variable assignment.
Question 3
In Bash, what is the difference between `$*` and `$@` when referencing all script arguments?
Question 4
What is the purpose of the shebang line `#!/bin/bash` at the beginning of a shell script?
Question 5
The Bash command `[[blank1]] 0 23 * * 1-5 /opt/scripts/backup.sh` would schedule a cron job to run the backup script at 11 PM (23:00) on weekdays (Monday through Friday).