Re: cron and command quote
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 presences or absence of the line for the grep itself
>>> being found in the ps output.
Exactly!
>>> But I may be missing something obvious?
>>
>> Both are legal, but && is really what he is looking for . . .
>
> Ahh! I wasn't paying enough attention to the overall design, I guess.
> It is obvious now that you would probably want to log only those cases
> where the commands were found (success, or true, for command 1, as you
> say). Otherwise you'd have many thousands of "nothin's happenin here"
> messages.
No Bob, actually your first interpretation was correct. Here is my OP:
I want to execute a cron task if I'm not burning CD/DVD. But the
actual command never get executed, even when I'm not burning CD/DVD. If I
redo the command from the command line, it is fine. . .
Hence my script work like this:
$ is_burning || echo not burning CD/DVD
not burning CD/DVD
--
Tong (remove underscore(s) to reply)
http://xpt.sourceforge.net/techdocs/
http://xpt.sourceforge.net/tools/
Reply to: