in reply to Re^2: Format Streaming Text file with CR/LF
in thread Format Streaming Text file with CR/LF

As a one-liner

perl -ple"BEGIN{ $/ = \90; }" infile > outfile

See perlrun for details of the switches.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"Too many [] have been sedated by an oppressive environment of political correctness and risk aversion."

Replies are listed 'Best First'.
Re^4: Format Streaming Text file with CR/LF
by ikegami (Patriarch) on Jul 22, 2008 at 19:40 UTC
    That will only add CRLF when run on Windows, but that might be ok or even desired.
      Thanks I'll give it a shot.