kevin, To answer your question, the 'greb' in your code is just part of a string, it won't produce any effect.

and if what you wish is to remove your own grep process, this command might do the trick.

ps -ef | grep hald-runner | grep -v grep

Tor.

kevin liu wrote:
Hello everyone:
    When I am using a pattern match to find my wanted process, things like
this:

*********************************************************************************************
    ps -ef | grep hald-runner
    root      5006  5005  0 Mar04 ?        00:00:00 hald-runner
    kevin     8261  3896  0 16:53 pts/10   00:00:00 grep hald-runner

*********************************************************************************************
    but I don't want the second process item, so I write this code to
filter:
    @array = qx{ps -ef | grep hald-runner};
    chomp @array;
    foreach ( @array ) {
        if (/grep hald-runner/) {
            next;
        }
    }

    Here my confusion comes: What the grep here will mean??
    Here "grep" is just a plain text or a verb which can help to grep
contents??

    Thank you in advance.


--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to