Linux Mẹo vặt

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

Table of Content

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

Nhận diện

Lỗi này xuất khi khi tạo file shell sh và chạy

Fix lỗi

sed -i -e 's/\r$//' scriptname.sh
./scriptname.sh

https://stackoverflow.com/questions/14219092/bash-script-and-bin-bashm-bad-interpreter-no-such-file-or-directory

Leave a Reply

Your email address will not be published. Required fields are marked *