I have files that I am trying to standardize without success because I cannot seem to find a pattern match with SED. in Notepad++, I can clearly see the CRLF at the end of the line.
When non-printable characters are viewed, I get a ^M with cat
and a ^M or \r at the end of the line.
In Notepad++ I can search for \r\n\h+ and deleted the carriage return along with all the whitespaces to concatenate the CC: all on one line, (sometime there can a few line break)
I think have tried every combination via SED whiteout success. I also reviewed this link https://stackoverflow.com/questions/3569997/how-to-find-out-line-endings-in-a-text-file
What I am missing?
Tried and failed examples
sed -En 's/\r\s+//g' $NewFile
sed -En 's/\r +//g' $NewFile
sed -En 's/\r\n +//g' $NewFile
sed -En 's/\n +//g' $NewFile
{}
icon. – cas Jan 02 '23 at 06:46