kill ve skriptu nefunguje
Jan Pechanec
jp at devnull.cz
Mon Oct 27 12:21:44 CET 2008
On Mon, 27 Oct 2008, Cizek.Milan wrote:
>Ahoj,
>lamu si hlavu s nasledujicim problemem. Mam sript, ktery poustim cronem kazdou minutu.
>
>#!/bin/sh
>kill -9 `ps ax | grep -v grep | grep 'test.pl [A-Z]' | awk '{print $1}'`
>
>for var in A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
>do
> nice -n 10 /home/milanc/scripts/dohled/test.pl $var &
>done
ps(1):
-a Display information about other users' processes as well as your
own. This will skip any processes which do not have a control-
ling teminal, unless the -x option is also specified. This can
be disabled by setting the security.bsd.see_other_uids sysctl to
zero.
tohle dela tvuj problem:
"will skip any processes which do not have a controlling terminal"
--
Jan Pechanec <jp (at) devnull (dot) cz>
http://www.devnull.cz
More information about the Users-l
mailing list