Hands-on task
This task is step 1 of the course “Bash scripts: from a loop to a robust script”
A loop with a counter
Write /root/countdown.sh that prints the numbers from 5 down to 1 (one per line, in descending order). Run it, output to /root/countdown.txt.
What you'll practise:
- bash scripts
- for loop
- arithmetic mode
- output redirection
- chmod