Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Module to parse output from Unix ps command?

by talexb (Canon)
on Apr 10, 2013 at 17:43 UTC ( #1028015=note: print w/ replies, xml ) Need Help??


in reply to Module to parse output from Unix ps command?

Maybe I've missed something, but couldn't you just do a split on the output of ps and go from there? That way, you don't care about whether one of the columns pushes one of the later columns out of alignment. You could even track the maxwidth of each column, then dump out the data you've collected in a more efficient, 100% aligned format.

If I were doing this, I'd keep the first row and use that as a title for all of the other rows

Alex / talexb / Toronto

"Groklaw is the open-source mentality applied to legal research" ~ Linus Torvalds


Comment on Re: Module to parse output from Unix ps command?
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (7)
As of 2014-07-22 08:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (106 votes), past polls