Remove the spurious CR characters
The ^M is a carriage return character.
Linux uses the line feed character to mark the end of a line, whereas Windows uses the two-character sequence CR LF.
Your file has Windows line endings, which is confusing Linux.
You can remove the spurious CR characters with the following command:
sed -i -e 's/\r$//'
The ^M is a carriage return character.
Linux uses the line feed character to mark the end of a line, whereas Windows uses the two-character sequence CR LF.
Your file has Windows line endings, which is confusing Linux.
You can remove the spurious CR characters with the following command:
sed -i -e 's/\r$//'
Comments
Post a Comment