- http://robertmuth.blogspot.it/2012/08/better-bash-scripting-in-15-minutes.html
- http://tldp.org/LDP/abs/html/
- http://www.kfirlavi.com/blog/2012/11/14/defensive-bash-programming
- Apple security guide for scripts
- Unit test library for shell
- errexit doesn't work in subshell
# http://stackoverflow.com/questions/59895/can-a-bash-script-tell-what-directory-its-stored-in
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
TWOTWOTWOTWO=$(netstat -ltp 2>/dev/null | grep ':2222')
test -n "${TWOTWOTWOTWO}" && echo 'port 2222 already assigned'