Hands-on task
This task is step 8 of the course “Bash scripts: from a loop to a robust script”
Branching with && and ||
Finish the script /root/run.sh so that it creates the file /root/result_ok if the command grep -q ready /var/run/status succeeds, and the file /root/result_fail if it fails. Do the branching with && and || (no if).
What you'll practise:
- &&
- ||
- exit codes
- branching
- grep -q