Understand about GLOBBING (Glob Pattern)

In this tutorial, I will show you the syntax how to write a Glob Pattern

Ref: https://man7.org/linux/man-pages/man7/glob.7.html

Long ago, in UNIX V6, there was a program /etc/glob that would expand wildcard patterns. Soon afterward this became a shell built-in. These days there is also a library routine glob(3) that will perform this function for a user program.

Here is some basics about Glob:

  • *‘ (Asterisks) matches any string, including the empty string.
  • ?‘ (Question Marks) matches any single character.
  • [abc] Character classes (not allowed to be empty), same as Regular Expression
  • [a-z] range, same as Regular Expression

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *