kill a process

Kaushal Shriyan kaushalshriyan at gmail.com
Wed Aug 9 06:22:58 UTC 2006


On 8/9/06, Wolfgang Leideck <wleideck at googlemail.com> wrote:
>
> Try following
>
> for pid in $(ps -ef | grep bdctest | grep -v root | grep -v grep | awk
> '{print $2}')
> do
>   kill -9 $pid
> done
>
> Wolfgang
>
> 2006/8/9, Kaushal Shriyan <kaushalshriyan at gmail.com>:
> >
> > Hi ALL
> >
> > I have to kill all processes which has owner as tester, If  there any
> > specific command to that or i have to write script, if i read a PID into
> > variable i cant kill the processes its not  getting killed below is the
> > script.
> >
> >  #!/bin/bash
> > ps -ef |grep bdctest | grep -v root | awk '{print $2}'>out
> >
> > while read line
> > do
> > kill -9  $line ; echo $?
> > done
> >
> > the process id is not moved to  the variable
> >
> >
> > Kaushal
> > --
> > fedora-list mailing list
> > fedora-list at redhat.com
> > To unsubscribe:
> > https://www.redhat.com/mailman/listinfo/fedora-list
> >
> >
>
>
> --
> Wolfgang Leideck
> Alberichstr. 14
> D - 68199 Mannheim
>
> --
> fedora-list mailing list
> fedora-list at redhat.com
> To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
>

Thanks Wolfgang :-)

Kaushal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/fedora-list/attachments/20060809/41013899/attachment-0001.htm>


More information about the fedora-list mailing list