#!/bin/bash term="math"; pid=`ps -ax | grep $term | grep -v grep | awk '{ print $1 }'` echo -n "killing $term (process $pid)..." kill -9 $pid term="Wolfram"; pid=`ps -ax | grep $term | grep -v grep | awk '{ print $1 }'` echo -n "killing $term (process $pid)..." kill -9 $pid term="NBImport"; pid=`ps -ax | grep $term | grep -v grep | awk '{ print $1 }'` echo -n "killing $term (process $pid)..." kill -9 $pid