> 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 i recommend that you do the following otherwise the grep could show up in the ps ps -ef | grep [p]rocess > /etc/spli.txt > 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. awk '{print $2}' /etc/spli.txt