The following blog post shows a sample bash script covering some inportant aspects in writing a bash script.
- Validate if input arguments are passed
- Parse positional arguments
- Handle parameter values with white space
- Validating the arguments (using regex)
- While loop to iterate through varargs
- Usage of unit functions