How to print the 'nth + x' lines after a match is found?
<p>I have a file which contains the output below. I want only the lines which contain the actual vm_id number.</p>

<p>I want to match pattern 'vm_id' and print 2nd line + all other lines until 'rows' is reached. </p>

<pre><code>FILE BEGIN:
                vm_id                 
--------------------------------------
 bf6c4f90-2e71-4253-a7f6-dbe5d666d3a4
 bf6c4f90-2e71-4253-a7f6-dbe5d666d3a4
 6ffac9a9-1b6b-4600-8114-1ca0666951be
 47b5e6d1-6ddd-424a-ab08-18ee35b54ebf
 cc0e8b36-eba3-4846-af08-67ab72d911fc
 1b8c2766-92b7-477a-bc92-797a8cb74271
 c37bf1d8-a6b2-4099-9d98-179b4e573c64
(6 rows)

datacenter=
FILE END:
</code></pre>

<p>So the resulting output would be;</p>

<pre><code> bf6c4f90-2e71-4253-a7f6-dbe5d666d3a4
 6ffac9a9-1b6b-4600-8114-1ca0666951be
 47b5e6d1-6ddd-424a-ab08-18ee35b54ebf
 cc0e8b36-eba3-4846-af08-67ab72d911fc
 1b8c2766-92b7-477a-bc92-797a8cb74271
 c37bf1d8-a6b2-4099-9d98-179b4e573c64
</code></pre>

<p>Also, the number of VM Id's will vary, this example has 6 while others could have 3 or 300.</p>

<p>I have tried the following but they only output a single line that's specified;</p>

<pre><code>awk 'c&amp;&amp;!--c;/vm_id/{c=2}' 
and
awk 'c&amp;&amp;!--c;/vm_id/{c=2+1}' 
</code></pre>