Useful resources for Bash witchcraft How to detect if a command is available (or hash vs command -v vs type) https://stackoverflow.com/questions/592620/check-if-a-program-exists-from-a-bash-script#677212 Using arrays http://www.tldp.org/LDP/abs/html/arrays.html Testing for files http://tldp.org/LDP/abs/html/fto.html dotfiles precedence https://askubuntu.com/questions/121073/why-bash-profile-is-not-getting-sourced-when-opening-a-terminal#121075 http://mywiki.wooledge.org/DotFiles Bash functions return values "best" practices https://www.linuxjournal.com/content/return-values-bash-functions Testing/dryrunning a script bash -n myscript.sh bash options http://wiki.bash-hackers.org/internals/shell_options