Re: simple windows process list

2004-09-21 Thread JP
Cool! I'm down to 161 bytes now, short enough for a oneliner at the C:\> prompt. for(grep/\S/,`tasklist /v /nh`){ chomp;my($p,$i,$u,$t)=unpack'A24A8x56A50x14A*',$_;$p="$p $t"unless$t eq'N/A';$p=~s/ +/ /g;$i+=0;$u=~tr/ /_/;print"$i $u $p\n"} Don't worry guys, my other scripts are far more readable

Re: simple windows process list

2004-09-21 Thread Errin Larsen
On 21 Sep 2004 13:03:21 -, Peter Scott <[EMAIL PROTECTED]> wrote: > In article <[EMAIL PROTECTED]>, > [EMAIL PROTECTED] (Jp) writes: > >The object of the code below is to output a list of space seperated fields > >with PID, username and process. The code generates te correct output. My > >gues

RE: simple windows process list

2004-09-21 Thread Bob Showalter
JP wrote: > The object of the code below is to output a list of space seperated > fields with PID, username and process. The code generates te correct > output. My guess is that my perl code can be smaller. Who dares? unpack() with 'A' is handy for extracting and removing trailing blanks in one st

Re: simple windows process list

2004-09-21 Thread Peter Scott
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Jp) writes: >The object of the code below is to output a list of space seperated fields >with PID, username and process. The code generates te correct output. My >guess is that my perl code can be smaller. Who dares? Don't care about smaller. Ca

simple windows process list

2004-09-21 Thread JP
The object of the code below is to output a list of space seperated fields with PID, username and process. The code generates te correct output. My guess is that my perl code can be smaller. Who dares? #!perl # # Object: # To output a tab separated list of PID, username and process # for windows