918-git-images-111dconfigfileconfigure-oglivegit-imageslgromero-new-oglivemainmaint-cronmount-efivarfsmultivmmultivm-ogboot-installerogClonningEngineogboot-installer-jenkinsoglive-ipv6test-python-scriptsticket-301ticket-50ticket-50-oldticket-577ticket-585ticket-611ticket-612ticket-693ticket-700ubu24tplunification2use-local-agent-oglivevarios-instalacionwebconsole3
Rev | Line | |
---|
[3f73876] | 1 | #!/bin/bash |
---|
| 2 | echo "Content-type: text/html" |
---|
| 3 | echo "" |
---|
| 4 | echo "<html><head><meta http-equiv='Refresh' content='5,URL=./LogCommand.sh'> <link rel='stylesheet' type='text/css' href='oglive.css' /> <title>Bash as CGI" |
---|
| 5 | echo "</title></head><body>" |
---|
| 6 | |
---|
| 7 | $(strings /tmp/command.log > /tmp/command.log.tmp) |
---|
| 8 | |
---|
| 9 | echo "<table>" |
---|
| 10 | |
---|
| 11 | echo "<tr>" |
---|
| 12 | |
---|
| 13 | |
---|
| 14 | echo "<TEXTAREA NAME='trackloghead' ROWS='13' COLS='175'>" |
---|
| 15 | #echo "$(head -n 10 /tmp/command.log.tmp | uniq)" |
---|
| 16 | echo "$(grep -v '^Elapsed:\|^Total [Tt]ime:\|^-\|^|\|^bytes\|^\[' /tmp/command.log.tmp | uniq | head -n 10)" |
---|
| 17 | echo "</TEXTAREA>" |
---|
| 18 | |
---|
| 19 | echo "</tr>" |
---|
| 20 | |
---|
| 21 | |
---|
| 22 | echo "<tr>" |
---|
| 23 | |
---|
| 24 | echo "<TEXTAREA NAME='tracklogtail' ROWS='2' COLS='175'>" |
---|
| 25 | #echo "$(tail -n 5 /tmp/command.log.tmp | uniq)" |
---|
| 26 | echo "$(grep '^Elapsed:\|^Total [Tt]ime:\|^-\|^|\|^bytes' /tmp/command.log.tmp | uniq | tail -n 2)" |
---|
| 27 | echo "</TEXTAREA>" |
---|
| 28 | |
---|
| 29 | |
---|
| 30 | echo "</tr>" |
---|
| 31 | |
---|
| 32 | echo "</table>" |
---|
| 33 | |
---|
| 34 | |
---|
| 35 | echo "</body></html>" |
---|
Note: See
TracBrowser
for help on using the repository browser.