#!/bin/csh
#	@(#)seeapp	1.2	3/25/92
#
#
#
#     $Id: seeapp,v 1.1 1998/03/16 20:02:58 avvede Exp $
#     $Log: seeapp,v $
#     Revision 1.1  1998/03/16 20:02:58  avvede
#     Initial move to CVS
#
#
#
#	Copyright (c) 1986, 1987, 1988 by
#	Periphonics Corporation
#	4000 Veterans Memorial Highway
#	Bohemia
#	NY 11716
#
#	This software is furnished under a license and may be used and
#	copied only in accordance with the terms of such license and with
#	the inclusion of the above copyright notice. This software or any
#	other copies thereof, may not be provided or otherwise made available
#	to anyone other than the licensee. Title to and ownership of this
#	software remains with the Periphonics Corporation.
#
#	The information in this document is subject to change without notice
#	and should not be construed as a commitment by Periphonics.
#
#	Periphonics assumes no responsibility for the use or reliability of
#	its software on equipment that is not supplied by Periphonics.
#
#	File Name:
#		makeapp
#
#	Description:
#		Procedure to produve VRAM applications.
#		See usage line below.
#
#	Change				Reason
#	No.	Date		Name	for Change
#
#	0	19-mar-92	lmg	Original.
#	1	25-mar-92	rww	Quote $1 in set.
#
#
#	check argument count
#
if ($#argv < 2) then
	if ($#argv < 1) then
		echo "usage: see application_name [identifyingstring]"
		exit 1
	else
		set grepexp="$1"
	endif
else
	set grepexp="(($1).*($2))|(($2).*($1))"
endif
#
#	First, look in the ps for all lines containing the requested
#	strings.  Then, throw away the greps, convert to kill commands
#	and execute them.
#
set what=`which ps | grep ucb`
if ( "$what" == "" ) then
	set arg=-ef
else
	set arg=-ax
endif
ps $arg | \
egrep -e "${grepexp}" | egrep -v "grep|csh|see"
