Skip to main content
3 of 3
deleted 3 characters in body; edited tags
Jeff Schaller
  • 68.8k
  • 35
  • 122
  • 266

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 doesn't 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?