This may not be exactly what you want, but I can tell you this works. You will have to make any changes if you want vars for the specific values, but this should be more than enough to go on.

 Code:
break on
$rc=setoption("wrapateol","on")

for each $line in wshpipe('netstat',1)
  if not instr($line,"Active Connection") and not instr($line,"Proto")
    for each $item in split($line," ") 
      if $item<>""
        $item + " "
      endif
    next
    ?
  endif
next