Shell Scripting Expert
Unscored tasks with hints and instant feedback. Practice results never become credentials.
Short lesson
Specialist exams combine several L4–L5 tasks under time pressure; practise the hardest tasks of the base module first.
Write ~/bin/retry.sh N CMD...: it runs CMD up to N times until it succeeds, printing “attempt K failed” to stderr after each failure, and exits with CMD's last status. Test it with `~/bin/retry.sh 3 false`.
Sign up to practiseFrom ~/access.log write the top 3 client IPs by number of 5xx responses to ~/top-5xx.txt as “COUNT IP” lines, highest first (ties: lower IP first).
Sign up to practiseWrite ~/bin/safe-archive.sh: it takes a directory argument, exits with status 2 and prints a usage message to stderr if the argument is missing or not a directory, and otherwise creates DIR.tar.gz next to the directory. Use set -euo pipefail.
Sign up to practise