Aloha. I have a simple question that will hopefully be simple to
answer. I want to use the stream editor (sed), or perhaps awk,
to join two contiguous lines in a text file, a sample of which might
look something like this:
This is line one
This is line two
This is line three
etc. etc.
What I want to do is join all lines which contain the string "two"
(or whatever) with the line directly preceding it. The sample output
would like something like this:
This is line oneThis is line two
This is line three
etc. etc.
Any basic unix trick will do if it can't be done using sed. Please
advise via email as I don't often get a chance to check the newsgroups
as often as I'd like. Thanks!