title: grep unique occurrences
body: <p>I have a log file (<code>file.log</code>) with multiple occurrences of ids i.e. <code>82244956</code> in a file. 
  <code>file.log</code> has been created using the command :</p>
  
  <pre><code>gzip -cd /opt/log.gz | grep "JBOSS1-1" &gt;&gt; ~/file.log
  </code></pre>
  
  <p>Example :</p>
  
  <pre><code>2012-04-10 09:01:18,196 LOG  (7ysdhsdjfhsdhjkwe:IN) JBOSS1-1 (RP-yedgdh5567) [PayPalWeb] Fetch data with id: 82244956  
  2012-04-10 09:02:18,196 LOG  (24343sdjjkidgyuwe:IN) JBOSS1-1 (RP-yedgdh5567) [PayPalWeb] Fetch data with id: 82244956  
  2012-04-10 09:03:18,196 LOG  (6744443jfhsdgyuwe:IN) JBOSS1-1 (RP-yedgdh5567) [PayPalWeb] Fetch data with id: 82244957  
  2012-04-10 09:04:18,196 LOG  (7ysdhsd5677dgyuwe:IN) JBOSS1-1 (RP-yedgdh5567) [PayPalWeb] Fetch data with id: 82244957  
  </code></pre>
  
  <p>Likewise we have 10000 rows with different ids (but each id repeating 2-3 times. Example top and bottom 2 rows in this example are repeating with id 82244956 and 82244957 respectively). We need result set based on UNIQUE ids (any row from the matched ids)i.e.:</p>
  
  <pre><code>2012-04-10 09:01:18,196 LOG  (7ysdhsdjfhsdhjkwe:IN) JBOSS1-1 (RP-yedgdh5567) [PayPalWeb] Fetch data with id: 82244956  
  2012-04-10 09:03:18,196 LOG  (6744443jfhsdgyuwe:IN) JBOSS1-1 (RP-yedgdh5567) [PayPalWeb] Fetch data with id: 82244957  
  </code></pre>
  
  <p>I tried to awk program on Linux but not a successful one :</p>
  
  <pre><code>awk ' { arr[$1]=$0 } END { for ( key in arr ) { print arr[key] } } ' file.log &gt;&gt; final-report.log
  </code></pre>
  
  <p>Or a better way would be to create <code>file.log</code> with distinct ids Only. </p>
  
  <p>Please advise how can I modify it?</p>