#!/bin/ksh

## List all running processes and grep for the “program_name”
## make sure to ignore the grep process that is running (grep -v grep)
## The process id is the second column in the ps -ef statement

pid_var=`ps -ef | grep program_name | grep -v grep | awk ‘{print $2}’`

kill -9 $pid_var

## You might want to use “kill -9 $pid_var”