I receive a pipe-delimited text file from a user that populates an excel spreadsheet using screen scrapes, so the data is a mess. It is full of random ^M (carriage returns)
and <96> (windows en dash)
throughout which causes the import to be incomplete.
I have tried the dos2unix
, and I receive an error that there was a problem with the conversion. I removed all the ^M
by using this solution I found on this site:
tr -d '\r' < infile > outfile
The <96>
characters remain. What would be the comparable '/r'
for these dashes? Or perhaps there is a better solution? I would actually like to replace the "bad" dashes with "good" dashes if possible.