#!/bin/csh # EndM5 # Do a proper end and shutdown of Mark5A or $1, if any # Revised: 2003 April 23, JAB # if ( "$1" == "" ) then set name = " Mark5A" # Not tstMark5A else set name = "$1" endif set tst = ` ps -A | grep -E -v "grep|$0:t" | grep "$name" ` if ( ${#tst} > 0 ) then echo "$0:t sending INTERRUPT to $name $tst[1] " kill -INT $tst[1] else echo "${0:t} ERROR: Can't find program $name " exit ( -1 ) endif