2005-02-14から1日間の記事一覧

CGIデバッグ用shスクリプト

1 #!/bin/sh echo -e "Content-type: text/plain\n" env 2 #!/bin/sh decode () { awk 'BEGIN { RS = "&"; FS = "=" } {print $1 " = {" $2 "}\n"}' \ | /usr/local/bin/urldecode -p } echo -e "Content-type: text/plain\n" env echo -e "\n-- Get data --…

関数型shスクリプトによる掲示板

#!/bin/sh DATAFILE="data/bbs.txt" cat >> $DATAFILE; echo "" >> $DATAFILE cat << EOF Content-type: text/html <html><body><form method="post" action="$SCRIPT_NAME"> <textarea name="msg" rows="5" cols="80"></textarea><br/> <input type="submit" name="write" value="Write"/> </form> EOF cat $DATAFILE | se…</body></html>