String compare with list in shell script

Hi ,

I am new to shell scripting.

below is my requirement :
1) while running my .sh i will pass a string
2) i have to extract a folder name under a /config folder
3) i need to compare a input string in the folder name list
4) if that is true i have to continue my job else i have to give the message to the user

here is my code :

if [ $# -ne 1 ]; then
echo "Invalid arguments!"
echo ""
echo "job Name: $(basename $0) "
echo " Please pass the environment variable "
return 1
else
env_name="$1"
fi
 
LIST="`ls -ltr conf/ | grep -v "total" | grep -v "pre_swh" | awk '{ print $NF "," }'`";
if ["$env_name" in "$LIST"]
then
echo "correct"
else
echo "incorrect"
fi
counter1=`expr $counter1 + 1`
#done

while running this am gettin the error
sample2.sh[25]: [test: not found. :mad:

Please anyone help me on this

if loop syntax is wrong

if [ "$env_name" = "$LIST" ] ; then

Thank you vidyadhar.

but still am getting the same error..

is any other way there for getting the folder name and compare that with the input string?

Regards,
Raji.