#!/bin/sh # use /bin/sh or /bin/ksh # # shql - version 1.1 # # DEFINE THESE setglobal SHQL_ROOT = '"/u/shql'" # system-wide database location setglobal EDITOR = $(EDITOR:=/usr/bin/vi) # default editor if EDITOR not defined setglobal SHELL = $(SHELL:=/bin/sh) # default shell if SHELL not defined setglobal AWK = 'mawk' # Unix table file postfixes: @ is attrib, ~ is data, % is view setglobal DEBUG = '"N'" # set to Y for debugging test $DEBUG = "Y" && set -x # uncomment for debugging #set -v setglobal UMASK = $[umask] umask 0000 # share database trap "echo \"Goodbye\" ; \ rm -f /tmp/$Pid /tmp/$Pidrow /tmp/$Pidjoin*" 0 1 2 3 15 set -h # remember functions if echo '\c' | grep -s c { # to adapt to System V vs. BSD 'echo' setglobal NOCR1 = ''-n'' # BSD setglobal NOCR2 = ''"" } else { setglobal NOCR1 = ''"" # System V setglobal NOCR2 = ''\c'' } setglobal NL = '' '' setglobal TAB = '' '' export _IFS TABLE CMD NOCR1 NOCR2 NL TAB setglobal _IFS = $IFS if test "X$1" = "X-q" { setglobal QUIET = '"Y'" shift } if test "X$1" = "X" { echo "Missing database name."