Add self-identification
Search for needed commands in PATH
Loop through commands rather than repeating
Use consistent if/for/while block syntax
Change text syntax for port presence
No need to quote arithmetic context
No need to quote var in case statement
No need to quote in variable assignment
Fix harebrained printf patterns
Improve variable name
Remove unnecessary variable bracing
Quoting unneeded in unary/lhs [[
No need to quote getopts spec
Include self name in error messages

Just to be a bit more helpful
Do away with getopts completely, just use arg