gowf67 has asked for the wisdom of the Perl Monks concerning the following question:
Hello Monks. Trying to flatten the output of the Windows "qwinsta" command to produce a "user=Active,user2=Disc,user3=Disc" single line output for Nagios. I'm having trouble deciding which type of field processing behavior to use:
is not quite working for me. Thanks!while (<>) { chomp; # strip record separator @Fld = split(' ', $_, -1); if ($awk) { print $Fld[2] . '=' . $Fld[4]; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: flatten record data
by toolic (Bishop) on Sep 09, 2011 at 16:33 UTC | |
|
Re: flatten record data
by davido (Cardinal) on Sep 09, 2011 at 16:34 UTC | |
|
Re: flatten record data
by hbm (Hermit) on Sep 09, 2011 at 16:55 UTC | |
by gowf67 (Initiate) on Sep 09, 2011 at 17:10 UTC |