Nagios 2 writes wrong number of files


Hello everybody,
I have problem with my script, here it is:


soubory=find /home/yeti/Maildir/ -follow -type f | wc -l

if $soubory -le 1000 ]]; then
echo OK, number of files is $soubory
exit 0
echo CRITICAL, number of files is $soubory
exit 2**

When I run it manually, it writes concrete number of files. But when Nagios runs it, there is always written 0. Could anyone help me? Thanks