#!/bin/sh echo 'content-type: text/html' echo echo ' Apples Hall of Fame

APPLES HALL OF FAME


' echo '
' /usr/local/sql/bin/psql -d apples -q -t -F ' ' -c ' select user, maxscore from passwords order by maxscore desc;' | awk ' BEGIN { printf(""); printf("\n","Position", "Name","Points"); } { count = count+1; if ((count % 10) == 0) { printf("
%3s%-30s%5s
"); printf("\n","Position", "Name","Points"); } printf(""); printf("
%3s%-30s%5s
%3d%-30s%3d\n", count,$1,$2); } ' echo '
' # select score # from scores # where user='$QUERY_STRING';