Skip to main content

Bash * directory wildcard not working in if statement using double brackets

This works:

if [ /a/*/b/file.asd -nt /c/d/file.asd ]; then echo "found new file"; fi 

This doesnt work:

if [[ /a/*/b/file.asd -nt /c/d/file.asd ]]; then echo "found new file"; fi 

Can someone please explain why /*/ is not working with double brackets ? :)