Stack Exchange
In Shell, dot in string cause -eq operation fail with error: syntax error: operand expected (error token is "\.test")
This works fine:
if [[ "test" -eq "test" ]]
then
    echo "test compare"
fi

But it fails if I add a dot 
if [[ ".test" -eq ".test" ]]
then
    echo "test compare"
fi

syntax error: operand expected (error token is ".test")

The -eq operator is used to compare integers, no strings.
You need to use = or == to compare strings properly:
if [[ '.test' = '.test' ]]
then
    echo "test compare"
fi

