I've tried all solutions that I found, but nothing seems to work as it should.
I have a file with text data. I need to add some characters at the end of each line.
I've tried already:
awk '{print $0"XYZ"}' $newfilename-final.txt > $newfilename-XYZ.txt
perl -nle 'print $_, "XYZ"' $newfilename-final.txt > $newfilename-XYZ.txt
sed 's/$/XYZ/' $newfilename-final.txt > $newfilename-XYZ.txt
All of them added XYZ, but not at the end of every string, but in new lines between strings.
How to solve this issue?