title: Is there a simple awk/sed way to print list in YAML file?
body: <p>I'm looking for an optimized way to print a particular list in a YAML file using sed or/and awk.
  For example, in the below sample yaml file, how do I get the list of Fruits alone printed on screen,say, comma separated?</p>
  <h1>Input File: boston_mart.yaml</h1>
  <p>What I am able to acheive using awk is to print after &quot;Fruits:&quot; but I also want another contition to print only if &quot;-&quot; is in front of the words. That is where I am stuck. Any help or pointers will be very helpful.</p>
  <pre><code>## YAML
  Market: open
  Season: fall
  Fruits:
  - apple
  - orange
  - banana
  - grapes
  Vendors: 7
  Buyers: 5
  Vegetables:
  - tomato
  - carrot
  - broccoli
  Location: Boston
  </code></pre>
  <h1>Output</h1>
  <pre><code>apple
  orange
  banana
  grapes
  </code></pre>