Hands-on task
This task is step 2 of the course “Bash scripts: from a loop to a robust script”
Required Argument Check
Write /usr/local/bin/needarg: if at least one argument is passed, exit 0; if there are no arguments, print usage to stderr and exit with code 1.
What you'll practise:
- bash scripts
- $#
- exit codes
- stderr
- exit