Scripting Question

This script searches for core files and if it finds one, it emails me to let me know.I DONT want it to email me if it doesn't find one but I can't figure out what I need to change or add. Any thoughts? Script below:

/bin/find / -name core -type f -ls -exec file {} \;|/usr/bin/mailx -s "`hostname`: corefiles" me@nunsuch.com

Thanks

You could try piping to a shell script
instead of mailx. The shell script can then
determine if it should send an email based
on the stdin.