$HOLIDAY=""
if [ $TODAY == Tue && $HOLIDAY <> Mon ]
then
echo "1"
else
echo "2"
fi
Getting an error --test: ] missing...could some one help on this
$HOLIDAY=""
if [ $TODAY == Tue && $HOLIDAY <> Mon ]
then
echo "1"
else
echo "2"
fi
Getting an error --test: ] missing...could some one help on this
Should be ...
if [ "$TODAY" = Tue -a "$HOLIDAY" != Mon ]
Please use CODE TAGS when posting code, logfiles, input files, expected output, etc. Thanks.
Logical operators should be separated in two brackets.
if [ "$TODAY" = Tue ] && [ "$HOLIDAY" != Mon ]