General scripting issues vs. Linux

Markus Becker
Fri Mar 10 13:47:11 GMT 2023

Dear Guys,

I am quite an newby in Cygwin scripting and encountered several execution
issues with bash scripts. For example, when i try to execute the following
simple scriptfile "":

# This is a testscript
Statement="This is the testscript number 3"
ls -l $FILE
echo $Statement
echo The file is $FILE

i got these results:

$ ./
ls: cannot access 'home/mbecker/Secure_Copy_Beispiel.txt'$'\r\r': No such
file or directory
This is the testscript number 3
The file is home/mbecker/Secure_Copy_Beispiel.txt

or another results from a different script:

$ ./
./ line 3: $'clear\r': command not found
Dr▒cken sie beliebige Tasten und dann return
': not a valid identifierd: `TASTE

These are just two of several issues coming up with bash scripting in
Cygwin. Maybe this is merely a corse problem with my platform
understanding. But why is Cygwin calling errors when performing standard
Linux bash commands? Is it due to a different syntax? Or is it even simpler?

I would appreciate any advice and information on this. As i said, i am
quite used to Cygwin, but not so to scripting in Cygwin.

Thanks a lot

More information about the Cygwin mailing list