sed on a multiline block: strip spaces and newlines within tags

sed on a multiline block: strip spaces and newlines within tags

am 02.04.2008 22:54:30 von Andre Steinert

I have a command that spews descriptive output that has attributes (CWD,
TIME, NAME) etc followed by the value enclosed in <>

Unfortunately the original designer thought it to be "smart" [sic.] to
implement his own "word-wrap" at a certain number of columns.
Consequently many of my lines are split at strange locations. He also
inserted spaces to make the output "pretty" by aligning columns.

This makes it awfully inconvenient to process system paths etc. because
of the intervening space and newlines.

Example:
rrrr rrr
cruft cruft
blah blah CWD /zzz/eee/rrr
/ttt/aaa/qqq>

I need a
rrr rrr
cruft cruft
blah blah CWD




How do I sed this so that any space-characters and newlines are stripped
BUT only if within a <>? I'm stumped at how to write a sed one liner that
will handle this multi-line pattern space! Any ideas?

--
Rahul