0
Now I get a script.sh
, previously it was executed using PuTTY provided it was written in VMWare, but now I want to execute in Windows using Cygwin, I already copy the script.sh
out to the corresponding directory, but some commands Cygwin can not recognise.
generate(){
date +%T
}
TIME = generate()
echo " Current Time: $TIME"
After execute in Cygwin
script.sh: line 3: syntax errot neat unexpected token '$'<\r''
script.sh: line 3:'generate<><
I still new in shell script, this troubles me when i follow a linux shell script book, it always execute in Linux environment but i try it in Windows, so there are problems appear. Thank you very much for your help – Lily – 2011-03-18T06:33:41.850