In computer programming
, the verb glob
is used to refer to an instance of pattern matching
behavior. The noun glob
is sometimes used to refer to a particular pattern, e.g. "use the glob
*.log to match all those log files
Many command line interpreters (shells) such as Unix shells, cmd.exe and Windows PowerShell, provide globbing on filenames at the command line and in shell scripts.
The term glob is also used to refer more generally to limited pattern matching facilities of this kind in other contexts:
- Larry Wall's Programming Perl discusses glob in the context of the Perl language.
- Tcl contains both true regular expression matching facilities and a more limited kind of pattern matching often described as globbing.
- Python has a glob module in the standard library which performs wildcard pattern matching on filenames.
- Ruby has a glob method for the Dir class which performs wildcard patten matching on filenames. Several libraries such as Rant and Rake provide a FileList class which has a glob method or use the method FileList. identically.
is a Unix
library function that expands file names using a pattern-matching notation reminiscent of regular expression
syntax but without the expressive power of true regular expressions.