Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
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

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (7)
As of 2017-02-25 20:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?






    Results (368 votes). Check out past polls.