I write the following shell script.
#! /bin/sh
foo=asdfqwer/asdfxv
if [ $foo = */* ]
then
    echo bad
else
    echo good
fi
in test command, we could compare string and pattern like this,
[ string = pattern ]
[ string == pattern ]
however, the above script always print "good" in the terminal and also has error as below:
[ : asdfqwer/asdfxv : unexpected operator
Can someone tells me why and how to compare a stirng and a pattern in shell scripting?