Issues while pattern matching using grep

Hi,

I have a file f1 wi the following data

f1.txt

Report ID
Report Name
-----------------------------------------------------------------

      Post Requests : 2        Post successes :  2

=============================================

I need to search for the word "Post" and copy them in a different file with the out put as below:

output.txt should be

Post Requests:2
Post successes:2

Please help me on this!

Hi

$ sed -n '/Post /s/Post s/\n&/p' file
Post Requests : 2
Post successes : 2

Guru.

Try this one also

awk '/Post/{gsub(/Post/,"\nPost");sub(/^\n/,"");print;}' f1

Thank you,
Senthil