title: Unix using awk and cut together
body: <p>I am trying to get netstat, awk, and cut to work together to parse two parts of netstat output</p>
  
  <p>I want to pull only the last 4 numbers of the first column:</p>
  
  <pre><code> 11.111.222.32.3433   
   10.204.101.85.3433
   10.204.101.85.3433
  </code></pre>
  
  <p>Which I am able to do:</p>
  
  <pre><code>netstat -an |grep 3433 |awk '{print $1}' | cut -d "." -f5
  </code></pre>
  
  <p>But I also want to print the second column but leave off the last 4 numbers</p>
  
  <p>example:</p>
  
  <pre><code> 33.44.444.43.5555   
   24.204.101.85.3434
   11.204.101.85.6533
  </code></pre>
  
  <p>So I want the final output to look like</p>
  
  <pre><code>3433 | 33.44.444.43
  3433 | 24.204.101.85
  3433 | 11.204.101.85
  </code></pre>
  
  <p>I tried to combine two awks but I get an error</p>
  
  <p>Is this possible?</p>
  
  <p>Thank you!</p>