<div dir="ltr">Folks, <div><br></div><div>I have a small bash script which watches a number of folders for files</div><div>added in the last 10 minutes: </div><div><br></div><div>($mydirs below is just a list of ftp folders which clients upload to ) </div>



<div><br></div><div>===================================================</div><div><div>find $mydirs -type f -a -cmin -10 -print > /tmp/filewatcher.count</div><div><br></div><div>if [ `wc -l /tmp/filewatcher.count | awk ' { print $1 } ' ` -gt 0 ]</div>



<div>then       </div><div>        # email me notification bla bla bla </div></div><div>        [ snip ]</div><div>fi<br></div><div>====================================================</div><div><br></div><div>So, this has been working fine but recently it's started giving me a </div>



<div>lot of false positives - i.e the 'if' statement is firing, but no files are found - is there </div><div>some shell expansion going of which I'm unaware, or is it the more likely PBKAC? <br><br></div>
Tid</div>