How to append a character at the end of each line in unix How to append a character at the end of each line in unix unix unix

How to append a character at the end of each line in unix


 awk '{print $0 "," }' file > outFile sed 's/$/,/' file > outFile sed -i 's/$/,/' file

If your sed supports the -i option.

IHTH


This should do the trick awk '{ print $0 "," }' < inputfile