Hands-on task
This task is step 13 of the course “Bash scripts: from a loop to a robust script”
Sum of arguments
Write /usr/local/bin/sumargs that adds up all the number arguments passed to it and prints the sum. For example, sumargs 3 4 5 → 12.
What you'll practise:
- positional arguments
- $@
- for loop
- arithmetic $(( ))
- accumulator