Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
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: (6)
As of 2015-07-29 06:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (260 votes), past polls