** Start of listing of h2-awk.cgi ** #! /bin/sh awk -f h2.awk | sh ** End of listing of h2-awk.cgi ** Here is the directory entry for that file: -rwx------ 1 rem user 30 Aug 27 2004 h2-awk.cgi ^ Note user execute permission needed for all CGI scripts. ** Start of listing of h2.awk ** BEGIN {printf("echo 'Content-type: text/plain'\necho\n"); num_date=0; num_name=0} /.*/ { printf("echo 'Your POSTed form contents are \"%s\" currently.'\n", $0) } /date/ { num_date++ } /name/ { num_name++ } END { printf("echo\n"); if (num_date != 0) printf("echo 'You asked for \"date\", so here it is:'\ndate\n"); else printf("echo 'You did not ask for \"date\" this time.'\n"); printf("echo\n"); if (num_name != 0) printf("echo 'You asked for my name: Robert Elton Maas.'\n"); else printf("echo 'You did not ask for \"name\" this time.'\n"); } ** End of listing of h2.awk ** Here is the directory entry for that file: -rw------- 1 rem user 618 Aug 27 2004 h2.awk ^ Note user execute permission not needed for source file.