Closed osopolar closed 2 years ago
echo -n and echo -ne is not working for me on macOS 10.13.6, the output looks like -n 12: 345678 and in the pasteboard I get -ne 12: 345678.
echo -n
echo -ne
-n 12: 345678
-ne 12: 345678
I guess it's because
echo is not portable as you experienced. I would suggest to use the POSIX alternative printf see https://apple.stackexchange.com/a/173873/72643
What about using printf instead of echo? I haven't tested it on Linux, but on macOS 10.13.6 it works.
echo -n
andecho -ne
is not working for me on macOS 10.13.6, the output looks like-n 12: 345678
and in the pasteboard I get-ne 12: 345678
.I guess it's because