On Wed, 29 Oct 2008 20:02:43 -0200, "Eduardo Meyer" wrote:
> 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.

If you can use awk, it's quite simple:

ps | awk -F " " 'NR > 1 {printf("%s%s%s%s%s\n", $1, $2, $3, $4, $5);}'

The only problem I see is that $5, the COMMAND field, is truncated
after the first space character, so command line arguments will be

>From Magdeburg, Germany

Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
freebsd-stable@freebsd.org mailing list
To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org"