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
If Perl is an option:
perl -i -pe 's/\r\n$/\n/g' file
-i makes a .bak version of the input file \r = carriage return \n = linefeed $ = end of line s/foo/bar/g = globally substitute "foo" with "bar"
-i
\r
\n
$
s/foo/bar/g