<![endif] Say what? RSS Blog Archives About Nov 14 th , 2012 | Comments Here is my Katas for creating BASH programs that work. Nothing is new here, but from my experience pepole like to abuse BASH, forget computer science and create a Big ball of mud from their programs. Here I provide methods to defend your programs from braking, and keep the code tidy and clean. Try to keep globals to minimum UPPER_CASE naming readonly decleration Use globals to replace cryptic $0, $1, etc. Globals I allways use in my programs: 1 2 3 readonly PROGNAME = $( basename $0 ) readonly PROGDIR = $( readlink -m $( dirname $0 )) readonly ARGS = "$@" All variable should be local. 1 2 3 4 5 6 7 change_owner_of_file () { local filename = $1 local user = $2 local group = $3 chown $user : $group $filename } 1 2 3 4 5 6 7 8 9 10 11 change_owner_...