Files
JargonFile/original/html/G/glob.html

18 lines
3.4 KiB
HTML
Raw Normal View History

2014-03-27 18:54:56 +00:00
<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>glob</title><link rel="stylesheet" href="../../jargon.css" type="text/css"/><meta name="generator" content="DocBook XSL Stylesheets V1.61.0"/><link rel="home" href="../index.html" title="The Jargon File"/><link rel="up" href="../G.html" title="G"/><link rel="previous" href="glitch.html" title="glitch"/><link rel="next" href="glork.html" title="glork"/></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">glob</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="glitch.html">Prev</a><EFBFBD></td><th width="60%" align="center">G</th><td width="20%" align="right"><EFBFBD><a accesskey="n" href="glork.html">Next</a></td></tr></table><hr/></div><dt><a id="glob"/><dt xmlns="" id="glob"><b>glob</b>: <span xmlns="http://www.w3.org/1999/xhtml" class="pronunciation">/glob/</span>, <span xmlns="http://www.w3.org/1999/xhtml" class="emphasis"><em>not</em></span>, <span xmlns="http://www.w3.org/1999/xhtml" class="pronunciation">/glohb/</span>, <span xmlns="http://www.w3.org/1999/xhtml" class="grammar">v.,n.</span></dt></dt><dd><p> [Unix; common] To expand special characters in a wildcarded name, or
the act of so doing (the action is also called <span class="firstterm">globbing</span>). The Unix conventions for filename
wildcarding have become sufficiently pervasive that many hackers use some
of them in written English, especially in email or news on technical
topics. Those commonly encountered include the following:</p><div class="informaltable"><table border="1"><colgroup><col/><col/></colgroup><tbody><tr><td>*</td><td>wildcard for any string (see also <a href="../U/UN-asterisk-X.html"><i class="glossterm">UN*X</i></a>)
</td></tr><tr><td>?</td><td>wildcard for any single character (generally read this way only at the
beginning or in the middle of a word)
</td></tr><tr><td>[]</td><td>delimits a wildcard matching any of the enclosed characters
</td></tr><tr><td>{}</td><td>alternation of comma-separated alternatives; thus, &#8216;foo{baz,qux}&#8217;
would be read as &#8216;foobaz&#8217; or &#8216;fooqux&#8217;</td></tr></tbody></table></div><p>Some examples: &#8220;<span class="quote">He said his name was [KC]arl</span>&#8221; (expresses
ambiguity). &#8220;<span class="quote">I don't read talk.politics.*</span>&#8221; (any of the
talk.politics subgroups on <a href="../U/Usenet.html"><i class="glossterm">Usenet</i></a>). Other examples
are given under the entry for <a href="../X/X.html"><i class="glossterm">X</i></a>. Note that glob
patterns are similar, but not identical, to those used in
<a href="../R/regexp.html"><i class="glossterm">regexp</i></a>s.</p><p>Historical note: The jargon usage derives from <b class="command">glob</b>, the name of a subprogram that expanded
wildcards in archaic pre-Bourne versions of the Unix shell.</p></dd><div class="navfooter"><hr/><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="glitch.html">Prev</a><EFBFBD></td><td width="20%" align="center"><a accesskey="u" href="../G.html">Up</a></td><td width="40%" align="right"><EFBFBD><a accesskey="n" href="glork.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">glitch<EFBFBD></td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"><EFBFBD>glork</td></tr></table></div></body></html>