Get an PID of particular process

Hi

I have written a shell script to find and kill the particular process. Here in shell script i have written the code like

cnt = $(ps -ef | grep Shree)
echo $cnt

I am getting the output

root 2326 2317 0 14:39:46 pts/1 0:28 Shree -f fdc.fbconf FDCapp.fbapp

Here I want to kill this process with the process ID 2326
but how can i get only the PID for the particular process. Process example i want to get only the pid of the process Shree which is 2326 and i want to kill the process using kill -9 2326

Anybaody help me .... ?

If you have the pidof command, use that. Otherwise, search this site for ps awk kill

Thanks for the quick response

here when i used pidof command it's giving the error like 'bad command'

But i have got the solution
I have used the command

PID=`ps -ef | grep Shree 'awk {print $2}'`
# this command gave me the exact process ID for the process Shree.
kill -9 $PID

:b: