Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: unpacking wmic command's unicode output

by goibhniu (Hermit)
on Nov 12, 2008 at 17:25 UTC ( [id://723220]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    @echo off
    wmic process |find /i "Caption" |perl -CS -ne "($caption,$commandline,
    +$ppid,$pid)=unpack('a[21] a[270] @798a[17] @899a[11]',$_);print '}',$
    +caption,'-',$ppid,'-',$pid,'-',$commandline,'{',$/;" |find /i "parent
    +"
    wmic process |find /i "%1" |perl -CS -ne "($caption,$commandline,$ppid
    +,$pid)=unpack('a[21] a[270] @798a[17] @899a[11]',$_);print '}',$capti
    +on,'-',$ppid,'-',$pid,'-',$commandline,'{',$/;" |find /v /i "find"
    
  2. or download this
    #!/usr/bin/perl -WCD
    
    ...
        }        
    }
    close(PROCINFO);
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://723220]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (6)
As of 2024-04-23 09:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found