convert unix lines to dos lines on windows

I use grep to remove empty lines in ipconfig's output.
grep converts output to unix format and now need to be switched back to dos format to make the log file easier to read with default windows notepad:
set path=%path%;%~dp0
ipconfig -all | grep -v "^$" | awk "{ sub("""\r$""", """"""); print }">> output.log
grep -v "^$" - remove blank lines
awk "{ sub("""\r$""", """"""); print }" - convert unix like lines to dos lines

Save:

No comments: