1-wire temp - cgi summary scri
  1. #!/bin/sh
  2. cat << EOF
  3. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  4. <html>
  5. <head>
  6. <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  7. <meta http-equiv="refresh" content="120">
  8. <title>Teploty @ 1-Wire</title>
  9. <link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
  10. <link rel="bookmark icon" href="favicon.ico" type="image/x-icon">
  11. </head>
  12. <body>
  13. <h2>Teploty @ 1-Wire</h2>
  14. EOF
  15.  
  16. echo '<table align="left" cellspacing="0" cellpadding="20" border="0">'
  17. echo '<tr><td><strong>Venku:</strong><br><font size="1px">(1-Wire, DS18B20, severní strana)</font></td><td>'$(cat ./teploty.txt |grep venku |awk '{print $2}')
  18. echo '</td></tr><tr><td><strong>Kuchyn?:</strong><br><font size="1px">(1-Wire, DS18B20)</font></td><td>'$(cat ./teploty.txt |grep kuchyne |awk '{print $2}')
  19. echo '</td></tr><tr><td><strong>Ložnice:</strong><br><font size="1px">(1-Wire, DS18B20)</font></td><td>'$(cat ./teploty.txt |grep loznice |awk '{print $2}')
  20. echo '</td></tr><tr><td><strong>Obývák:</strong><br><font size="1px">(1-Wire, DS18B20)</font></td><td>'$(cat ./teploty.txt |grep obyvak |awk '{print $2}')
  21. echo '</td></tr><tr><td><strong>Pracovna:</strong><br><font size="1px">(1-Wire, DS18B20)</font></td><td>'$(cat ./teploty.txt |grep pracovna |awk '{print $2}')
  22. echo '</td></tr><tr><td><strong>Topení:</strong><br><font size="1px">(LPT, SMT160-30, topení pracovna)</font></td><td>'$(cat ./teploty.txt |grep topeni |awk '{print $2}')
  23. echo '</td></tr><tr><td><font size="2px">?as posledního m??ení:</font></td><td><font size="2px">'$(cat ./teploty.txt |grep cas |awk '{print $2 " " $3}')
  24. echo '</font></td></tr></table>'
  25.  
  26. cat << EOF
  27. </body>
  28. </html>
  29. EOF
Parsed in 0.019 seconds