#! /bin/sh
# IBM_PROLOG_BEGIN_TAG 
# This is an automatically generated prolog. 
#  
# cmdtext720 src/cmdtext/usr/share/lib/ms/endnote 1.3 
#  
# Licensed Materials - Property of IBM 
#  
# COPYRIGHT International Business Machines Corp. 1992,1991 
# All Rights Reserved 
#  
# US Government Users Restricted Rights - Use, duplication or 
# disclosure restricted by GSA ADP Schedule Contract with IBM Corp. 
#  
# IBM_PROLOG_END_TAG 
# @(#)36	1.3 1/22/91 16:04:36
#
# COMPONENT_NAME: (CMDTEXT) Text Formatting Services
#
# FUNCTIONS:
#
# ORIGINS: 26, 27
#
#$Header:endnote 12.0$
#$ACIS:endnote 12.0$
#$Source: /ibm/acis/usr/src/usr.lib/ms/RCS/endnote,v $
: endnote - move footnotes to separate file

if test $# -eq 0
then
	dspmsg -s 3 macros.cat 23  "Usage: endnote textfile ...
	moves all footnotes to separate file of endnotes
	sends text, then endnotes, to standard output\n"
	exit
fi
if test -f endnotes
then
	dspmsg -s 3 macros.cat 24 "endnotes exist - mv or rm before proceeding\n"
	exit
fi

awk -f /usr/lib/ms/end.awk $*
cat endnotes
rm -f endnotes