Re: kill a process

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 8/9/06, Wolfgang Leideck <wleideck@xxxxxxxxxxxxxx> 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@xxxxxxxxx>:
>
> 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@xxxxxxxxxx
> To unsubscribe:
> https://www.redhat.com/mailman/listinfo/fedora-list
>
>


--
Wolfgang Leideck
Alberichstr. 14
D - 68199 Mannheim

--
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list

Thanks Wolfgang :-)
 
Kaushal
-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux