Hi All,
I am trying to to compare a string variable with a string literal inside a loop but keep getting the
./testifstructure.sh: line 6: [{BOOK1}: command not found
2
Please can anyone offer any advise.
Many thanks for your help
This is the test CODE follows:
#!/bin/sh
BOOK_LIST="BOOK1 BOOK2"
for BOOK in ${BOOK_LIST}
do
if [{$BOOK} = "BOOK1"]
then echo '1'
else
echo '2'
fi
done