I am new to this site and ksh scripting. I am trying to run the following code on cygwin on windows 7 but it keeps giving me syntax error. For some reason, it works on my buddies comp but not on my laptop. Done anyone know whats going on here?
#!/usr/bin/ksh
TXTFILE="sourcefile.txt"
#SIDN=4567
cat $TXTFILE | grep -v "#"| while read R1D
do
echo ${R1D}
done
=========================
$ ./hello.ksh
: not found[2]:
./hello.ksh[11]: syntax error: 'done' unexpected
the second part is the error i get when i run the script.
and the third part is to show that ksh path/installed.
I have reinstalled the shell lib under cygwin but still get this stupid error. It even complains abut blank line. as you can see ": not found[2]:" Line is to blank....
notepad++ works find and has worked fine. I am not sure if this is a issue of cygwin or windows7. I dont see error on my windows xp but this same code works fine on my other windows 7 machine. :wall: