Date: Wed, 29 Oct 2008 20:02:43 -0200 From: "Eduardo Meyer" <dudu.meyer@gmail.com> To: stable@freebsd.org, questions@freebsd.org Subject: Script-friendly (parseble) ps(1) output? Message-ID: <d3ea75b30810291502h716ae979r9906a7a053ec5f56@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
Hello, I need to write a cgi script which will print the output from ps(1) in a table (html), so the average-operator can click on a KILL link and the cgi will send the selected signal. I need to add one ps information per column in a table (html), however, I found ps(1) output to be too hard to parse. There is no separator. I believed \t was the separator but its not. The ps(1) command I need to use is: ps -ax -o pid -o user -o emul -o lstart -o lockname -o stat -o command Since many of those args use [:space:] in the output, I can not use [:space:] as a separator. Sadly, `-o fiend='value'` will only format the HEADER output, not the values. Ive got no clue what to do, can someone enlight me? Thank you all in advance. -- =========== Eduardo Meyer pessoal: dudu.meyer@gmail.com profissional: ddm.farmaciap@saude.gov.br
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?d3ea75b30810291502h716ae979r9906a7a053ec5f56>