Hi
I run this command and pipe the output to a perl one liner.  not quite
sure how it parses the data:
svmon -Pt3 | perl -e 'while(<>){print if($.==2 || $& && !$x++); $.=0 if
(/^--+$/)}'

which outputs:
-------------------------------------------------------------------------------
     Pid Command          Inuse      Pin     Pgsp  Virtual 64-bit
Mthrd  16MB
 1450182 oracle         2567301    65584  1345587  3132033      Y
N     N
 1179888 oracle         2117480    65584  1343450  2680222      Y
N     N
 1446084 oracle         2115481    65840  1346761  2681480      Y
N     N
--
The ouput it is parsing looks like this:

-------------------------------------------------------------------------------
     Pid Command          Inuse      Pin     Pgsp  Virtual 64-bit
Mthrd  16MB
 1450182 oracle         2501222    65586  1345953  3066501      Y
N     N

     PageSize      Inuse        Pin       Pgsp    Virtual
       238845         - clnt /dev/fslv00:41875            s      0
0    -     -
...
-------------------------------------------------------------------------------
     Pid Command          Inuse      Pin     Pgsp  Virtual 64-bit
Mthrd  16MB
 1794286 oracle         2131397    65604  1343816  2695867      Y
N     N

     PageSize      Inuse        Pin       Pgsp    Virtual
     s   4 KB    2063541         20    1343816    2628011
 .....

and so on
--
i understand that it resets the line count  every time it sees  a line
of "----" and it then will print line 2  which is the summary line we
are looking for.   not sure what this part does "($.==2 || $& && !$x+
+)"

thanks


-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to