Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

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

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1028015]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (7)
As of 2018-01-17 08:15 GMT
Find Nodes?
    Voting Booth?
    How did you see in the new year?

    Results (196 votes). Check out past polls.