Hi, I once wrote this script. You may have to edit it first:
//----------------------------------------------------------------------
#!/bin/bash
killname() {
PIDS=`ps -Ayl | grep $name | gawk '{split("//",shift);print $3;}'`;
if [ "$PIDS" ];then
ps -p $PIDS; echo "kill?[Y/n]"; read text;
if [ "$text" == "n" ]; then echo abort;
else
for pid in $PIDS;do kill -9 $pid; done
fi;
fi;
}
name=jav;
killname;
name=sim;
killname;
name=ker;
killname;
name=gis;
killname;
name=Age;
killname;
name=civ;
killname;
//----------------------------------------------------------------------
On Sat, 21 May 2005, Ray U wrote:
> Hi,
>
> Does anyone know how to kill all the xterm's invoked
> by all.sh in a shell script? I would like to
> automate this rather than manually close each of those
> terminals at the end of the simulation. Thanks.
>
> Raymond
>
>
>
> Yahoo! Mail
> Stay connected, organized, and protected. Take the tour:
> http://tour.mail.yahoo.com/mailtour.html
>
> _______________________________________________
> robocup-rescue-s mailing list
> robocup-rescue-s@mailman.cc.gatech.edu
> https://mailman.cc.gatech.edu/mailman/listinfo/robocup-rescue-s
>
_______________________________________________
robocup-rescue-s mailing list
robocup-rescue-s@mailman.cc.gatech.edu
https://mailman.cc.gatech.edu/mailman/listinfo/robocup-rescue-s
This archive was generated by hypermail 2.1.3 : Tue 24 May 2005 - 12:35:55 GMT