Skip to main content
IBM 
ShopSupportDownloads
IBM HomeProductsConsultingIndustriesNewsAbout IBM
IBM : developerWorks : Linux : Education - Tutorials
LPI certification 101 exam prep, Part 1
ZIPPDF (letter)PDF (A4)e-mail
Main menuSection menuFeedbackPreviousNext
5. Introducing wildcards
  


Understanding non-matches, continued page 4 of 11


Here's what happened. Normally, when we specify a pattern, that pattern matches one or more files on the underlying filesystem, and bash replaces the pattern with a space-separated list of all matching objects. However, when the pattern doesn't produce any matches, bash leaves the argument, wildcards and all, as is. So when "ls" can't find the file /usr/bin/asdf*jkl, it gives an error. The operative rule here is that glob patterns are expanded only if they match objects in the filesystem.


Main menuSection menuFeedbackPreviousNext
PrivacyLegalContact