title: Convert bash output to JSON
body: <p>I am running the following command:</p>
  
  <pre><code>sudo clustat | grep primary | awk 'NF{print $1",""server:"$2 ",""status:"$3}'
  </code></pre>
  
  <p>Results are:</p>
  
  <pre><code>service:servicename,server:servername,status:started
  service:servicename,server:servername,status:started
  service:servicename,server:servername,status:started
  service:servicename,server:servername,status:started
  service:servicename,server:servername,status:started
  </code></pre>
  
  <p>My desired result is:</p>
  
  <pre><code>{"service":"servicename","server":"servername","status":"started"}
  {"service":"servicename","server":"servername","status":"started"}
  {"service":"servicename","server":"servername","status":"started"}
  {"service":"servicename","server":"servername","status":"started"}
  {"service":"servicename","server":"servername","status":"started"}
  </code></pre>
  
  <p>I can't seem to put the qoutation marks withour srewing up my output.</p>