{"id":532,"date":"2011-03-14T12:16:13","date_gmt":"2011-03-14T12:16:13","guid":{"rendered":"https:\/\/fir3netwp.gmsrrpobkbd.com\/2011\/03\/14\/binbashm-bad-interpreter-no-such-file-or-directory\/"},"modified":"2021-07-24T18:33:32","modified_gmt":"2021-07-24T18:33:32","slug":"binbashm-bad-interpreter-no-such-file-or-directory","status":"publish","type":"post","link":"https:\/\/www.fir3net.com\/UNIX\/Linux\/binbashm-bad-interpreter-no-such-file-or-directory.html","title":{"rendered":"\/bin\/bash^M: bad interpreter: no such file or directory"},"content":{"rendered":"
This is caused by additional carriage returns within your script. In Windows the end of a line is denoted by CRLF (Carriage-Return, Line-Feed). In Unix<\/span><\/span>-like systems, the end of a line is donated by a single LF. This means when you try to run your script, every line has an extra carriage return which in turn causes issues.<\/p>\n One solution to this is to strip out the extra carriage returns, which can be done via a simple sed command. <\/p>\n This is caused by additional carriage returns within your script. In Windows the end of a line is denoted by CRLF (Carriage-Return, Line-Feed). In Unix-like systems, the end of a line is donated by a single LF. This means when you try to run your script, every line has an extra carriage return which in turn causes … Read more<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[52],"tags":[],"yoast_head":"\nsed -i 's\/{ctrl-v}{ctrl-m}\/\/g' [file]<\/pre>\n","protected":false},"excerpt":{"rendered":"