Talk:Glob (programming)

From Wikipedia, the free encyclopedia
Jump to: navigation, search
WikiProject Computing (Rated Start-class)
WikiProject icon This article is within the scope of WikiProject Computing, a collaborative effort to improve the coverage of computers, computing, and information technology on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
Start-Class article Start  This article has been rated as Start-Class on the project's quality scale.
 ???  This article has not yet received a rating on the project's importance scale.

opposition to proposed merge[edit]

Someone suggested that this article be merged with Wildcard character. I do not think merging it with any other pattern matching article would be a good idea, because "globbing" and "glob" do have a specific technical meaning: they refer to a particular pattern matching behavior. Those who know this will come here looking for a page about that specific behavior. I think it would be better to leave this as its own page, and add cross-references to pages about other sorts of pattern matching as appropriate. --Karl Fogel 19:28, 22 March 2008 (UTC)

disambiguation - minor use of word[edit]

I was wondering how common the use of the word glob to describe units of 8 bytes was?
In this case 1Glob = 64bits
1bit = 1^3 bits, 1 'cubic' bit
1Byte = 2^3 bits 1 'cubic' '2bit' 'volume'
1Glob= 4^3 bits, 1 'cubic' '4bit' 'volume'
obviously a '3bit' volume is not used.
?????HappyVR 12:00, 16 April 2006 (UTC)

Two unrelated meanings on one page[edit]

The TV show has nothing to do with the Unix command. If it is notable, please give it a separate article and create a disambiguation page offering the choice of TV show and Unix command. 10:42, 30 October 2006 (UTC)

I agree LeinadSpoon 00:22, 1 March 2007 (UTC)
I support this idea. Tim.bounceback(talk | contribs | ubxen) 21:29, 31 March 2007 (UTC)
I agree as well. Meliadoul 02:05, 10 April 2007 (UTC)

Guido's "perl" module[edit]

Looks like someone's determined to give Guido credit for code that he didn't write - the Perl module. Would be nice if your edits were fact-based. Tedickey (talk) 23:52, 27 November 2008 (UTC)

For the record, the perl module was

The Perl interface was written by Nathan Torkington <>, and is released under the artistic license. Further modifications were made by Greg Bacon <>, Gurusamy Sarathy <>, and Thomas Wegner <>.

. Tedickey (talk) 23:57, 27 November 2008 (UTC) For the record, the C code in 4.3 BSD is cited

* Copyright (c) 1989 The Regents of the University of California.

* All rights reserved. * * This code is derived from software contributed to Berkeley by * Guido van Rossum.

which appears to show that other people worked on the code. It would be nice to inject some facts. Tedickey (talk) 00:03, 28 November 2008 (UTC)

The 4.3 BSD code, of course, can be found in TUHS - start by reading it, and come back with some concrete evidence of how "derived" the perl module is. No original research, of course. Tedickey (talk) 00:04, 28 November 2008 (UTC)

For the record, I am not in any way determined to give Guido credit for code that he didn't write. Actually, I feel kind of offended that you are suggesting things like this here instead of discussing any such accusations on my personal talk page.
I had good intentions, but I guess I misinterpreted the linked website and I admit that my revert was a mistake. Ghettoblaster (talk) 18:18, 28 November 2008 (UTC)
thanks - I think that Guido's involvement is covered in the first paragraph (python). "mimics" might not be the best choice of word, but others ("imitated" or "emulated") seem less apt. "Derived" always carries with it the implication that there's some clearly definable feature which is inherited. I seem to recall running into some discussion long ago of Guido's code versus the Perl, and (as then) see that there's no apparent derivation other than the notion of providing a similar feature. Tedickey (talk) 18:47, 28 November 2008 (UTC)
What about "based on"? Having said that, I think the name of the function implies they are all based on the same thing. --Hm2k (talk) 19:25, 28 November 2008 (UTC)
When I see "based on", I want to know what was reused. Here none of the implementation was reused, just the general idea. Since there was previously-implemented globbing in some applications, the concept is not new. There might be some specific nomenclature in Guido's library routine which is not pre-existing (needs investigation), or in some sense making a reusable interface. To me "based on" is vague since it can cover a wide range of reuse (from general idea, detailed idea through cut/paste). I'd want to see what was the impetus for developing the Perl module and in doing so, mentioning the BSD glob. Tedickey (talk) 19:50, 28 November 2008 (UTC)
"loosely based on the concept of" - use it in whatever context you so wish. --Hm2k (talk) 19:59, 28 November 2008 (UTC)
that's better Tedickey (talk) 20:04, 28 November 2008 (UTC)


What is the origin of the use of the English word 'glob' to indicate wildcarding? —Preceding unsigned comment added by (talk) 23:05, 21 May 2010 (UTC)

The man page just says cryptically "glob -- global", so I guess we know for a fact that glob is short for global, but why "global" is still unclear. Richard W.M. Jones (talk) 21:27, 24 September 2010 (UTC)
Perhaps it's simply invented jargon (rather than using "wildcard expansion"). There's a lot of NIH from that quarter TEDickey (talk) 21:34, 24 September 2010 (UTC)

Restricted to the file system?[edit]

It's my understanding that "globbing" is a term used only when the search is done over the file system. That's how it works in the shells I know, in Perl and in the Python 'glob' module – you cannot glob over a list of strings, and using grep(1) to filter lines from a file is not considered globbing. The article only seems to reflect this indirectly.

I have no reference for this though. Just the GNU libc manual, which says

The archetypal use of wildcards is for matching against the files in a directory, and making a list of all the matches. This is called "globbing".

JöG (talk) 10:03, 30 December 2010 (UTC)

I don't believe it is restricted to file systems. As an example, expect/tcl uses the term "glob pattern" to match against any input. I think the lead should probably be changed to more generic terms, but I won't touch it for now. Byates5637 (talk) 01:24, 6 November 2015 (UTC)

cmd.exe to glob?[edit]

The section Implementations calls out cmd.exe as a program that performs globbing. I believe this is actually a counter-example. At least in the bad old days of, the called program has to glob for itself because the shell did not do it.

Jeberle (talk) 03:46, 6 July 2011 (UTC)

As I recall it, neither does globbing. googling on "cmd.exe wildcards" suggests that's correct - that cmd.exe does not do wildcard expansion. Interesting, filename-completion is described here as a special case of wildcard expansion TEDickey (talk) 09:47, 6 July 2011 (UTC)

Meaning of ? in MS-DOS[edit]

According to the table, ? in COMMAND.COM and cmd.exe matches 0 or 1 characters, but in reality its behavior is the same as in UNIX: it matches exactly one character. Thus, CA?T.TXT will match CART.TXT and CAST.TXT but not CAT.TXT.

However, the pattern CAT?.TXT does match CAT.TXT. This is because, internally, this file name is stored as CAT·····TXT, with 5 blank characters after CAT, and unlike in UNIX-like systems, the ? can match these blank characters. —Cousteau2 (talk) 00:23, 17 February 2014 (UTC)

Type column in Syntax Table[edit]

The entry in this column is the same for every row, it is really necessary? Brvman 22:22, 13 August 2014 (UTC) — Preceding unsigned comment added by Brvman (talkcontribs)

It isn't the same for every row. --Matthiaspaul (talk) 09:47, 14 August 2014 (UTC)


Classes in have their own definition of globbing that supports ** and also supports choice from a set of possibilities using {a,b,c}. See Might be worth including? Sorry for not just doing it myself - might come back and do it if I find time... (talk) 04:14, 17 February 2015 (UTC)

Might be. Odd that the curly-brace thing is not mentioned here (a csh feature from long ago). The "**" idea isn't new with Java (VMS provided a way to reference wildcards across directory levels, using different syntax, that was the inspiration for "ellipsis" in vi-like-emacs more than 20 years ago). TEDickey (talk) 09:23, 17 February 2015 (UTC)

Micorsoft Office[edit]

I have noticed that MS Excel and MS Word support globbing in their respective search (and replace) dialog boxes (MS Sharepoint at least does not support it). They do it each their own way (tested in MS Office 2007 SP3):

  • Excel supports ? (exactly one char) and * (any string) but no groups or ranges, the escape character being ~ (tilde).
  • Word supports a wide range of what they call "Special characters" (a whole subset of regular expression operators) beyond who we can find ? and * (you must check a box in the "options" frame of the search dialog to enable it).

Since SAP globbing is mentionned, could be worth adding MS Office as well. --GinkoAloe (talk) 13:07, 1 June 2015 (UTC)