Re: [nslu2-linux] Re: Display top process from web page
- On Mon, Jan 28, 2008 at 09:08:31PM -0000, doctordiller wrote:
> Yes that did the trick. Now I just need to figure out how to produceTo convert 'top' to a truly valid html (with DOCTYPE, html,
> valid html. How do I substitute the \n with <BR> ? Any ideas ?
head, body, etc.), you would want a modest perl or python script.
To just take care of '\n' -> '<BR>\n' for display on a non-fussy
browser, the following one-liner is sufficient:
top -bn1 | perl -pe 's/\n/<BR>\n/'
You could probably find perl, python, sed, or awk scripts on the
web that would do a more thorough job.