In bash, can test -e look for a file with a semi-variable name using *? I have an if then looking for a certain set of files. They all start with lib, so I could either set an if then up for each one or I was hoping there's a way I can use an asterisk.

Here's what I have and what I tried.

 d=myfolder
 if [[ -e $d/lib* ]]; then
  mv /etc/launchd.conf $d/launchd.conf
 else
  2&gt;/dev/null; true
 fi


so as you can see, if any of those lib files are present I want to move the launchd.conf file as well. but the asterisk isn't doing it. Any ideas?
From man bash


[[ expression ]]
      Return a status of 0 or 1 depending on the evaluation of the conditional 
      expression expression.  Expressions  are composed  of  the primaries 
      described below under CONDITIONAL EXPRESSIONS. Word splitting and pathname
      expansion are not performed on the words between the [[ and ]]; tilde 
      expansion, parameter and variable  expansion,  arithmetic expansion, command 
      substitution, process substitution, and quote removal are performed.
      Conditional operators such as -f must be unquoted to be recognized as primaries.



Or in short, the pattern is not expanded.

A simple alternative could look like

if [[ $(echo $d/lib*) != "$d/lib*" ]]; then
    mv /etc/launchd.conf $d/launchd.conf
fi


Short explanation on how this works:


echo $d/lib* expands to a list of library files if any are present, this list is not equal to $d/lib* (which doesn't get expanded) so the mv is executed
OTOH if no library files are present, the echo returns the string $d/lib*, the != evaluates to false and the mv is not executed