bash example from bash.cyberciti.biz/guide/Debug_a_script