EX200 · 03/10 · 35 min · Free
Create simple shell scripts
Official EX200 group: conditionals, loops, script arguments, command output.
Work on your practice VM. After install, run
prep-exam.sh once, snapshot
01_Exam_Start, then SSH as student.
When you finish this lab, copy the grade script onto the VM:
sudo bash grade-obj-scripts.sh
Tasks
/usr/local/bin/logfilter.sh, root, mode 755.$1extended regexp,$2input file. No arguments → exit 2.- Matching lines to
/var/tmp/filter.out. Last lineMATCHES:<n>. Exit 0 on success. Useif/[[and afororwhileloop.