#!/bin/sh
#
# Shows the header of an rdbtable.
#

RCS_ID='$Id: nsq-header,v 0.9 1998/03/04 09:12:49 carlos Exp $'


my_name=$(basename $0)

while [ $# -ge 1 ] ; do
  case $1 in
	-h*) cat <<_EOH_

	    NoSQL operator: ${my_name}

Usage:  ${my_name}

Options:
    -help    Print this help info.

Extracts the header portion from an rdbtable.

$RCS_ID

			----------------------
NoSQL RDBMS, Copyright (C) 1998 Carlo Strozzi.
This program comes with ABSOLUTELY NO WARRANTY; for details
refer to the GNU General Public License.

You should have received a copy of the GNU General Public License
along with this program;  if not, write to the Free Software
Foundation, Inc., 675 Mass Ave., Cambridge, MA 02139, USA.
			----------------------

_EOH_
		exit 0
		;;
	*)	break ;;
  esac
done

${NSQAWK:-awk} -F"\t" '
i == 0 && $0 ~ /^#/ { print ; next }
i < 2 { print ; i++ ; next }
{ exit }'

exit 0
