Tag Archives: character

Remove Windows EOL characters ^M

If you’ve copied/edited a script from a Windows machine you may get a “bad interrupter” error due to Windows EOL characters seen as ^M, sometimes, in vi. To remove them you can use sed like so: $ sed ‘s/^M//g’ Win_File > Unix_File To get ^M you’ll need to enter ‘Ctrl-V Ctrl-M’. You can do the [...]

Posted in Bash Tips, Linux | Also tagged , , , | Leave a comment