Originally Posted By: Allen
I just reread your post, and I think I mis-understood your request. The udfs I suggested still apply but you will probably want to split() out the fields you need.

 Code:
for each $line in wshpipe('netstat',1)
  if instr($line,"WhatEverYouAreLookingFor")
    $Var=split($line," ")[3]  ; arrays are 0 based so this would be the 4th item
  endif
next


Cool! This is great. Thanks. It gets me a lot closer to what i'm trying to do.

One thing however... as far as the "WhateverYouAreLookingFor" portion of the code, i can't use it.

Essentially, i'm dealing with relatively unknown output. Both contents and positioning are variable.

All I know from the output is that it's structured in a way that the fields within the output are non-blank strings of characters, so basically I need to scan through each line until I find a non-blank character, continue scanning until I find blank again, lop that string of characters off into a field, and repeat until EOL.

John