본문 바로가기

IT/shell scripts

: bad interpreter: No such file or directory 의 eclipse 설정

: bad interpreter: No such file or directory

문제의 원인

Windows 기반에서 작성된 text는 줄바꿈을 CR/LF(\r\n)로 처리하는 반면,
Unix/Linux 기반의 text에서는 줄바꿈을 LF(\n)로 처리하면서 발생하는 문제이다.

해결방법

1. vi -b 해당파일을 열어 ^M을 지워준다.


eclipse를 사용하고 있다면?

Window -> Preferences -> General -> Workspace -> New text file line delimiter 를 Unix로 바꿔준다.

이미 open된 파일이라면

File -> Convert Line Delimiters To -> Unix 로 바꿔준다.