3 echo -e -n "content-type: text/html\x0d\x0a"
4 echo -e -n "transfer-encoding: chunked\x0d\x0a"
8 echo "<h1>lwstest script stdout</h1>"
9 >&2 echo "lwstest script stderr: $REQUEST_METHOD"
11 echo "<h2>REQUEST_METHOD=$REQUEST_METHOD</h2>"
13 if [ "$REQUEST_METHOD" = "POST" ] ; then
14 >&2 echo "lwstest script stderr: doing read"
15 echo "CONTENT_LENGTH=$CONTENT_LENGTH"
16 read -n $CONTENT_LENGTH line
17 >&2 echo "lwstest script stderr: done read"
22 echo "<tr><td colspan=\"2\" style=\"font-size:120%;text-align:center\">/proc/meminfo</td></tr>"
23 cat /proc/meminfo | while read line ; do
24 A=`echo "$line" | cut -d: -f1`
25 B=`echo "$line" | tr -s ' ' | cut -d' ' -f2-`
26 echo -e "<tr><td style=\"background-color:#f0e8c0\">$A</td>"
27 echo -e "<td style=\"text-align:right\">$B</td></tr>"