Replace all "\n" with "," using tr leaves a % at the end of the line,
I have a file created in vi
name1 name2 name3 When I run the following cat test.txt| tr "\n" "," I get name1,name2,name3,%
Could someone explain why it does appear
When I convert it to ascii codes i see
cat test.txt | tr "\n" "," | od -An -t uC
110 97 109 101 49 44 110 97 109 101 50 44 110 97 109 101 51 44
1 Answer
As @shawn mentioned this is just the shell showing there is no new line at the end of the output