Switch from "echo -n" to printf. On my mac, the -n was just getting printed out.