Languages & Frameworks
Shell & Bash
6 practice questions. Free questions open a full answer guide; the rest unlock with Pro.
- In a Bash script, how do you check whether a command succeeded, and how would you make the script stop on the first error?
- In a bash script, what's the difference between single square brackets and double square brackets in an if condition, and why might you prefer one?Go Pro
- How do you make sure a Bash script cleans up after itself — temp files, background processes, partial state — even if it fails partway or gets interrupted?Go Pro
- What does putting 'set -euo pipefail' at the top of a Bash script do, and what are the gotchas you'd watch out for when relying on it?Go Pro
- In a shell command, what's the difference between a pipe and a redirect, and how does stderr factor in?Go Pro
- In a Bash script, what is the difference between single quotes and double quotes, and why does quoting variables matter?Go Pro
Want questions matched to your role? Paste a job title, job description, or CV for a personalized set, or go Pro to unlock the full bank.