title: Extracting a part of String using grep/sed
body: <p>I have a file in linux with similar entries as below</p>
  
  <pre><code>dn: CN=HP_NetworkSupport,OU=groups,DC=HDFCSLDM,DC=COM
  dn: CN=Review users,OU=groups,DC=HDFCSLDM,DC=COM
  </code></pre>
  
  <p>I would like to extract only the CN information, till the first ,
  for ex: </p>
  
  <pre><code>&gt; HP_NetworkSupport
  &gt; Review users
  </code></pre>
  
  <p>in the above case to another file.</p>
  
  <p>What would be command for doing the same. </p>