Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

unpacking wmic command's unicode output

by goibhniu (Hermit)
on Nov 11, 2008 at 19:38 UTC ( [id://722956]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    C:\CHAS_S~1\COLUMN~1>
    wmic process|find /i "Caption"
    ...
    TerminationDate  ThreadCount  UserModeTime  VirtualSize  
    WindowsVersion  WorkingSetSize  WriteOperationCount  
    WriteTransferCount
    
  2. or download this
    C:\CHAS_S~1\COLUMN~1>
    perl -ne "print" header.bin
    ...
    z e     W i n d o w s V e r s i o n     W o r k i n g S e t S i z e   
    +  W r i t
    e O p e r a t i o n C o u n t     W r i t e T r a n s f e r C o u n t
    C:\CHAS_S~1\COLUMN~1>
    
  3. or download this
    C:\CHAS_S~1\COLUMN~1>
    perl -ne "($caption,$commandline)=unpack('@2U[42] U[270]',$_);print $c
    +aption;" h
    eader.bin
    67
    
  4. or download this
    C:\CHAS_S~1\COLUMN~1>
    perl -ne "($caption,$commandline)=unpack('@2A[42] A[270]',$_);print $c
    +aption;" h
    ...
    perl -ne "($caption,$commandline)=unpack('@2a[42] a[270]',$_);print $c
    +aption;" h
    eader.bin
    C a p t i o n
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (4)
As of 2024-04-25 13:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found