Help with Cygwin bash file

Posted by Mestika on Stack Overflow See other posts from Stack Overflow or by Mestika
Published on 2010-05-12T11:24:35Z Indexed on 2010/05/12 11:34 UTC
Read the original article Hit count: 407

Filed under:
|
|
|

Hi,

I have a bash file, which I’m trying to run in Cygwin on a Windows 7 platform, but I gives me some odd errors when doing so. The bash file works on my Linux system. The bach file looks like this:

for ((r=0; r <10; r++))

    netcat localhost 4444 < myfile.file &

done

wait

but I’m getting an error for my for-loop. More precise it writes:

./tuning_test.bsh: line 1: syntax error near unexpected token `('

'/tuning_test.bsh: line 1: `?for ((r=0; r <10; r++))

I do not understand it because I was sure that I’ve a working bash file on my Linux. I even tried to find a for-loop example from a Linux-bash site and run it but with same error.

I’m brand new to Cygwin and doesn’t know if it has some small quirks or some other thing I have to be aware of and I’ve tried to look through the documentation and FAQ on their homepage.

Sincere

Mestika

© Stack Overflow or respective owner

Related posts about cygwin

Related posts about bash