This bash script is less nasty.