title: Grep Regex for Mac Address
body: <p>I need help with a regex to extract mac addresses from a large file. </p>
  
  <p>Here is the format of the file:</p>
  
  <pre><code>Wed Apr 25 10:15:32 EDT 2012 Client: 00aa11bb22cc mac
  Wed Apr 25 10:15:34 EDT 2012 Client: aa11bb22cc33 pc
  </code></pre>
  
  <p>Here is what I am currently trying with no luck:</p>
  
  <pre><code>grep -io '[0-9a-f]{12}' file.txt &gt; macs.txt
  </code></pre>
  
  <p>Any ideas? I just want to extract only the mac address part into the file called <code>macs.txt</code>.</p>