in reply to netstat on remote with perl (possible?)
Hi,
I don't know how the output looks like, but you can do the searching in the result also in perl itself. So have a look at your output with:
print Dumper(\@out);
You have to put a use Data::Dumper; at the top of your script.
Searching in the array of output lines can be done this way:
foreach my $line (@out) { next unless $line =~ /port_number/; # skip unrelevant lines print $line; # extract or search for ESTABLISHED }
Best regards
McA
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: netstat on remote with perl (possible?)
by softestplease (Initiate) on Oct 24, 2013 at 14:53 UTC | |
by McA (Priest) on Oct 24, 2013 at 15:20 UTC |