Xymon Mailing List Archive search

xymon, xymon-rclient and md5sum checks

list Oliver
Tue, 9 Jun 2015 16:28:50 -0400
Message-Id: <CAOAEFMX-Oom0QFOA=GjvVAcAyAhRFzcqM1CvP=zCb1m=user-a16ac16c1358@xymon.invalid>

On Tue, Jun 9, 2015 at 3:55 PM, Root, Paul T <user-76fdb6883669@xymon.invalid> wrote:
Also, your solution doesn't work.

The test as written is testing that the variable $FILENAME is not null, and then testing to see if the file exists. Removing the -e just tests that the variable is not null twice.

The solution would be more like:
echo "if [ \"$FILENAME\" != \"\" -a -e \"$FILENAME\" ]; then"
Thanks - makes more sense now but I think you added an errant -e in
that solution :-)