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

Re: [Solved] grep and cron & command line



T o n g <mlist4suntong@yahoo.com>:
>  On Tue, 18 Mar 2008 10:54:46 -0700, Bob McGowan wrote:
> > 
> > What's happening is the grep you're running is sometimes finding itself. 
> 
>  That's exactly the reason. As you can see from my script that I've already

The lesson is, "ps | grep blah" will find "grep blah" in the ps list:

(0) phreaque /home/keeling_ ps aux | grep acpid
root        10  0.0  0.0      0     0 ?        S<   Mar13   0:00 [kacpid]
root      2228  0.0  0.1   1572   568 ?        Ss   Mar13   0:00 /usr/sbin/acpid -c /etc/acpi/events -s /var/run/acpid.socket
keeling  27188  0.0  0.1   3692   640 pts/2    R+   20:47   0:00 grep acpid

Note that last line.  It has nothing to do with whether acpid is
actually running or not.  Aka, noise.


-- 
Any technology distinguishable from magic is insufficiently advanced.
(*)    http://blinkynet.net/comp/uip5.html      Linux Counter #80292
- -    http://www.faqs.org/rfcs/rfc1855.html    Please, don't Cc: me.


Reply to: