some nice bash stuff from brettterpstra.com