Jump to content

Glob (programming)

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by 213.237.41.196 (talk) at 11:51, 23 February 2004. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

Expand Unix filenames using wildcards.

Wildcards: * ?

Grouping characters: {} []

*.c all files with '.c' as extension.

hello.? all files starting with 'hello.' and one character as extension.

hello.[ch] all files having 'c' or 'h' as extension.

[a-d]*.jpeg all files beginning with 'a' to 'd' and having 'jpeg' as extension.

index.{htm,html} all files called either 'index.htm' or 'index.html'.

Glob is in family with Regular Expression.