you are contradicting yourself. On the one hand you want to read the output of NETSTAT specifically, but when someone provides you the necessary code, you then state you can't use it becasue the output you're trying to read is nonknown.

So, what is it? Are you trying to read the output from a NETSTAT command?

Then read the output line by line, discard the first to lines and use SPLIT to split the other lines into their four components. And that's essentially the code that was provided to you.
_________________________
There are two types of vessels, submarines and targets.