We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
[[ ]]
[[ "$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" done
Brace 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.
for
None.
There was an error while loading. Please reload this page.