I would like to write a simple windows batch file that reads from standard input a text file,
and writes to standard output the same content, but as one long line, sort of like what you would
get if you replaced each carriage-return-line-feed in the input by a blank.
Anyone know how to do this?
You could paste all lines together, if the total size is less than 8192 characters.
And echo the result to the new file with only one CR/LF at the end.
You could also use
set /pto output text without CR/LF, but it can’t handle equal signs nor white spaces at the front.EDIT: The first solution works, but has problems with empty lines and lines with exclamation marks.
This is a solution that eliminates both problems.