I used Cygwin on my laptop (DOS). I have a collection of scripts from my colleagues, and my own. I am not an IT person, not knowledgeable in Unix. I follow my colleagues' syntax and able to manage a few simple things.
The scripts worked well on my old laptop. I just changed laptop, installed Cygwin. When I run my scripts, they do not work. Here is one example of the error message I get:
line 1: $':\r': command not found line 5: syntax error near unexpected token `$'\r'' line 5: `fi
Here is the top 5 lines of my script
: iter=1 if [ -f iter.txt ] then rm ./iter.txt fi
Can someone please explain how I can get around this problem?