#!/bin/bash
# $Header: /home/appl/pro2pgsql/src/RCS/cln_rsvp.bash,v 1.1 2006/07/25 03:01:14 sauge Exp sauge $
#
# Used to remove amduus_rsvp from an SQL definitions file
# Thanks to Shane Dunn 
#


if [ "$1" = "" ]
then

  echo
  echo "This script removes the amduus_rsvp field from generated tables"
  echo 
  echo "$0 [file_to_clean] [name_of_new_file]"
  echo
  exit 1

fi

cat $1 | sed -e :a -e '$!N;s/,\n  amduus_rsvp varchar/ /;ta' -e 'P;D' > $2

