Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

.sh File Not Found

Tags:

shell

sh

ubuntu

I'm trying to execute test.sh on terminal.

My test.sh is in the /Home/monty folder and I made it executable:

chmod 755 test.sh

I try to execute it using: $./test.sh I get an error:

bash: ./test.sh: /usr/bin/bash: bad interpreter: No such file or directory

I tried to do this on terminal:

$ PATH=$PATH:/Home/monty

But to no avail. How do I solve this issue?

like image 322
complextea Avatar asked Mar 19 '15 08:03

complextea


1 Answers

I solved the problem by changing the end of the line from CRLF to LF since my script was edited in windows.

like image 199
haouarin Avatar answered Oct 02 '22 19:10

haouarin