Hands-on task
This task is step 23 of the course “Bash scripts: from a loop to a robust script”
Limit execution time
The command sleep 100 is too long. Run it with a 2-second limit so it gets forcibly interrupted on timeout, and write the return code of this run to /root/rc.txt (a command interrupted by timeout has a special one).
What you'll practise:
- timeout
- return code
- $?
- process management