I'm trying to write a bash script that imports all users and for each account execute some action.
a="some account"
b="some account"
#... so on
USERS = #get imported
for ACCOUNT in $USERS; do
if ["$ACCOUNT" == "$a"] || ["$ACCOUNT" == "$b"] || ["$ACCOUNT" == "$c"] || ["$ACCOUNT" == "$d"]; then
echo "Skipping $ACCOUNT"
else
echo "this"
echo "this $ACCOUNT"
fi
done
But there seems to be an issue. For every account, I get following:
[thisis@anaccount: not found
I've tried getting rid of single brackets and place the entire if clause into a double bracket, but that resulted in the same error.
I've also deleted the double quotation marks for each variable calls, but that doesn't seem to be the issue.
Can anybody advise?