[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-newbie
Subject:    Re: Is a process running ?
From:       Kees Cook <kees () oNsOdSPAMl ! org>
Date:       2003-07-28 16:32:29
[Download RAW message or body]

John T. Williams wrote:
> ps -A | grep -e "[ /]python2.1\>" 1> /dev/null 2> /dev/null

A quick short-cut for the last part:

ps -A | grep -e "[ /]python2.1\>" >/dev/null 2>&1

"1" (stdout) is used by default, and then 2>&1 takes "2" (stderr) and 
sends (>) it to the same location (&) as "1".

-- 
Kees

-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic