I've got a Cygwin script that outputs stuff to a file. My only problem is that it always uses the \n "lf" line endings instead of \r\n "cr-lf". I want to either replace them or just get cygwin to always output \r\n for line endings.
I've tried the following two commands to no avail within the script.
unix2dos d:/temp.txt
sed -i -e 's/\n/\r\n/g' d:/temp.txt