in reply to ipconfig output encoding ( 0D 0D 0A )
A bug in ipconfig is my guess. If you try the same thing with dir the line ends are fine which pretty much precludes cmd trashing the line ends.
You could do the cleanup with:
ipconfig /? | perl -np -e "$_ =~ s![\x0d\x0a]!!gm;" -e "$_ .= qq(\n);" + | hexdump
|
|---|