Raw Input
cats meow in the meadow 
dogs bark in the yard
pigs sleep in the garden
I have a cat and a dog
birds fly in the blue sky
Desired Output
dogs bark in the yard
Script and Comments
Script1
[ 1] /PAT/!d
[ 2] q
Comments
  1. Any line other than the first one containing PAT will be discarded by [1].
  2. When the first line containing PAT is read by sed, control flows to [2]. Command 'q' will print this line and terminate the execution of sed.