Globbing

Globbing is the procedure of

  • matching all filenames against a given pattern
  • expanding to all matching filenames

Unlike MSDOS, where the called program had to interpret the patterns, the globbing on UNIX® is done by the shell, the matched filenames are given as parameters to a called command:

$ cat *.txt
really executes
$ cat 1.txt 3.txt foobar.txt XXX.txt

The term "glob" originates back in the UNIX® days where an executable glob (from "global") existed which was used to expand pattern-matching characters. Later, this functionality was built into the shell. There's still a library function called glob() (POSIX®), which serves the same purpose.

See also

See also (article)

Discussion

Enter your comment. Wiki syntax is allowed:
 
dict/terms/globbing.txt · Last modified: 2010/12/17 04:11 by thebonsai

Fatal error: Out of memory (allocated 35913728) (tried to allocate 40 bytes) in /homepages/41/d13525936/htdocs/bash-hackers-site/wiki/lib/plugins/quickstats/db/php-local-browscap.php on line 15