How to force emacs to use \n instead of \r\n

Posted by User1 on Stack Overflow See other posts from Stack Overflow or by User1
Published on 2010-04-16T16:57:10Z Indexed on 2010/04/16 17:33 UTC
Read the original article Hit count: 257

Filed under:
|
|

I have to use windows to write some shell scripts. I decided to use emacs, but I get a weird error when running the script:

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

Correct me if I'm wrong, but that looks like the shebang ends in \r\n instead of just \n. How can I tell emacs to only write \n? I'm in Shell-script major mode. It's quite surprising this isn't fixed by default.

© Stack Overflow or respective owner

Related posts about emacs

Related posts about newline