This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: bash script under cygwin fails to recognize simple commands
- From: Andy Koppe <andy dot koppe at gmail dot com>
- To: bob dot brusa at gmail dot com, cygwin at cygwin dot com
- Date: Wed, 13 Mar 2013 09:36:43 +0000
- Subject: Re: bash script under cygwin fails to recognize simple commands
- References: <514040CC.8040607@gmail.com>
On 13 March 2013 09:03, Bob Brusa wrote:
> Hi,
> it seems I miss something. The primitive script t1.sh
>
> #!/bin/bash
> echo "script running"
> ls -l
> echo "script terminating"
> exit 0
>
> produces a rather unexpected result when running it from cygwin terminal:
>
> rwb@w500 ~
> $ ./t1.sh
> script running
> ls: unknown option --
> âls --helpâ gibt weitere Informationen.
> script terminating
> : Ein numerischer Parameter ist erforderlich.
>
> rwb@w500 ~
>
> Why is this?
Your script has DOS line endings in it. The dos2unix utility will fix
that for you.
Andy
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple