I am trying to write a function in bash that will do a find for a directory containing the passed value. Something like this:
function dfind () {
find / -type d -name "*$**"
}
What I want is for dfind test
to execute find / -type d -name "*test*"
I've tried escaping the globbing *'s, or the quotes, or both, but I can't get it to work.
The problem is not the function nor bash, but something wonky on the machine I was using. Identical function works on another FreeBSD machine.