File manipulation

Hello,
I have a file of which six lines are given below:

    <a="b" value="N"/>
    <a="c" value="x1"/>
  <a="b" value="N"/>
    <a="c" value="x2"/>
  <a="b" value="Y"/>
    <a="c" value="x3"/>

I need one file with all the lines just below where value="N" occur.

So the output would be:
<a="c" value="x1"/> <a="c" value="x2"/>

I could have used "for" loop, but the file is huge, so I am avoiding using loop.

Thanks a lot.......

---------- Post updated at 12:49 PM ---------- Previous update was at 12:48 PM ----------

I am sorry, the output would be: (in different lines)
<a="c" value="x1"/>
<a="c" value="x2"/>

awk '{if(NR%2==0){print $0}}' filename

thanks. but it prints all the even lines

awk '/value=\"N\"/{getline;print}' file
1 Like

thanks a lot