On 12/17/2013 12:28 PM, David C. Rankin wrote:
On 12/17/2013 01:31 PM, ellanios82 wrote:
freshclam && clamscan -ri / && updatedb
Means
if freshclam; then if clamscan -ri /; then updatedb fi fi
If either freshclam or clamscan exit with a *nonzero* exit code, updatedb will not be run.
I suspect 'clamscan -ri /' rarely, if ever, exits with a 0 exit code. If you want it all on one line, why not:
freshclam && { clamscan -ri /; updatedb; }
That will do
if freshclam; then clamscan -ri / updatedb fi
This is all well and good, but there is no logical reason to only run updatedb iff clamscan exits with any particular code. The idea that you would NOT need an updated locate database unless clamscan exited cleanly makes no sense. Like saying you only sharpen your pencil if (and only if) you found no mushy grapes in the fruit bowl. -- _____________________________________ ---This space for rent--- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org