I have this line inside a file:
ULNET-PA,client_sgcib,broker_keplersecurities ,KEPLER
I try to get rid of that ^M (carriage return) charact
In awk:
sub(/\r/,"")
If it is in the end of record, sub(/\r/,"",$NF) should suffice. No need to scan the whole record.
sub(/\r/,"",$NF)