I opened the file with hex editor and found that odd lines end with "OA" (LineFeed), and even lines end with "OD" (CarriageReturn). And so here I am again, seeking for Perl wisdom at the monastery.
perl -pi -e " s/[\r\n]+/\n/g; " file
dos2unix/Removing ^M char AKA dos2unix
PerlIO::eol - PerlIO layer for normalizing line endings
Text::FixEOL - Canonicalizes text to a specified EOL/EOF convention, repairing any 'mixed' usages
File::LocalizeNewlines - Localize the newlines for one or more files
In reply to Re^3: Very weird things when printing (may be an encoding issue?)
by Anonymous Monk
in thread Very weird things when printing (may be an encoding issue?)
by dottornomade
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |