I'm using cygwin to make some scripts,but I have the following problem.
If I create a simple script like this one:
if [ $# -ne 2 ]
echo "Error"
exit 1
fi
echo "`expr $1 + $2`"
I obtain line 6: syntax error:unexpected end of file.
If I create the same script with cat>filename.txt and execute it with ./filename.txt it works.
I can't use only cat because if I want to make a huge script I don't want to start from scratch eveytime.