title: Extract specific words from a log file
body: <p>Existing Logfile :</p>
  <pre><code>00:00:00.035790 0x7ff488dfa700&gt;INFO: Session(ABC_BETA -1): 0.000494 Type Info
  00:24:00.035799 0x7ff488dfa700&gt;DEBUG: Session(ABC_BETA -1): 1.000000 Type Debug
  01:02:00.035801 0x7ff488dfa700&gt;INFO: Session(2NDStage -1): 0.000133 Type Info
  21:00:00.035803 0x7ff488dfa700&gt;INFO: Session(jOHN -1): 0.000140 Type Info
  23:59:00.035805 0x7ff488dfa700&gt;INFO: Session(NIRVANA -1): 0.003880 Type Info
  </code></pre>
  <p>Expected result:</p>
  <pre><code>00:00:00 INFO ABC_BETA
  00:24:00 DEBUG ABC_BETA
  01:02:00 INFO 2NDStage
  21:00:00 INFO jOHN
  23:59:00 INFO NIRVANA
  </code></pre>
  <p>I was able to extract this using a combination of sed, cut as below :</p>
  <pre><code>sed 's/[\.\&gt;\)\( \]/{/g'&lt;testfile.log|cut -d &quot;{&quot; -f 1,4,6|sed 's/{/ /g'|sed 's/: / /g'
  </code></pre>
  <p>Just wondering if there was a better way of doing this ?</p>