Aug 20, 2002 #1 ubstek Programmer Feb 2, 2001 9 US Hello, We have apache web server installed on AIX 5.1. We want to dump "ps -ef | grep userid" on a web page. Can this be done. Thank you very much in advance
Hello, We have apache web server installed on AIX 5.1. We want to dump "ps -ef | grep userid" on a web page. Can this be done. Thank you very much in advance
Aug 20, 2002 #2 lancer73 Technical User Jun 27, 2002 35 US you could use a simple perl script and dump it in cgi-bin. call it with http://your.server/cgi-bin/script.pl?userid=someuser ----------------------------------------------------- use CGI qwstandard); $userid = param("userid" $title = "Process listing for $userid"; @lines = `/usr/bin/ps -ef | grep $userid`; print header, start_html($title), h1($title); foreach(@lines) { print p($_); } print end_html; ------------------------------------------------------- Upvote 0 Downvote
you could use a simple perl script and dump it in cgi-bin. call it with http://your.server/cgi-bin/script.pl?userid=someuser ----------------------------------------------------- use CGI qwstandard); $userid = param("userid" $title = "Process listing for $userid"; @lines = `/usr/bin/ps -ef | grep $userid`; print header, start_html($title), h1($title); foreach(@lines) { print p($_); } print end_html; -------------------------------------------------------
Aug 20, 2002 #3 chgwhat MIS Oct 6, 1998 206 CA I would not use this what if I entered that my user id was user01;cat /etc/passwd ?? Tony ... aka chgwhat When in doubt,,, Power out... Upvote 0 Downvote
I would not use this what if I entered that my user id was user01;cat /etc/passwd ?? Tony ... aka chgwhat When in doubt,,, Power out...
Aug 21, 2002 #4 jad Programmer Apr 7, 1999 1,195 GB after the '$userid = param("userid"' line you could add: $userid =~ tr/A-Za-z0-9_-//cd; or you could use: @lines = `/usr/bin/ps -ef`; foreach(@lines) { if /$userid/ { print p($_); } } or an equivalent. Upvote 0 Downvote
after the '$userid = param("userid"' line you could add: $userid =~ tr/A-Za-z0-9_-//cd; or you could use: @lines = `/usr/bin/ps -ef`; foreach(@lines) { if /$userid/ { print p($_); } } or an equivalent.
Aug 21, 2002 #5 lancer73 Technical User Jun 27, 2002 35 US heh...true, tony...too true thanks for the heads up Upvote 0 Downvote
Aug 22, 2002 Thread starter #6 ubstek Programmer Feb 2, 2001 9 US Thank you Lance73 and Jad.....You the "MAN" Upvote 0 Downvote