Sed gurus: Say I have this input in in.txt:

The quick brown fox

jumps over the lazy

dog

The quick brown fox

jumps https://example.com/1[Example1] over the lazy

dog

I want the output to look like this:

The quick brown fox

jumps over the lazy

dog

https://example.com/1

The quick brown fox

jumps https://example.com/1[Example1] over the lazy

dog

So I want all URLs inside paragraphs to be copied to right before the paragraph with two line-breaks after it. Any takers? Other tool are ok too, if they're available on a typical slimmed linux machine.

Reply to this note

Please Login to reply.

Discussion

No replies yet.