#!/bin/sh echo -e -n "content-type: text/html\x0d\x0a" echo -e -n "transfer-encoding: chunked\x0d\x0a" echo -e -n "\x0d\x0a" echo "" echo "

lwstest script stdout

" >&2 echo "lwstest script stderr: $REQUEST_METHOD" echo "

REQUEST_METHOD=$REQUEST_METHOD

" if [ "$REQUEST_METHOD" = "POST" ] ; then >&2 echo "lwstest script stderr: doing read" echo "CONTENT_LENGTH=$CONTENT_LENGTH" read -n $CONTENT_LENGTH line >&2 echo "lwstest script stderr: done read" echo "read=\"$line\"" else echo "" echo "" cat /proc/meminfo | while read line ; do A=`echo "$line" | cut -d: -f1` B=`echo "$line" | tr -s ' ' | cut -d' ' -f2-` echo -e "" echo -e "" done echo "
/proc/meminfo
$A$B
" fi echo "
done" echo "" exit 0