is there a way I can grep/awk multiple lines from a cluster based on a pattern?
I have a file as follows:
File.txt
>Cluster1
1 rabbit eats carrot
2 Lion is the king of jungle
3 Dogs loves toys
4 Cats loves mice
>Cluster2
1 Horse loves grass
2 Giraffes love leaves
3 Hippos love water
>Cluster3
1 Snakes love trees
2 Sharks love fish
3 Tigers love bushes
4 Cats love toys
5 Dogs love food
>Cluster4
1 Leopards love running
2 Dogs love toys
3 Cats love food
>Cluster5
1 rabbit eats carrot
2 Leopards love running
3 Cats love food
And the pattern is - "Dogs", I would like the output to be:
>Cluster1
1 rabbit eats carrot
2 Lion is the king of jungle
3 Dogs loves toys
4 Cats loves mice
>Cluster3
1 Snakes love trees
2 Sharks love fish
3 Tigers love bushes
4 Cats love toys
5 Dogs love food
>Cluster4
1 Leopards love running
2 Dogs love toys
3 Cats love food
Is this possible?