hideout:~# ps auwx | grep pine
sigquit 1379 0.6 1.9 5036 2476 tty1 S 18:41 0:00 pine
root 1386 0.1 1.1 4472 1476 tty3 S 18:41 0:00 pine
root 1395 0.0 0.3 1164 420 tty2 S 18:42 0:00 grep pine
hideout:~# pidof pine
1386 1379
hideout:~# ps auwx | grep pine | grep -v grep | awk '{print $2}'
1379
1386
hideout:~#
--
Octavian Popescu
http://hideout.art.ro
On Fri, 12 Jan 2001 [EMAIL PROTECTED] wrote:
> cum fac sa obtin acelasi rezultat ca si cu comanda pidof din redhat.
>
> am incercat asa
> #!/usr/bin/perl -w
>
> $procesele=`ps axuw|grep send|grep -v grep|cut -c 7-14`;
> foreach $proces ($procesele) {
> $OUT=`kill $proces`;
> print "Procesul $proces a fost kill: $OUT\n";
> }
>
>
>
> dar problema este ca $procesele este un singur camp, cum i-au cate o linie, sau alta
>idee, inafara de alua programul de pe alt computer
>
>
> C
>
>
>
> ---
> Send e-mail to '[EMAIL PROTECTED]' with 'unsubscribe rlug' to
> unsubscribe from this list.
>
---
Send e-mail to '[EMAIL PROTECTED]' with 'unsubscribe rlug' to
unsubscribe from this list.