I have the following ps
command to get particular properties of all the running processes along with some properties:
ps --no-headers -exo "uname,ppid,pid,etime,%cpu,%mem,args"
I wish to have it formatted in CSV so I can parse it. Note I have put the args at the end to make parsing easy; I don't think a ,
will exist in any of the other columns - please correct me if I am wrong.
How do I remove the whitespace?