: $Workfile:   kixcat.sh  $ $Revision:   1.0  $
#**********************************************************************#
#*                                                                    *#
#* Copyright (c) 2001 by Sun Microsystems, Inc.                       *#
#* All rights reserved.                                               *#
#*                                                                    *#
#**********************************************************************#


# kixcat
# Uses cat command to concatenate a bunch of user-specified
# files into user-specified target file
# params: C names of files to be concatenated 
#	  T name of target file
#         O tty for vi


CATFILES=""

set -- `getopt C:T:O: $*`

# while	options	to process
while test "$1"	!= "--"
do
    case $1 in
    -C)
	shift
	CATFILES="$CATFILES $1"
	;;
    -T)
	shift
	TARGETFILE=$1
	;;
    -O)
	shift
	DEVICE=$1
	;;
    esac
    shift
done

cat $CATFILES > $TARGETFILE          
vi $TARGETFILE < $DEVICE > $DEVICE
exit 0
