title: bash filter/strip output for specific text
body: <p>Given the dmesg log output, specifically a line in it, for eg:</p>
  
  <pre><code>NET: Registered protocol family 10
  </code></pre>
  
  <p>in a script I want to have a defined variable like <code>$net_version</code> that will check if I define it with a value of 10, if it matches the one found in dmesg.</p>
  
  <p>I looked both at sed and awk, however for awk I cannot find the correct way of stripping the output to just match the variable with the last word in that dmesg line.</p>
  
  <p>I think this is a simple one, however I'm having an issue identifying the correct way of doing it.</p>