Glob (programming)

Glob (programming)

In computer programming, the verb glob or globbing 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 [http://www.faqs.org/docs/abs/HTML/globbingref.html "Advanced Bash-Scripting Guide, Chapter 19.2: Globbing"] (Mendel Cooper, 2003) has a concise set of examples of filename globbing patterns.]

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.

Etymology

glob() 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.

References

ee also

* regular expression
* wildcard character
* wildmat


Wikimedia Foundation. 2010.

Игры ⚽ Нужно сделать НИР?

Look at other dictionaries:

  • Glob — may refer to: * glob (programming), an instance of pattern matching behavior * Glob (TV series), an Italian comedy series * The Glob , a 1983 arcade game * Glob (comics), multiple fictional characters in the Marvel Comics universe * GLOB… …   Wikipedia

  • Pattern matching — In computer science, pattern matching is the act of checking some sequence of tokens for the presence of the constituents of some pattern. In contrast to pattern recognition, the match usually has to be exact. The patterns generally have the form …   Wikipedia

  • Wildcard character — For other meanings of wild card see wild card. The term wildcard character has the following meanings: TelecommunicationIn telecommunications, a wildcard character is a character that may be substituted for any of a defined subset of all possible …   Wikipedia

  • Guido van Rossum — infobox person name = Guido van Rossum birth date = image size = 150px known for = Python programming language birth place = Netherlands children = spouse = nationality = Dutch occupation = Programmer, Author website = [http://www.python.org/… …   Wikipedia

  • One-liner program — A one liner is textual input to the command line of an operating system shell that performs some function in just one line of input. The one liner can be An expression written in the language of the shell. The invocation of an interpreter… …   Wikipedia

  • Tcl — Запрос «TCL» перенаправляется сюда; о минидистрибутиве Linux см. Tiny Core Linux. Tcl Семантика: императивный …   Википедия

  • TCL — Семантика: императивный, скриптовый Тип исполнения: интерпретатор Появился в: 1988 г. Автор(ы): Джон Остераут Последняя версия: 8.5.7 / 15 апреля 2009 …   Википедия

  • Tool Command Language — Pour les articles homonymes, voir Tcl. Tcl Apparu en …   Wikipédia en Français

  • Comparison of command shells — For more details on this topic, see Shell (computing). A command shell is a command line interface computer program to an operating system. Contents 1 General characteristics 2 Interactive features 3 Programming features …   Wikipedia

  • Langage de programmation Tcl — Tool Command Language Pour les articles homonymes, voir Tcl. Apparu en 1988 …   Wikipédia en Français

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”