bash cgi script
  1. #!/bin/sh
  2. cat << EOF
  3. Content-Type: text/html
  4.  
  5. <html>
  6. <head>
  7. <title>dmesg - mrdkoid @ localhost</title>
  8. </head>
  9. <body>
  10. <h1>dmesg:</h1>
  11. EOF
  12. $(dmesg > /tmp/dmesg.tmp)
  13. echo $(cat -E /tmp/dmesg.tmp |sed 's/\$/<br>/g') "<br>"
  14. $(rm /tmp/dmesg.tmp)
  15. cat << EOF
  16. </body>
  17. </html>
  18. EOF
Parsed in 0.003 seconds