Re: cron and command quote

2008-03-24 Thread David Fox
On Tue, Mar 18, 2008 at 11:51 AM, Jeff D <[EMAIL PROTECTED]> wrote: > so with || we get execute command1 OR command2, whic ever one executes > first. I don't believe that this would be the desired result in this > situation. Not precisely. According to "man bash" a sequence of command1 || comm

Re: cron and command quote

2008-03-18 Thread T o n g
On Tue, 18 Mar 2008 13:31:37 -0700, Bob McGowan wrote: >>> So, '||' is just as legal as '&&' and would do just as it does on the >>> command line, assuming of course there is nothing found by the grep. >>> >>> I don't think the problem is the use of the OR or AND operators. >>> Rather it's the

Re: cron and command quote

2008-03-18 Thread Bob McGowan
Jeff D wrote: Bob McGowan wrote: Jeff D wrote: || will not return true for you here, ever. you need to use && or use an if statement. Also, if you are going to be using a shell script you have to make sure that it exits properly. I would recommend putting the whole thing into a shell scrip

Re: cron and command quote

2008-03-18 Thread Jeff D
Bob McGowan wrote: Jeff D wrote: || will not return true for you here, ever. you need to use && or use an if statement. Also, if you are going to be using a shell script you have to make sure that it exits properly. I would recommend putting the whole thing into a shell script: if ps -eaf

Re: cron and command quote

2008-03-18 Thread Bob McGowan
Jeff D wrote: T o n g wrote: On Tue, 18 Mar 2008 03:40:35 +0100, s. keeling wrote: I.e., somehow, the 'ps | grep' was able to find something in cron, whereas when executed directly under shell: $ ps -eaf | grep -E 'cdrecord.* -[dts]ao |cdrdao *write|growisofs.*speed=' $ /bin/sh -c "

Re: cron and command quote

2008-03-18 Thread Bob McGowan
Jeff D wrote: T o n g wrote: On Tue, 18 Mar 2008 03:40:35 +0100, s. keeling wrote: I.e., somehow, the 'ps | grep' was able to find something in cron, whereas when executed directly under shell: $ ps -eaf | grep -E 'cdrecord.* -[dts]ao |cdrdao *write|growisofs.*speed=' $ /bin/sh -c "

Re: cron and command quote

2008-03-18 Thread Jeff D
T o n g wrote: On Tue, 18 Mar 2008 03:40:35 +0100, s. keeling wrote: I.e., somehow, the 'ps | grep' was able to find something in cron, whereas when executed directly under shell: $ ps -eaf | grep -E 'cdrecord.* -[dts]ao |cdrdao *write|growisofs.*speed=' $ /bin/sh -c "ps -eaf | grep -E

Re: cron and command quote

2008-03-18 Thread NN_il_Confusionario
On Tue, Mar 18, 2008 at 01:38:11PM +, T o n g wrote: > >> $ ps -eaf | grep -E 'cdrecord.* -[dts]ao |cdrdao > >> *write|growisofs.*speed=' > >> > >> $ /bin/sh -c "ps -eaf | grep -E 'cdrecord.* -[dts]ao |cdrdao > >> *write|growisofs.*speed='" > > * * * * *rootis_burning || logger

Re: cron and command quote

2008-03-18 Thread T o n g
On Tue, 18 Mar 2008 03:40:35 +0100, s. keeling wrote: >> I.e., somehow, the 'ps | grep' was able to find something in cron, whereas >> when executed directly under shell: >> >> $ ps -eaf | grep -E 'cdrecord.* -[dts]ao |cdrdao *write|growisofs.*speed=' >> >> $ /bin/sh -c "ps -eaf | grep -E

Re: cron and command quote

2008-03-17 Thread s. keeling
T o n g <[EMAIL PROTECTED]>: > > I.e., somehow, the 'ps | grep' was able to find something in cron, whereas > when executed directly under shell: > > $ ps -eaf | grep -E 'cdrecord.* -[dts]ao |cdrdao *write|growisofs.*speed=' > > $ /bin/sh -c "ps -eaf | grep -E 'cdrecord.* -[dts]ao |cdrdao

Re: cron and command quote

2008-03-17 Thread T o n g
On Sun, 16 Mar 2008 06:48:19 +0100, NN_il_Confusionario wrote: >> >> * * * * * rootps -eaf | grep -E 'cdrecord.* -[dts]ao |cdrdao >> >> *write|growisofs.*speed=' > /dev/null || logger get executed. >> >> PS. I'm sure the PATH is setup properly in my cron, so cron can find ps >> >> & grep. > >