Blog Archive for December 7, 2010

Vim Converting File Types

December 7, 2010

I had a problem with a unix script that was originally created on Windows. It was giving the error:

bash: ./script: /bin/bash^M: bad interpreter: No such file or directory

To fix this we need to get rid of the ^M line endings.

Edit file in vim.

:set ff=unix
:wq

This …

Tags: vim vi