$'r': command not found 1

$’\r’: command not found

sed -i 's/\r$//' filename

Here is what the above code is Doing:
1. sed is a stream editor.
2. -i means edit the file in place.
3. ‘s/\r$//’ is the regular expression.
4. \r is a carriage return.
5. $ is the end of the line.
6. // means replace with nothing.
7. filename is the file to edit.

Similar Posts