These are the contents of t.txt
ABCDEFG
ABCDEFG
ABCDEFG
ABCDEFG
I tried these commands to add a suffix to the end of the line:
$ cat t.txt | sed -e 's/$/-asdf/'
$ cat t.txt | awk '{ print $0 "-asdf" }'
The result in macOS:
-asdfFG
-asdfFG
-asdfFG
ABCDEFG-asdf
The result in Linux:
ABCDEFG-abcd
ABCDEFG-abcd
ABCDEFG-abcd
ABCDEFG-abcd
Why do I not get the same result in macOS?