I am having trouble with running .sh script on Windows using Cygwin.
When i run the file: ./build.sh -s srv.txt
I am getting: ./build.sh: line 1: #!/bin/bash: No such file or directory
Can you guys help me what does that mean. The 1st line is commented :)
thanks.
I had the same issue running cygwin under windows. For me, it had nothing to do with the path.
It had everything to do with the encoding. I was using UTF-8
with the BOM (Byte Order Mark). The BOM was causing it to choke. Once I removed it, it worked flawlessly.
I updated the encoding using Notepad++ by:
Encoding -> Encode in UTF-8 without BOM
The which bash
command outputted:
/usr/bin/bash
However it was still able to resolve
#!/bin/bash
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다