[hobbit] to test the non-existence of a dir

Josh Luthman josh at imaginenetworksllc.com
Tue Mar 31 16:38:37 CEST 2009


Off the top of my head I think you want something like,

if {-d /this/subdir}
echo BBVAR=green
else
echo BBVAR=red

I'm sure I'm missing a lot, not looking at it right now.  Pretty sure -d
tests directories.

Josh Luthman
Office: 937-552-2340
Direct: 937-552-2343
1100 Wayne St
Suite 1337
Troy, OH 45373

Those who don't understand UNIX are condemned to reinvent it, poorly.
--- Henry Spencer


On Tue, Mar 31, 2009 at 10:29 AM, dOCtoR MADneSs <doctor at makelofine.org>wrote:

> Hi,
>
> Xymon allow me to test the non existence of file or directory. But I'd like
> a more complex test. In my case, I don't want any directory named
> _FIXED_PART_anything in a whole tree.
> Example :
>
> I've
> /toto/_FIXED_PART_1 -> test is red
> /toto/a/sub/directory/_FIXED_PART_hello_world -> test is red
>
> So, is there a "normal" way to use "files"  test included in xymon ?
>
> Regards,
> Damien
>
> To unsubscribe from the hobbit list, send an e-mail to
> hobbit-unsubscribe at hswn.dk
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20090331/a7f11ff7/attachment.html>


More information about the Xymon mailing list