Replace "echo -n" by "printf" to avoid problems on Macs