ellanios82 -- ...and then ellanios82 said... % % Hello List, Hiya! % % - how to get my script to update 'locate' database, after doing clamAV % scan ? % ... % freshclam && clamscan -ri / && updatedb [snip] First freshclam will run, no matter what. If freshclam exits with a 0 status, which generally means "everything went successfully", then clamscan will run; if it doesn't, then all stops and your script is done. If clamscan exits with a 0, then updatedb will run; if it doesn't, then all stops and your script is done. If updatedb exits with a 0, then your script will exit with a 0; if it doesn't (or if anything didn't before now), your script will exit with that same non-zero exit code. Since you report that updatedb is not running, I would start by checking on clamscan. You might rewrite this as if freshclam then echo "freshclam succeeded; moving on" >&2 if clamscan -ri / then echo "clamscan succeeded; moving on" >&2 if updatedb then echo "updatedb succeeded; we're done" >&2 else echo "updatedb exited with a $? status!" >&2 exit $? fi else echo "clamscan exited with a $? status!" >&2 exit $? fi else echo "freshclam exited with a $? status!" >&2 exit $? fi to verify each step. Season to taste :-) HTH & Happy Holidays :-D -- David T-G See http://justpickone.org/davidtg/email/ See http://justpickone.org/davidtg/tofu.txt