Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

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?

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (7)
As of 2015-11-26 19:14 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (706 votes), past polls