expansion
Bash Join names by prefix
Expands matching variable names, joined by the first character of IFS inside double quotes; not their values.
Formal Syntax & Structure
bash syntaxbash
${!prefix*}Return Value
shell expansion result
Expands matching variable names, joined by the first character of IFS inside double quotes; not their values.
Working Example
Example Snippetbash
BM6_A=oneBM6_B=twoIFS=: printf '%s\n' "${!BM6_*}"