Hi,
I've been trying to filter a file which has several repetitions of lines which looks as follows:
('hello
My name is
jamie
blabla
xyz>>)
Each line has different values in them. I want grep or awk or sed to treat everything within the (' and >>) as one line and then filter for a single word, for example jamie.
Any ideas how to do this?
PS:
I had tried a solution based on the following awk '/START:/{if (NR!=1)print "";next}{print $0}END{print "";}
. However, the output still seems to be in separate lines...
I above gives me a solution as follows:
My name is
jamie
blabla
xyz>>)
My name is
joan
blabla
blabla
xyz>>)
Is there an easy way to merge lines not separated by a blank line into a single line?
Thanks.