On Wed, 29 Oct 2008 20:02:43 -0200, "Eduardo Meyer" <[EMAIL PROTECTED]> 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("<td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td>\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 missing. -- Polytropon >From Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... _______________________________________________ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "[EMAIL PROTECTED]"