#! /bin/sh PATH=/usr/ucb:/bin:/usr/bin:$POSTGRESHOME/bin datab=${1:-geo} echo Creating geo_colors in database $datab awk ' BEGIN { printf "destroy geo_colors \\g\n" printf "create geo_colors (colind=int2,red=int2,green=int2,blue=int2) \\g\n" printf "append geo_colors (colind=1,red=255,green=255,blue=255) \\g\n" printf "append geo_colors (colind=2,red=0,green=0,blue=0) \\g\n" printf "append geo_colors (colind=3,red=255,green=255,blue=0) \\g\n" printf "append geo_colors (colind=4,red=255,green=0,blue=0) \\g\n" printf "append geo_colors (colind=5,red=0,green=255,blue=0) \\g\n" printf "append geo_colors (colind=6,red=0,green=0,blue=255) \\g\n" printf "append geo_colors (colind=7,red=255,green=180,blue=0) \\g\n" printf "append geo_colors (colind=8,red=0,green=180,blue=70) \\g\n" printf "append geo_colors (colind=63,red=255,green=0,blue=0) \\g\n" i= 9 for (r= 0; r < 4; r++) { for (g= 0; g < 4; g++) { for (b= 0; b < 3; b++) { printf "append geo_colors (colind=%d,red=%d,green=%d,blue=%d) \\g\n", \ i, r * 85, g * 85, b * 127 i++ } } } }' < /dev/null | monitor $datab