Hands-on task
This task is step 4 of the course “Bash scripts: from a loop to a robust script”
Repeat an action N times
Write /usr/local/bin/repeat: the first argument is a number N, the second is text. The script prints the text N times (one per line). For example, repeat 3 hi will print three hi lines.
What you'll practise:
- positional arguments
- seq
- for loop
- quoting
- chmod