replace `echo` with `printf` to improve portability.