Get list of variables whose name matches a certain pattern April 20, 2023 by Tarik Use the builtin command compgen: compgen -A variable | grep X