Thank you guys for your help. My problem is that I project to use this command 
to terminate a script when uninstalling the software, so I can't store the PID. 
This command will be integrated in the spec file of the RPM package. Here's the 
script I'll use, it may help someone else:

#!/bin/sh
# PYTHON SCRIPT PROCESS KILLER by GBO v0.1
# This script will look for all the lines containing $SOFTWARENAME in the 
process list, and close them

SOFTWARENAME='yoursoftware' #This is case insensitive
JOBPRESENT=$(ps -ef | grep -i $SOFTWARENAME | grep -v grep)
echo $JOBPRESENT
ps -ef | grep -i $SOFTWARENAME | grep -v grep | awk '{print $2}' | xargs kill
_________________________________________________________________
Pendant tout l'été, consultez vos emails Hotmail sur votre mobile !
http://www.messengersurvotremobile.com/?d=hotmail
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to