#! /pkg/gnu/bin/gawk -f # this script shows setting and clearing of cookies BEGIN { srand() "date" | getline x for (i=0; i<=9; i++) print "Set-Cookie: foo"i "=; expires=" x system("sleep 2") print "Set-Cookie: foo" int(10*rand()) "=" x print "Content-type: text/html\n" print "
" for (i in ENVIRON) print i,ENVIRON[i] }