I'm having a small issue, i'm running and cron task every 5 minutes which is looking text chain and replacing it with nothing.. In order to optmize something i would like to add a new function to my cronstrask : send me an email if it replaces something.. if the crontask does not find the chain no need to send a mail. I have no idea how to do that , maybe you can help me . Here is my current cron task :
find /home -type f | xargs sed -i 's$chain if would like to era$ $g'