This patch does the following:
- Remove whitespace at the end of one line of license text
- $var -> ${var}
- use double quotes around variables to prevent globbing and word splits
- Use ${@} instead of ${*} when looping over elements to prevent whitespace problems
- Instead of [ expr1 -o expr2 ] use [expr1] || [expr2] as the former may have side effects
- Save a pipe by using awk's / / functionality to search for a string instead of using grep piped to awk