[[ ]]. Use a loop.[[ "$file" = index.{htm,html,php} ]] && echo "This is the main file"for main in index.{htm,html,php}
do
[[ "$file" = "$main" ]] && echo "This is the main file"
doneBrace expansions doesn't happen in [[ ]]. They will just
be interpreted literally.
Instead, use a for loop to iterate over values, and
apply your condition to each.
None.
ShellCheck is a static analysis tool for shell scripts. This page is part of its documentation.