I'm attempting to deploy a script to scan for changed files and scan them. This is a Linux script that I've been trying to get to work and searched here and around the web. I get syntax errors using the [CMD="find"] -wholename[/CMD] right out of the gate with 7.2. How can I change this to work with FreeBSD 7.2?
Thanks!
Code:
#!/usr/local/bin/bash
# Log location
LOG=/var/log/clamav/scan.log
# .....
find / -not -wholename '/sys/*' -and -not -wholename '/proc/*' -mmin -61 -type f -print0 | xargs -0 -r clamscan --exclude-dir=/proc/ --exclude-dir=/sys/ --quiet --infected --log=${LOG}
Thanks!