#! /bin/sh PATH=/usr/ucb:/bin:/usr/bin:/usr/postgres/bin datab=${1:-geoville} 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 (g= 256; g > 64; g-=16) { printf "append geo_colors (colind=%d,red=%d,green=%d,blue=%d) \\g\n", \ i++, g, 0, 0 } for (g= 256; g > 64; g-=16) { printf "append geo_colors (colind=%d,red=%d,green=%d,blue=%d) \\g\n", \ i++, 0, g, 0 } for (g= 256; g > 64; g-=16) { printf "append geo_colors (colind=%d,red=%d,green=%d,blue=%d) \\g\n", \ i++, 0, 0, g } for (g= 256; g > 64; g-=16) { printf "append geo_colors (colind=%d,red=%d,green=%d,blue=%d) \\g\n", \ i++, g, g, g } }' < /dev/null | monitor $datab