killing a process when a user logout on FC3

Ankush Grover ankush174 at gmail.com
Tue Dec 27 08:38:05 UTC 2005


hey friends,

I wanted to kill a process when the user logout.When the user logs in one
can get the process id through this

ps -ef | grep  process > /etc/spli.txt

But how do I kill the process when the user logout(.bash_logout) well there
are  8 fields in /etc/spli.txt and the 2nd field is the pid  which is needed
by the kill command to end the process.

How do I extract the 2nd field from the file(/etc/spli.txt), I know awk or
with sed one can do it but I don't know these scripting tools.

Can anyone help me in solving this issue ?

I am using FC3.

Thanks & Regards

Ankush Grover
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/fedora-list/attachments/20051227/339bc236/attachment-0001.htm>


More information about the fedora-list mailing list