title: I want to get the unique data from the file removing duplicates
body: <p>Iam trying to get unique data from the file containing duplicates.</p>
  
  <p>here is the file sample.txt with the data as below.</p>
  
  <pre class="lang-none prettyprint-override"><code>01|128
  01|132
  02|124
  02|258
  03|858
  03|788
  04|418
  04|129
  05|328
  05|398
  </code></pre>
  
  <p>i want to get only unique data based on the column ie only one entry for 01|,
   02|, 03|,04|,05|</p>
  
  <pre><code>grep -m1 
  
  grep: illegal option -- m
  </code></pre>
  
  <p>i tried using m1 option but it doesn't support</p>
  
  <p>I/P:sample.txt</p>
  
  <pre class="lang-none prettyprint-override"><code>01|128
  01|132
  02|124
  02|258
  03|858
  03|788
  04|418
  04|129
  05|328
  05|398
  </code></pre>
  
  <p>Expected O/P</p>
  
  <pre class="lang-none prettyprint-override"><code>01|128
  02|124
  03|858
  04|418
  05|328
  </code></pre>