quot;${foo,,}"* ]] && echo ok
ok
If the variable is not empty, it also works normally :
# foo="A" ; [[ bar == *"${foo,,}"* ]] && echo ok
ok
I hope it's not already known, but I couldn't find anything on the net.
Thank you,
Corentin Peuvrel
}
But you cannot if you don't :
$ foobar() {:;}
-bash: syntax error near unexpected token `('
It's not really critical once you know it, but it's a little bit odd !
Thank you,
Corentin Peuvrel
prefix/suffix pattern, ...)
with an expansion of an array name which contain a non zero index, it
will still use the index 0.
Thank you,
Corentin Peuvrel