.bp .au "TSC \- intro.xx" .c The pt Program .2 \f(BIpt\fB is an post-processing filter that arranges the output from \f(BIps\fB so that child processes are indented below their parents. .sp .5 .2 It tries to figure out which kind of system you're running so that it can call \f(BIps\fB with the right arguments. .sp .5 .2 Parsing \f(BIps\fB output is exceedingly difficult, mostly because fields can run together. .sp .5 .2 For our data structure, we'll use an associative array to represent our process tree. .sp .5 .2 This program also demos how to get (and how not to get) the current window size. .bp .au "TSC \- intro.xx" .c Sample pt Output .b .sz -5 root 170 co 0:03 xterm -n tom2 -geom 90x24+0+565 .sp .5 tchrist 180 p2 0:04 -tcsh (tcsh) .sp .5 root 11164 p2 0:03 -csh[] (tcsh) .sp .5 tchrist 11276 p2 0:00 less pt .sp .5 tchrist 11280 p2 0:00 /bin/perl /home/tchrist/scripts/pt a .sp .5 tchrist 11282 p2 0:00 /bin/ps xlwwa .sp .5 tchrist 11281 p2 0:00 less .sz +5 .e