This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Help running bash scripts


Thierry wrote:
#!/bin/sh

# test

If I run the above script under cygwin, I get the following error message:

$ ./test.sh
: command not found

Can anyone help me on that and tell what I'm missing from the cygwin installation?

(Pick me, pick me! I'll take this one)


You must be using an editor that inserts DOS cr/lf into the file.
bash doesn't work with them, either on Cygwin or on Linux. Either
run your script through d2u or, even better, use an editor that
won't insert dos line endings.

See the many long discussions on this list about it, as well as
reading the copious release notes for bash.

--
Jonathan Arnold                       http://www.buddydog.org

When cryptography is outlawed, bayl bhgynjf jvyy unir cevinpl.


-- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]