URI: 
       output2html.sh - reed-alert - Lightweight agentless alerting system for server
  HTML git clone git://bitreich.org/reed-alert/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/reed-alert/
   DIR Log
   DIR Files
   DIR Refs
   DIR Tags
   DIR README
   DIR LICENSE
       ---
       output2html.sh (1131B)
       ---
            1 #!/bin/sh
            2 
            3 awk -F'\t' \
            4     -v alert=1 \
            5     -v check=1 \
            6     -v params=1 \
            7     -v desc=1 \
            8     -v previousstate=1 \
            9     -v currentstate=1 \
           10     -v triggerstate=1 \
           11     -v count=1 '
           12 
           13 BEGIN {
           14     print "<html>"
           15     
           16     print "<body>"
           17     print "<table><thead><tr>"
           18     if(alert) { print "<th>Alert</th>" }
           19     if(check) { print "<th>check</th>" }
           20     if(params) { print "<th>params</th>" }
           21     if(desc) { print "<th>description</th>" }
           22     if(previousstate) { print "<th>previous-state</th>" }
           23     if(currentstate) { print "<th>current-state</th>" }
           24     if(triggerstate) { print "<th>trigger-state</th>" }
           25     if(count) { print "<th>count</th>" }
           26     print "</tr></thead><tbody>"
           27 }
           28 
           29 {
           30     print "<tr>"
           31     if(alert) { print "<td>"$1"</td>" }
           32     if(check) { print "<td>"$2"</td>" }
           33     if(params) { print "<td>"$3"</td>" }
           34     if(desc) { print "<td>"$4"</td>" }
           35     if(previousstate) { print "<td>"$5"</td>" }
           36     if(currentstate) { print "<td>"$6"</td>" }
           37     if(triggerstate) { print "<td>"$7"</td>" }
           38     if(count) { print "<td>"$8"</td>" }
           39     print "</tr>"
           40 
           41 }
           42 
           43 END {
           44     print "</tbody></table>"
           45     print "</body></html>"
           46 }'