2

I create start.sh file and wont to start,but retruned me

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

this is my start.sh file content

#!/bin/bash
cd /home/test/Desktop
node cron.js

How can I fixed this problem?

Vahagn Aleksanyan
  • 87
  • 2
  • 3
  • 12
  • Allow us to Google that for you: [/bin/bash^M: bad interpreter site:stackoverflow.com](https://www.google.com/search?q=%2Fbin%2Fbash^M%3A+bad+interpreter+site%3Astackoverflow.com) – jww Jul 18 '18 at 22:40

1 Answers1

3

It means your script file has MSWin line endings. Use dos2unix or fromdos to fix them.

choroba
  • 231,213
  • 25
  • 204
  • 289