./ 40775 436 0 0 7374257646 7361 5ustar chetwheeldoc/ 40775 436 0 0 7374257650 7764 5ustar chetwheeldoc/article.ps100664 436 0 250336 5654257574 12125 0ustar chetwheel%!PS-Adobe-3.0 %%Creator: groff version 1.08 %%DocumentNeededResources: font Times-Bold %%+ font Times-Italic %%+ font Times-Roman %%+ font Courier %%DocumentSuppliedResources: procset grops 1.08 0 %%Pages: 11 %%PageOrder: Ascend %%Orientation: Portrait %%EndComments %%BeginProlog %%BeginResource: procset grops 1.08 0 /setpacking where{ pop currentpacking true setpacking }if /grops 120 dict dup begin /SC 32 def /A/show load def /B{0 SC 3 -1 roll widthshow}bind def /C{0 exch ashow}bind def /D{0 exch 0 SC 5 2 roll awidthshow}bind def /E{0 rmoveto show}bind def /F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def /G{0 rmoveto 0 exch ashow}bind def /H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def /I{0 exch rmoveto show}bind def /J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def /K{0 exch rmoveto 0 exch ashow}bind def /L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def /M{rmoveto show}bind def /N{rmoveto 0 SC 3 -1 roll widthshow}bind def /O{rmoveto 0 exch ashow}bind def /P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def /Q{moveto show}bind def /R{moveto 0 SC 3 -1 roll widthshow}bind def /S{moveto 0 exch ashow}bind def /T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def /SF{ findfont exch [exch dup 0 exch 0 exch neg 0 0]makefont dup setfont [exch/setfont cvx]cvx bind def }bind def /MF{ findfont [5 2 roll 0 3 1 roll neg 0 0]makefont dup setfont [exch/setfont cvx]cvx bind def }bind def /level0 0 def /RES 0 def /PL 0 def /LS 0 def /PLG{ gsave newpath clippath pathbbox grestore exch pop add exch pop }bind def /BP{ /level0 save def 1 setlinecap 1 setlinejoin 72 RES div dup scale LS{ 90 rotate }{ 0 PL translate }ifelse 1 -1 scale }bind def /EP{ level0 restore showpage }bind def /DA{ newpath arcn stroke }bind def /SN{ transform .25 sub exch .25 sub exch round .25 add exch round .25 add exch itransform }bind def /DL{ SN moveto SN lineto stroke }bind def /DC{ newpath 0 360 arc closepath }bind def /TM matrix def /DE{ TM currentmatrix pop translate scale newpath 0 0 .5 0 360 arc closepath TM setmatrix }bind def /RC/rcurveto load def /RL/rlineto load def /ST/stroke load def /MT/moveto load def /CL/closepath load def /FL{ currentgray exch setgray fill setgray }bind def /BL/fill load def /LW/setlinewidth load def /RE{ findfont dup maxlength 1 index/FontName known not{1 add}if dict begin { 1 index/FID ne{def}{pop pop}ifelse }forall /Encoding exch def dup/FontName exch def currentdict end definefont pop }bind def /DEFS 0 def /EBEGIN{ moveto DEFS begin }bind def /EEND/end load def /CNT 0 def /level1 0 def /PBEGIN{ /level1 save def translate div 3 1 roll div exch scale neg exch neg exch translate 0 setgray 0 setlinecap 1 setlinewidth 0 setlinejoin 10 setmiterlimit []0 setdash /setstrokeadjust where{ pop false setstrokeadjust }if /setoverprint where{ pop false setoverprint }if newpath /CNT countdictstack def userdict begin /showpage{}def }bind def /PEND{ clear countdictstack CNT sub{end}repeat level1 restore }bind def end def /setpacking where{ pop setpacking }if %%EndResource %%IncludeResource: font Times-Bold %%IncludeResource: font Times-Italic %%IncludeResource: font Times-Roman %%IncludeResource: font Courier grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72 def/PL 792 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron/Zcaron/scaron/zcaron /Ydieresis/trademark/quotesingle/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/space /exclam/quotedbl/numbersign/dollar/percent/ampersand/quoteright/parenleft /parenright/asterisk/plus/comma/hyphen/period/slash/zero/one/two/three/four /five/six/seven/eight/nine/colon/semicolon/less/equal/greater/question/at/A/B/C /D/E/F/G/H/I/J/K/L/M/N/O/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash /bracketright/circumflex/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q /r/s/t/u/v/w/x/y/z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase /guillemotleft/guillemotright/bullet/florin/fraction/perthousand/dagger /daggerdbl/endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut /dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash /quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen/brokenbar /section/dieresis/copyright/ordfeminine/guilsinglleft/logicalnot/minus /registered/macron/degree/plusminus/twosuperior/threesuperior/acute/mu /paragraph/periodcentered/cedilla/onesuperior/ordmasculine/guilsinglright /onequarter/onehalf/threequarters/questiondown/Agrave/Aacute/Acircumflex/Atilde /Adieresis/Aring/AE/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute /Icircumflex/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis /multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn/germandbls /agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla/egrave/eacute /ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis/eth/ntilde/ograve /oacute/ocircumflex/otilde/odieresis/divide/oslash/ugrave/uacute/ucircumflex /udieresis/yacute/thorn/ydieresis]def/Courier@0 ENC0/Courier RE/Times-Roman@0 ENC0/Times-Roman RE/Times-Italic@0 ENC0/Times-Italic RE/Times-Bold@0 ENC0 /Times-Bold RE %%EndProlog %%Page: 1 1 %%BeginPageSetup BP %%EndPageSetup /F0 12/Times-Bold@0 SF(Bash \255 The GNU shell*)227.904 120 Q/F1 10 /Times-Italic@0 SF(Chet Rame)263.85 144 Q(y)-.3 E(Case W)221.72 156 Q (estern Reserve Univer)-.92 E(sity)-.1 E -.15(ch)250.425 168 S(et@po.cwru.edu) .15 E/F2 10/Times-Bold@0 SF 2.5(1. Intr)72 234 R(oduction)-.18 E(Bash)97 249.6 Q/F3 10/Times-Roman@0 SF .904(is the shell, or command language interpreter) 3.404 F 3.404(,t)-.4 G .904(hat will appear in the GNU operating system.) 316.032 249.6 R .91(The name is an acron)72 261.6 R .91(ym for the `)-.15 F (`Bourne-Ag)-.74 E .91(ain SHell')-.05 F .911(', a pun on Ste)-.74 F 1.211 -.15 (ve B)-.25 H .911(ourne, the author of the direct).15 F .212 (ancestor of the current)72 273.6 R/F4 9/Times-Roman@0 SF(UNIX)2.712 E F3 2.712 <8773>C(hell)199.131 273.6 Q F1(/bin/sh)2.712 E F3 2.712(,w)C .212 (hich appeared in the Se)256.505 273.6 R -.15(ve)-.25 G .211 (nth Edition Bell Labs Research v).15 F(er)-.15 E(-)-.2 E(sion of)72 285.6 Q F4 (UNIX)2.5 E F3(.)A .387(Bash is an)97 301.2 R F2(sh)2.887 E F3 .387 (\255compatible shell that incorporates useful features from the K)B .388 (orn shell \()-.35 F F2(ksh)A F3 2.888(\)a)C .388(nd the C)469.334 301.2 R .023 (shell \()72 313.2 R F2(csh)A F3 .023(\), described later in this article.)B .022(It is ultimately intended to be a conformant implementation of the)5.022 F 3.568(IEEE POSIX Shell and Utilities speci\214cation \(IEEE W)72 325.2 R 3.568 (orking Group 1003.2\).)-.8 F 3.569(It of)8.569 F 3.569(fers functional)-.25 F (impro)72 337.2 Q -.15(ve)-.15 G(ments o).15 E -.15(ve)-.15 G 2.5(rs).15 G 2.5 (hf)155.28 337.2 S(or both interacti)166.11 337.2 Q .3 -.15(ve a)-.25 H (nd programming use.).15 E .697(While the GNU operating system will most lik)97 352.8 R .697(ely include a v)-.1 F .697(ersion of the Berk)-.15 F(ele)-.1 E 3.197(ys)-.15 G .696(hell csh, Bash)446.778 352.8 R .015(will be the def)72 364.8 R .015(ault shell.)-.1 F(Lik)5.015 E 2.515(eo)-.1 G .015(ther GNU softw) 199.1 364.8 R .016(are, Bash is quite portable.)-.1 F .016 (It currently runs on nearly e)5.016 F -.15(ve)-.25 G(ry).15 E -.15(ve)72 376.8 S .367(rsion of).15 F F4(UNIX)2.867 E F3 .367(and a fe)2.867 F 2.867(wo)-.25 G .367(ther operating systems \255 an independently-supported port e)187.933 376.8 R .366(xists for OS/2, and)-.15 F .706 (there are rumors of ports to DOS and W)72 388.8 R(indo)-.4 E .706(ws NT)-.25 F 5.706(.P)-.74 G .706(orts to)295.97 388.8 R F4(UNIX)3.206 E F3(-lik)A 3.206(es) -.1 G .706(ystems such as QNX and Minix)372.979 388.8 R (are part of the distrib)72 400.8 Q(ution.)-.2 E .405 (The original author of Bash w)97 416.4 R .405(as Brian F)-.1 F .405 (ox, an emplo)-.15 F .405(yee of the Free Softw)-.1 F .405(are F)-.1 F 2.905 (oundation. The)-.15 F(cur)2.905 E(-)-.2 E(rent de)72 428.4 Q -.15(ve)-.25 G (loper and maintainer is Chet Rame).15 E 1.3 -.65(y, a v)-.15 H(olunteer who w) .45 E(orks at Case W)-.1 E(estern Reserv)-.8 E 2.5(eU)-.15 G(ni)458.91 428.4 Q -.15(ve)-.25 G(rsity).15 E(.)-.65 E F2 2.5(2. What')72 452.4 R 2.5(sP)-.37 G (OSIX, anyway?)123.85 452.4 Q F1(POSIX)97 468 Q F3 .239 (is a name originally coined by Richard Stallman for a f)4.405 F .239 (amily of open system standards based)-.1 F(on)72 480 Q F4(UNIX)3.24 E F3 5.74 (.T)C .74(here are a number of aspects of)122.081 480 R F4(UNIX)3.24 E F3 .74 (under consideration for standardization, from the basic)3.24 F .192 (system services at the system call and C library le)72 492 R -.15(ve)-.25 G 2.692(lt).15 G 2.692(oa)290.156 492 S .192 (pplications and tools to system administration and)302.288 492 R 2.5 (management. Each)72 504 R(area of standardization is assigned to a w)2.5 E (orking group in the 1003 series.)-.1 E 2.814 (The POSIX Shell and Utilities standard has been de)97 519.6 R -.15(ve)-.25 G 2.814(loped by IEEE W).15 F 2.813(orking Group 1003.2)-.8 F .254 (\(POSIX.2\).\210 It concentrates on the command interpreter interf)72 531.6 R .253(ace and utility programs commonly e)-.1 F -.15(xe)-.15 G(cuted).15 E 1.112 (from the command line or by other programs.)72 543.6 R 1.112(An initial v) 6.112 F 1.113(ersion of the standard has been appro)-.15 F -.15(ve)-.15 G 3.613 (da).15 G(nd)494 543.6 Q .365(published by the IEEE, and w)72 555.6 R .365 (ork is currently underw)-.1 F .365(ay to update it.)-.1 F .365 (There are four primary areas of w)5.365 F(ork)-.1 E(in the 1003.2 standard:)72 567.6 Q 21.5<8341>72 583.2 S .835(spects of the shell')104.22 583.2 R 3.335(ss) -.55 G .835(yntax and command language.)192 583.2 R 3.335(An)5.835 G .835 (umber of special b)338.095 583.2 R .835(uiltins such as)-.2 F F2(cd)3.335 E F3 (and)3.335 E F2(exec)97 595.2 Q F3 .545(are being speci\214ed as part of the s\ hell, since their functionality usually cannot be implemented)3.046 F (by a separate e)97 607.2 Q -.15(xe)-.15 G(cutable;).15 E 21.5<8341>72 622.8 S .73(set of utilities to be called by shell scripts and applications.)107.45 622.8 R .731(Examples are programs lik)5.731 F(e)-.1 E F1 2.397(sed, tr)3.231 F (,)-1.11 E F3(and)97 634.8 Q F1(awk.)2.853 E F3 .352 (Utilities commonly implemented as shell b)4.519 F .352 (uiltins are described in this section, such as)-.2 F F2(test)2.852 E F3(and)97 646.8 Q F2(kill)3.422 E F3 5.922(.A)C 3.422(ne)144.404 646.8 S .922 (xpansion of this section')157.116 646.8 R 3.423(ss)-.55 G .923 (cope, termed the User Portability Extension, or UPE, has)268.586 646.8 R (standardized interacti)97 658.8 Q .3 -.15(ve p)-.25 H(rograms such as).15 E F1 (vi)2.5 E F3(and)4.166 E F1(mailx;)2.5 E .32 LW 76 668.8 72 668.8 DL 80 668.8 76 668.8 DL 84 668.8 80 668.8 DL 88 668.8 84 668.8 DL 92 668.8 88 668.8 DL 96 668.8 92 668.8 DL 100 668.8 96 668.8 DL 104 668.8 100 668.8 DL 108 668.8 104 668.8 DL 112 668.8 108 668.8 DL 116 668.8 112 668.8 DL 120 668.8 116 668.8 DL 124 668.8 120 668.8 DL 128 668.8 124 668.8 DL 132 668.8 128 668.8 DL 136 668.8 132 668.8 DL 140 668.8 136 668.8 DL 144 668.8 140 668.8 DL/F5 8/Times-Roman@0 SF(*An earlier v)72 678.8 Q (ersion of this article appeared in The Linux Journal.)-.12 E<87>72 688.8 Q/F6 7/Times-Roman@0 SF(UNIX)2 E F5(is a trademark of Bell Laboratories.)2 E (\210IEEE,)72 698.8 Q/F7 8/Times-Italic@0 SF .042(IEEE Standar)2.042 F 2.042 (df)-.296 G .042(or Information T)150.046 698.8 R(ec)-.736 E(hnolo)-.12 E .042 (gy -- P)-.08 F .042(ortable Oper)-.64 F .042 (ating System Interface \(POSIX\) P)-.12 F .042(art 2: Shell and Utili-)-.64 F (ties)72 708.8 Q F5 2(,1)C(992.)91.112 708.8 Q EP %%Page: 2 2 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF 2.5(-2-)279.67 48 S 21.5<8341>72 84 S .288 (group of functional interf)107.008 84 R .287(aces to services pro)-.1 F .287 (vided by the shell, such as the traditional)-.15 F/F1 10/Courier@0 SF (system\(\))2.787 E F0 3.289(Cl)97 96 S .789(ibrary function.)109.739 96 R .789 (There are functions to perform shell w)5.789 F .789(ord e)-.1 F .79 (xpansions, perform \214lename e)-.15 F(xpan-)-.15 E .324(sion \()97 108 R/F2 10/Times-Italic@0 SF(globbing)A F0 .324(\), obtain v)B .323 (alues of POSIX.2 system con\214guration v)-.25 F .323(ariables, retrie)-.25 F .623 -.15(ve v)-.25 H .323(alues of en)-.1 F(viron-)-.4 E(ment v)97 120 Q (ariables \()-.25 E F1(getenv\(\))A F0(\), and other services;).833 E 21.5 <8341>72 135.6 S(suite of `)106.72 135.6 Q(`de)-.74 E -.15(ve)-.25 G(lopment') .15 E 2.5('u)-.74 G(tilities such as)209.54 135.6 Q F2(c89)2.5 E F0 (\(the POSIX.2 v)4.166 E(ersion of)-.15 E F2(cc)2.5 E F0(\), and)A F2(yacc.)2.5 E F0 .483(Bash is concerned with the aspects of the shell')97 151.2 R 2.983(sb) -.55 G(eha)301.597 151.2 Q .484(vior de\214ned by POSIX.2.)-.2 F .484 (The shell command)5.484 F 1.439 (language has of course been standardized, including the basic \215o)72 163.2 R 3.938(wc)-.25 G 1.438(ontrol and program e)359.688 163.2 R -.15(xe)-.15 G 1.438 (cution con-).15 F 1.145(structs, I/O redirection and pipelining, ar)72 175.2 R 1.145(gument handling, v)-.18 F 1.145(ariable e)-.25 F 1.146 (xpansion, and quoting.)-.15 F(The)6.146 E F2(special)3.646 E F0 -.2(bu)72 187.2 S .676(iltins, which must be implemented as part of the shell to pro).2 F .676(vide the desired functionality)-.15 F 3.176(,a)-.65 G .676(re speci\214ed) 457.504 187.2 R .7(as being part of the shell; e)72 199.2 R .7 (xamples of these are)-.15 F/F3 10/Times-Bold@0 SF -2.3 -.15(ev a)3.201 H(l).15 E F0(and)3.201 E F3(export)3.201 E F0 5.701(.O)C .701 (ther utilities appear in the sections of)352.034 199.2 R .256(POSIX.2 not de) 72 211.2 R -.2(vo)-.25 G .256(ted to the shell which are commonly \(and in som\ e cases must be\) implemented as b).2 F(uiltin)-.2 E .213(commands, such as)72 223.2 R F3 -.18(re)2.713 G(ad).18 E F0(and)2.713 E F3(test)2.713 E F0 5.213(.P) C .213(OSIX.2 also speci\214es aspects of the shell')220.018 223.2 R 2.713(si) -.55 G(nteracti)398.159 223.2 Q .513 -.15(ve b)-.25 H(eha).15 E .214 (vior as part)-.2 F .598 (of the UPE, including job control and command line editing.)72 235.2 R .598 (Interestingly enough, only)5.598 F F2(vi)3.098 E F0 .598(-style line edit-)B (ing commands ha)72 247.2 Q .3 -.15(ve b)-.2 H(een standardized;).15 E F2 (emacs)2.5 E F0(editing commands were left out due to objections.)2.5 E 1.128 (While POSIX.2 includes much of what the shell has traditionally pro)97 262.8 R 1.129(vided, some important things)-.15 F(ha)72 274.8 Q .58 -.15(ve b)-.2 H .28 (een omitted as being `).15 F(`be)-.74 E .28(yond its scope.)-.15 F 4.26 -.74 ('' T)-.7 H .28(here is, for instance, no mention of a dif).74 F .28 (ference between)-.25 F(a)72 286.8 Q F2(lo)3.354 E(gin)-.1 E F0 .854 (shell and an)5.02 F 3.354(yo)-.15 G .854(ther interacti)167.956 286.8 R 1.154 -.15(ve s)-.25 H .854(hell \(since POSIX.2 does not specify a login program\).) .15 F .855(No \214x)5.855 F(ed)-.15 E (startup \214les are de\214ned, either \255 the standard does not mention)72 298.8 Q F2(.pr)2.5 E(o\214le)-.45 E F0(.)1.666 E F3 2.5(3. Basic)72 322.8 R (Bash featur)2.5 E(es)-.18 E F0 1.448(Since the Bourne shell pro)97 338.4 R 1.448(vides Bash with most of its philosophical underpinnings, Bash inherits) -.15 F .64(most of its features and functionality from sh.)72 350.4 R .641 (Bash implements all of the traditional sh \215o)5.641 F 3.141(wc)-.25 G .641 (ontrol con-)459.199 350.4 R .8(structs \()72 362.4 R F2(for)A F0(,)A F2(if)3.3 E F0(,)A F2(while)3.3 E F0 3.3(,e)C 3.3(tc.\). All)165.48 362.4 R .799 (of the Bourne shell b)3.3 F .799 (uiltins, including those not speci\214ed in the POSIX.2)-.2 F .536 (standard, appear in Bash.)72 374.4 R(Shell)5.536 E F2(functions)3.036 E F0 3.036(,i)C .536(ntroduced in the SVR2 v)248.536 374.4 R .537 (ersion of the Bourne shell, are similar)-.15 F .779(to shell scripts, b)72 386.4 R .779(ut are de\214ned using a special syntax and are e)-.2 F -.15(xe) -.15 G .779(cuted in the same process as the calling).15 F 2.841(shell. Bash)72 398.4 R .341(has shell functions which beha)2.841 F .641 -.15(ve i)-.2 H 2.841 (naf).15 G .341(ashion upw)278.759 398.4 R .342 (ard-compatible with sh functions.)-.1 F .342(There are)5.342 F 1.447 (certain shell v)72 410.4 R 1.446(ariables that Bash interprets in the same w) -.25 F 1.446(ay as sh, such as)-.1 F F3(PS1)3.946 E F0(,)A F3(IFS)3.946 E F0 3.946(,a)C(nd)435.018 410.4 Q F3 -.74(PA)3.946 G(TH)-.21 E F0 6.446(.B)C(ash) 490.67 410.4 Q 1.423(implements essentially the same grammar)72 422.4 R 3.924 (,p)-.4 G 1.424(arameter and v)256.476 422.4 R 1.424(ariable e)-.25 F 1.424 (xpansion semantics, redirection, and)-.15 F 1.06(quoting as the Bourne shell.) 72 434.4 R 1.06(Where dif)6.06 F 1.06 (ferences appear between the POSIX.2 standard and traditional sh)-.25 F(beha)72 446.4 Q(vior)-.2 E 2.5(,B)-.4 G(ash follo)118.06 446.4 Q(ws POSIX.)-.25 E 1.608 (The K)97 462 R 1.608(orn Shell \()-.35 F F3(ksh)A F0 4.108(\)i)C 4.108(sad) 194.192 462 S 1.608(escendent of the Bourne shell written at A)215.738 462 R 1.609(T&T Bell Laboratories by)-1.11 F(Da)72 474 Q 1.059(vid K)-.2 F 3.559 (orn\207. It)-.35 F(pro)3.559 E 1.059 (vides a number of useful features that POSIX and Bash ha)-.15 F 1.359 -.15 (ve a)-.2 H 3.558(dopted. Man).15 F 3.558(yo)-.15 G 3.558(ft)484.892 474 S(he) 494.56 474 Q(interacti)72 486 Q 1.312 -.15(ve f)-.25 H 1.012 (acilities in POSIX.2 ha).05 F 1.312 -.15(ve t)-.2 H 1.012 (heir roots in the ksh: for e).15 F 1.013 (xample, the POSIX and ksh job control)-.15 F -.1(fa)72 498 S .513 (cilities are nearly identical. Bash includes features from the K).1 F .513 (orn Shell for both interacti)-.35 F .813 -.15(ve u)-.25 H .513(se and shell) .15 F 3.905(programming. F)72 510 R 1.405(or programming, Bash pro)-.15 F 1.405 (vides v)-.15 F 1.405(ariables such as)-.25 F F3(RANDOM)3.905 E F0(and)3.905 E F3(REPL)3.905 E(Y)-.92 E F0 3.905(,t)C(he)460.665 510 Q F3(typeset)3.905 E F0 -.2(bu)72 522 S .398(iltin, the ability to remo).2 F .698 -.15(ve s)-.15 H .398 (ubstrings from v).15 F .398(ariables based on patterns, and shell arithmetic.) -.25 F F3(RANDOM)5.397 E F0 -.15(ex)72 534 S .489 (pands to a random number each time it is referenced; assigning a v).15 F .49 (alue to)-.25 F F3(RANDOM)2.99 E F0 .49(seeds the random)2.99 F .055 (number generator)72 546 R(.)-.55 E F3(REPL)5.055 E(Y)-.92 E F0 .054 (is the def)2.554 F .054(ault v)-.1 F .054(ariable used by the)-.25 F F3 -.18 (re)2.554 G(ad).18 E F0 -.2(bu)2.554 G .054(iltin when no v).2 F .054 (ariable names are sup-)-.25 F .742(plied as ar)72 558 R 3.243(guments. The) -.18 F F3(typeset)3.243 E F0 -.2(bu)3.243 G .743(iltin is used to de\214ne v).2 F .743(ariables and gi)-.25 F 1.043 -.15(ve t)-.25 H .743(hem attrib).15 F .743 (utes such as)-.2 F F3 -.18(re)3.243 G(ad-).18 E(only)72 570 Q F0 5.512(.B)C .512(ash arithmetic allo)105.022 570 R .512(ws the e)-.25 F -.25(va)-.25 G .511 (luation of an e).25 F .511(xpression and the substitution of the result.)-.15 F .511(Shell v)5.511 F(ari-)-.25 E .222 (ables may be used as operands, and the result of an e)72 582 R .222 (xpression may be assigned to a v)-.15 F 2.722(ariable. Nearly)-.25 F .222 (all of)2.722 F(the operators from the C language are a)72 594 Q -.25(va)-.2 G (ilable, with the same precedence rules:).25 E F1 6($e)97 612 S (cho $\(\(3 + 5 * 32\)\))115 612 Q(163)97 624 Q F0 -.15(Fo)72 645.6 S 3.24(ri) .15 G(nteracti)91.76 645.6 Q 1.04 -.15(ve u)-.25 H .74 (se, Bash implements ksh-style aliases and b).15 F .74(uiltins such as)-.2 F F3 (fc)3.24 E F0 .74(\(discussed belo)3.24 F .74(w\) and)-.25 F F3(jobs)3.24 E F0 (.)A .291(Bash aliases allo)72 657.6 R 2.791(was)-.25 G .291 (tring to be substituted for a command name.)160.124 657.6 R(The)5.291 E 2.791 (yc)-.15 G .291(an be used to create a mnemonic)371.733 657.6 R .568(for a)72 669.6 R/F4 9/Times-Roman@0 SF(UNIX)3.068 E F0 .568(command name \()3.068 F F1 .568(alias del=rm)B F0 .568(\), to e)B .567(xpand a single w)-.15 F .567 (ord to a comple)-.1 F 3.067(xc)-.15 G .567(ommand \()432.603 669.6 R F1(alias) A .255(news='xterm -g 80x45 -title trn -e trn -e -S1 -N &')72 681.6 R F0 .255 (\), or to ensure that a command)B(is in)72 693.6 Q -.2(vo)-.4 G -.1(ke).2 G 2.5(dw).1 G(ith a basic set of options \()122.41 693.6 Q F1 (alias ls="/bin/ls -F")A F0(\).)A .32 LW 76 703.6 72 703.6 DL 80 703.6 76 703.6 DL 84 703.6 80 703.6 DL 88 703.6 84 703.6 DL 92 703.6 88 703.6 DL 96 703.6 92 703.6 DL 100 703.6 96 703.6 DL 104 703.6 100 703.6 DL 108 703.6 104 703.6 DL 112 703.6 108 703.6 DL 116 703.6 112 703.6 DL 120 703.6 116 703.6 DL 124 703.6 120 703.6 DL 128 703.6 124 703.6 DL 132 703.6 128 703.6 DL 136 703.6 132 703.6 DL 140 703.6 136 703.6 DL 144 703.6 140 703.6 DL/F5 8/Times-Roman@0 SF (\207Morris Bolsk)72 713.6 Q 2(ya)-.12 G(nd Da)127.88 713.6 Q(vid K)-.16 E (orn,)-.28 E/F6 8/Times-Italic@0 SF(The K)2 E(ornShell Command and Pr)-.32 E -.08(og)-.36 G -.12(ra).08 G(mming Langua).12 E -.08(ge)-.08 G F5 2(,P).08 G (rentice Hall, 1989.)363.064 713.6 Q EP %%Page: 3 3 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF 2.5(-3-)279.67 48 S .293(The C shell \()97 84 R/F1 10 /Times-Bold@0 SF(csh)A F0 .293(\)\207, originally written by Bill Jo)B 2.792 (yw)-.1 G .292(hile at Berk)304.534 84 R(ele)-.1 E 1.592 -.65(y, i)-.15 H 2.792 (sw).65 G .292(idely used and quite popular)389.512 84 R 1.252 (for its interacti)72 96 R 1.552 -.15(ve f)-.25 H 3.752(acilities. Bash).05 F 1.253(includes a csh-compatible history e)3.752 F 1.253(xpansion mechanism \(`) -.15 F 1.253(`! history')-.74 F('\),)-.74 E .019(brace e)72 108 R .018 (xpansion, access to a stack of directories via the)-.15 F F1(pushd)2.518 E F0 (,)A F1(popd)2.518 E F0 2.518(,a)C(nd)357.31 108 Q F1(dirs)2.518 E F0 -.2(bu) 2.518 G .018(iltins, and tilde e).2 F(xpansion,)-.15 E 1.293 (to generate users' home directories.)72 120 R -.35(Ti)6.294 G 1.294(lde e).35 F 1.294(xpansion has also been adopted by both the K)-.15 F 1.294 (orn Shell and)-.35 F(POSIX.2.)72 132 Q .148 (There were certain areas in which POSIX.2 felt standardization w)97 147.6 R .149(as necessary)-.1 F 2.649(,b)-.65 G .149(ut no e)420.643 147.6 R .149 (xisting imple-)-.15 F 1.598(mentation pro)72 159.6 R 1.598 (vided the proper beha)-.15 F(vior)-.2 E 6.598(.T)-.55 G 1.598(he w)251.56 159.6 R 1.597(orking group in)-.1 F -.15(ve)-.4 G 1.597 (nted and standardized functionality in).15 F .674 (these areas, which Bash implements.)72 171.6 R(The)5.674 E F1(command)3.174 E F0 -.2(bu)3.174 G .674(iltin w).2 F .674(as in)-.1 F -.15(ve)-.4 G .674 (nted so that shell functions could be).15 F .996(written to replace b)72 183.6 R .996(uiltins; it mak)-.2 F .996(es the capabilities of the b)-.1 F .995 (uiltin a)-.2 F -.25(va)-.2 G .995(ilable to the function.).25 F .995 (The reserv)5.995 F(ed)-.15 E -.1(wo)72 195.6 S 1.566(rd `).1 F(`!')-.74 E 4.066('w)-.74 G 1.566(as added to ne)122.872 195.6 R -.05(ga)-.15 G 1.567 (te the return v).05 F 1.567(alue of a command or pipeline; it w)-.25 F 1.567 (as nearly impossible to)-.1 F -.15(ex)72 207.6 S .089(press `).15 F .089 (`if not x')-.74 F 2.589('c)-.74 G .089(leanly using the sh language.)152.366 207.6 R .089(There e)5.089 F .088 (xist multiple incompatible implementations of the)-.15 F F1(test)72 219.6 Q F0 -.2(bu)3.163 G .663(iltin, which tests \214les for type and other attrib).2 F .664(utes and performs arithmetic and string comparisons.)-.2 F .5 (POSIX considered none of these correct, so the standard beha)72 231.6 R .5 (vior w)-.2 F .5(as speci\214ed in terms of the number of)-.1 F(ar)72 243.6 Q .412(guments to the command.)-.18 F .412(POSIX.2 dictates e)5.412 F .412 (xactly what will happen when four or fe)-.15 F .412(wer ar)-.25 F .412 (guments are)-.18 F(gi)72 255.6 Q -.15(ve)-.25 G 5.01(nt).15 G(o)101.61 255.6 Q F1(test)5.01 E F0 5.01(,a)C 2.51(nd lea)138.56 255.6 R -.15(ve)-.2 G 5.01(st) .15 G 2.51(he beha)186 255.6 R 2.51(vior unde\214ned when more ar)-.2 F 2.51 (guments are supplied.)-.18 F 2.51(Bash uses the)7.51 F (POSIX.2 algorithm, which w)72 267.6 Q(as concei)-.1 E -.15(ve)-.25 G 2.5(db) .15 G 2.5(yD)247.31 267.6 S -.2(av)262.03 267.6 S(id K).2 E(orn.)-.35 E F1 2.5 (3.1. F)72 291.6 R(eatur)-.25 E(es not in the Bour)-.18 E(ne Shell)-.15 E F0 .718(There are a number of minor dif)97 307.2 R .719 (ferences between Bash and the v)-.25 F .719 (ersion of sh present on most other)-.15 F -.15(ve)72 319.2 S .874(rsions of) .15 F/F2 9/Times-Roman@0 SF(UNIX)3.374 E F0 5.873(.T)C .873 (he majority of these are due to the POSIX standard, b)157.232 319.2 R .873 (ut some are the result of Bash)-.2 F .188 (adopting features from other shells.)72 331.2 R -.15(Fo)5.188 G 2.689(ri).15 G .189(nstance, Bash includes the ne)239.069 331.2 R 2.689(w`)-.25 G(`!')369.554 331.2 Q 2.689('r)-.74 G(eserv)388.153 331.2 Q .189(ed w)-.15 F .189(ord, the) -.1 F F1(command)2.689 E F0 -.2(bu)72 343.2 S .116(iltin, the ability of the).2 F F1 -.18(re)2.616 G(ad).18 E F0 -.2(bu)2.615 G .115 (iltin to correctly return a line ending with a backslash, symbolic ar).2 F (guments)-.18 E .798(to the)72 355.2 R F1(umask)3.298 E F0 -.2(bu)3.298 G .798 (iltin, v).2 F .798(ariable substring remo)-.25 F -.25(va)-.15 G .798(l, a w) .25 F .799(ay to get the length of a v)-.1 F .799(ariable, and the ne)-.25 F 3.299(wa)-.25 G(lgo-)487.89 355.2 Q(rithm for the)72 367.2 Q F1(test)2.5 E F0 -.2(bu)2.5 G(iltin from the POSIX.2 standard, none of which appear in sh.).2 E .998(Bash also implements the `)97 382.8 R(`$\(...\)')-.74 E 3.498('c)-.74 G .998(ommand substitution syntax, which supersedes the sh `...` con-)244.93 382.8 R 2.654(struct. The)72 394.8 R -.74(``)2.654 G($\(...\)').74 E 2.654('c) -.74 G .154(onstruct e)158.172 394.8 R .154 (xpands to the output of the command contained within the parentheses, with) -.15 F .467(trailing ne)72 406.8 R .467(wlines remo)-.25 F -.15(ve)-.15 G 2.967 (d. The).15 F .467(sh syntax is accepted for backw)2.967 F .467 (ards compatibility)-.1 F 2.966(,b)-.65 G .466(ut the `)415.026 406.8 R (`$\(...\)')-.74 E 2.966('f)-.74 G .466(orm is)478.254 406.8 R(preferred becau\ se its quoting rules are much simpler and it is easier to nest.)72 418.8 Q .772 (The Bourne shell does not pro)97 434.4 R .772(vide such features as brace e) -.15 F .772(xpansion, the ability to de\214ne a v)-.15 F(ariable)-.25 E .283 (and a function with the same name, local v)72 446.4 R .282 (ariables in shell functions, the ability to enable and disable indi-)-.25 F .547(vidual b)72 458.4 R .547(uiltins or write a function to replace a b)-.2 F .547(uiltin, or a means to e)-.2 F .547(xport a shell function to a child pro-) -.15 F(cess.)72 470.4 Q .32 (Bash has closed a long-standing shell security hole by not using the)97 486 R F1($IFS)2.82 E F0 -.25(va)2.82 G .32(riable to split each w).25 F(ord)-.1 E 1.254(read by the shell, b)72 498 R 1.254(ut splitting only the results of e) -.2 F 1.255(xpansion \(ksh and the 4.4 BSD sh ha)-.15 F 1.555 -.15(ve \214)-.2 H -.15(xe).15 G 3.755(dt).15 G 1.255(his as)480.245 498 R 2.752(well\). Useful) 72 510 R(beha)2.751 E .251(vior such as a means to abort e)-.2 F -.15(xe)-.15 G .251(cution of a script read with the `).15 F(`.)-.74 E 1.731 -.74('' c)-.7 H .251(ommand using the).74 F F1 -.18(re)72 522 S(tur).18 E(n)-.15 E F0 -.2(bu) 2.742 G .242(iltin or automatically e).2 F .242(xporting v)-.15 F .243 (ariables in the shell')-.25 F 2.743(se)-.55 G -.4(nv)336.842 522 S .243 (ironment to children is also not present).4 F .969(in the Bourne shell.)72 534 R .968(Bash pro)5.968 F .968(vides a much more po)-.15 F .968(werful en)-.25 F .968(vironment for both interacti)-.4 F 1.268 -.15(ve u)-.25 H .968 (se and pro-).15 F(gramming.)72 546 Q F1 2.5(4. Bash-speci\214c)72 570 R -.25 (Fe)2.5 G(atur).25 E(es)-.18 E F0 .491(This section details a fe)97 585.6 R 2.991(wo)-.25 G 2.991(ft)208.355 585.6 S .491(he features which mak)217.456 585.6 R 2.991(eB)-.1 G .491(ash unique.)323.18 585.6 R .492(Most of them pro) 5.491 F .492(vide impro)-.15 F -.15(ve)-.15 G(d).15 E(interacti)72 597.6 Q 1.182 -.15(ve u)-.25 H .882(se, b).15 F .882(ut a fe)-.2 F 3.382(wp)-.25 G .882 (rogramming impro)183.31 597.6 R -.15(ve)-.15 G .882 (ments are present as well.).15 F .882(Full descriptions of these fea-)5.882 F (tures can be found in the Bash documentation.)72 609.6 Q F1 2.5(4.1. Startup) 72 633.6 R(Files)2.5 E F0 .161(Bash e)97 649.2 R -.15(xe)-.15 G .161 (cutes startup \214les dif).15 F .161(ferently than other shells.)-.25 F .162 (The Bash beha)5.161 F .162(vior is a compromise between)-.2 F .116 (the csh principle of startup \214les with \214x)72 661.2 R .116(ed names e) -.15 F -.15(xe)-.15 G .116(cuted for each shell and the sh `).15 F (`minimalist')-.74 E 2.615('b)-.74 G(eha)472.26 661.2 Q(vior)-.2 E(.)-.55 E 2.844(An interacti)72 673.2 R 3.144 -.15(ve i)-.25 H 2.844 (nstance of Bash started as a login shell reads and e).15 F -.15(xe)-.15 G (cutes).15 E/F3 10/Times-Italic@0 SF(~/.bash_pr)5.345 E(o\214le)-.45 E F0 2.845 (\(the \214le)7.011 F .954(.bash_pro\214le in the user')72 685.2 R 3.454(sh) -.55 G .953(ome directory\), if it e)186.086 685.2 R 3.453(xists. An)-.15 F (interacti)3.453 E 1.253 -.15(ve n)-.25 H .953(on-login shell reads and e).15 F -.15(xe)-.15 G(cutes).15 E .32 LW 76 695.2 72 695.2 DL 80 695.2 76 695.2 DL 84 695.2 80 695.2 DL 88 695.2 84 695.2 DL 92 695.2 88 695.2 DL 96 695.2 92 695.2 DL 100 695.2 96 695.2 DL 104 695.2 100 695.2 DL 108 695.2 104 695.2 DL 112 695.2 108 695.2 DL 116 695.2 112 695.2 DL 120 695.2 116 695.2 DL 124 695.2 120 695.2 DL 128 695.2 124 695.2 DL 132 695.2 128 695.2 DL 136 695.2 132 695.2 DL 140 695.2 136 695.2 DL 144 695.2 140 695.2 DL/F4 8/Times-Roman@0 SF .764 (\207Bill Jo)72 705.2 R 1.804 -.52(y, A)-.08 H 2.764(nI).52 G .764 (ntroduction to the C Shell,)121.252 705.2 R/F5 8/Times-Italic@0 SF .763 (UNIX User')2.764 F 2.763(sS)-.32 G .763(upplementary Documents)260.942 705.2 R F4 2.763(,U)C(ni)354.228 705.2 Q -.12(ve)-.2 G .763 (rsity of California at Berk).12 F(ele)-.08 E -.52(y,)-.12 G(1986.)72 715.2 Q EP %%Page: 4 4 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF 2.5(-4-)279.67 48 S/F1 10/Times-Italic@0 SF(~/.bashr)72 84 Q(c)-.37 E F0 5.537(.A)1.666 G(non-interacti)127.42 84 Q .837 -.15(ve s)-.25 H .537(hell \(one be).15 F .538(gun to e)-.15 F -.15(xe)-.15 G .538 (cute a shell script, for e).15 F .538(xample\) reads no \214x)-.15 F .538 (ed startup)-.15 F .342(\214le, b)72 96 R .342(ut uses the v)-.2 F .342 (alue of the v)-.25 F(ariable)-.25 E/F2 10/Times-Bold@0 SF($ENV)2.842 E F0 2.841(,i)C 2.841(fs)260.187 96 S .341(et, as the name of a startup \214le.) 270.248 96 R .341(The ksh practice of read-)5.341 F(ing)72 108 Q F2($ENV)3.114 E F0 .614(for e)3.114 F -.15(ve)-.25 G .614(ry shell, with the accompan).15 F .615(ying dif)-.15 F .615(\214culty of de\214ning the proper v)-.25 F .615 (ariables and functions)-.25 F .721(for interacti)72 120 R 1.021 -.15(ve a)-.25 H .721(nd non-interacti).15 F 1.021 -.15(ve s)-.25 H .721(hells or ha).15 F .721(ving the \214le read only for interacti)-.2 F 1.02 -.15(ve s)-.25 H .72 (hells, w).15 F .72(as considered)-.1 F .158(too comple)72 132 R 2.658(x. Ease) -.15 F .158(of use w)2.658 F .158(on out here.)-.1 F(Interestingly)5.158 E 2.658(,t)-.65 G .158(he ne)295.822 132 R .159 (xt release of ksh will change to reading)-.15 F F2($ENV)2.659 E F0 (only for interacti)72 144 Q .3 -.15(ve s)-.25 H(hells.).15 E F2 2.5(4.2. New) 72 168 R(Builtin Commands)2.5 E F0 1.02(There are a fe)97 183.6 R 3.52(wb)-.25 G 1.02(uiltins which are ne)170.59 183.6 R 3.52(wo)-.25 G 3.52(rh)267.74 183.6 S -2.25 -.2(av e)279.59 183.6 T 1.02(been e)3.72 F 1.02(xtended in Bash.)-.15 F (The)6.02 E F2(enable)3.52 E F0 -.2(bu)3.52 G 1.02(iltin allo).2 F(ws)-.25 E -.2(bu)72 195.6 S .736(iltin commands to be turned on and of).2 F 3.236(fa)-.25 G(rbitrarily)250.198 195.6 Q 5.736(.T)-.65 G 3.237(ou)298.644 195.6 S .737 (se the v)311.881 195.6 R .737(ersion of)-.15 F F1(ec)3.237 E(ho)-.15 E F0 .737 (found in a user')4.903 F 3.237(ss)-.55 G(earch)482.35 195.6 Q .625 (path rather than the Bash b)72 207.6 R(uiltin,)-.2 E/F3 10/Courier@0 SF .625 (enable -n echo)3.125 F F0(suf)3.125 E 3.125(\214ces. The)-.25 F F2(help)3.124 E F0 -.2(bu)3.124 G .624(iltin pro).2 F .624(vides quick synopses)-.15 F .703 (of the shell f)72 219.6 R .704 (acilities without requiring access to a manual page.)-.1 F F2(Builtin)5.704 E F0 .704(is similar to)3.204 F F2(command)3.204 E F0 .704(in that it)3.204 F .342(bypasses shell functions and directly e)72 231.6 R -.15(xe)-.15 G .342 (cutes b).15 F .342(uiltin commands.)-.2 F .342 (Access to a csh-style stack of directories)5.342 F .072(is pro)72 243.6 R .073 (vided via the)-.15 F F2(pushd)2.573 E F0(,)A F2(popd)2.573 E F0 2.573(,a)C(nd) 211.197 243.6 Q F2(dirs)2.573 E F0 -.2(bu)2.573 G(iltins.).2 E F2(Pushd)5.073 E F0(and)2.573 E F2(popd)2.573 E F0 .073(insert and remo)2.573 F .373 -.15(ve d) -.15 H .073(irectories from the).15 F 2.858(stack, respecti)72 255.6 R -.15(ve) -.25 G(ly).15 E 5.358(,a)-.65 G(nd)159.976 255.6 Q F2(dirs)5.358 E F0 2.858 (lists the stack contents.)5.358 F 2.858(On systems that allo)7.858 F 5.358 <778c>-.25 G 2.857(ne-grained control of)413.866 255.6 R 1.339(resources, the) 72 267.6 R F2(ulimit)3.839 E F0 -.2(bu)3.839 G 1.339 (iltin can be used to tune these settings.).2 F F2(Ulimit)6.34 E F0(allo)3.84 E 1.34(ws a user to control, among)-.25 F 1.086 (other things, whether core dumps are to be generated, ho)72 279.6 R 3.586(wm) -.25 G 1.086(uch memory the shell or a child process is)327.002 279.6 R(allo)72 291.6 Q .496(wed to allocate, and ho)-.25 F 2.996(wl)-.25 G(ar)193.96 291.6 Q .496(ge a \214le created by a child process can gro)-.18 F 4.296 -.65(w. T)-.25 H(he).65 E F2(suspend)2.996 E F0 .497(command will)2.997 F .744 (stop the shell process when job control is acti)72 303.6 R -.15(ve)-.25 G 3.243(;m).15 G .743(ost other shells do not allo)282.443 303.6 R 3.243(wt)-.25 G(hemselv)404.431 303.6 Q .743(es to be stopped)-.15 F(lik)72 315.6 Q 2.717(et) -.1 G(hat.)92.397 315.6 Q F2 -.74(Ty)5.217 G(pe,).74 E F0 .217 (the Bash answer to)2.717 F F2(which)2.717 E F0(and)2.717 E F2(whence,)2.717 E F0(sho)2.717 E .218(ws what will happen when a w)-.25 F .218(ord is typed as a) -.1 F(command:)72 327.6 Q F3 6($t)97 345.6 S(ype export)115 345.6 Q (export is a shell builtin)97 357.6 Q 6($t)97 369.6 S(ype -t export)115 369.6 Q (builtin)97 381.6 Q 6($t)97 393.6 S(ype bash)115 393.6 Q(bash is /bin/bash)97 405.6 Q 6($t)97 417.6 S(ype cd)115 417.6 Q(cd is a function)97 429.6 Q(cd \(\)) 97 441.6 Q({)97 453.6 Q(builtin cd ${1+"$@"} && xtitle $HOST: $PWD)121 465.6 Q (})97 477.6 Q F0 -1.11(Va)72 499.2 S .682(rious modes tell what a command w) 1.11 F .681(ord is \(reserv)-.1 F .681(ed w)-.15 F .681 (ord, alias, function, b)-.1 F .681(uiltin, or \214le\) or which v)-.2 F(er) -.15 E(-)-.2 E 1.15(sion of a command will be e)72 511.2 R -.15(xe)-.15 G 1.15 (cuted based on a user').15 F 3.65(ss)-.55 G 1.15(earch path.)305.7 511.2 R 1.15(Some of this functionality has been)6.15 F (adopted by POSIX.2 and folded into the)72 523.2 Q F2(command)2.5 E F0(utility) 2.5 E(.)-.65 E F2 2.5(4.3. Editing)72 547.2 R(and Completion)2.5 E F0 .584 (One area in which Bash shines is command line editing.)97 562.8 R .584 (Bash uses the)5.584 F F1 -.37(re)3.084 G(adline).37 E F0 .583 (library to read and)4.749 F .942(edit lines when interacti)72 574.8 R -.15(ve) -.25 G 5.942(.R).15 G .942(eadline is a po)194.798 574.8 R .942 (werful and \215e)-.25 F .942(xible input f)-.15 F .943 (acility that a user can con\214gure to)-.1 F(indi)72 586.8 Q .732 (vidual tastes.)-.25 F .732(It allo)5.732 F .732 (ws lines to be edited using either emacs or vi commands, where those commands) -.25 F .2(are appropriate.)72 598.8 R .2 (The full capability of emacs is not present \255 there is no w)5.2 F .2 (ay to e)-.1 F -.15(xe)-.15 G .2(cute a named command).15 F 1.15 (with M-x, for instance \255 b)72 610.8 R 1.15(ut the e)-.2 F 1.149 (xisting commands are more than adequate.)-.15 F 1.149 (The vi mode is compliant)6.149 F (with the command line editing standardized by POSIX.2.)72 622.8 Q 1.69 (Readline is fully customizable.)97 638.4 R 1.691 (In addition to the basic commands and k)6.69 F 1.991 -.15(ey b)-.1 H 1.691 (indings, the library).15 F(allo)72 650.4 Q .83 (ws users to de\214ne additional k)-.25 F 1.13 -.15(ey b)-.1 H .83 (indings using a startup \214le.).15 F(The)5.83 E F1(inputr)3.329 E(c)-.37 E F0 .829(\214le, which def)4.995 F .829(aults to the)-.1 F(\214le)72 662.4 Q F1 (~/.inputr)4.287 E(c)-.37 E F0 4.287(,i)1.666 G 4.287(sr)137.43 662.4 S 1.788(\ ead each time readline initializes, permitting users to maintain a consistent \ interf)148.937 662.4 R(ace)-.1 E .547(across a set of programs.)72 674.4 R .546 (Readline includes an e)5.546 F .546(xtensible interf)-.15 F .546 (ace, so each program using the library can)-.1 F .23(add its o)72 686.4 R .23 (wn bindable commands and program-speci\214c k)-.25 F .531 -.15(ey b)-.1 H 2.731(indings. Bash).15 F .231(uses this f)2.731 F .231 (acility to add bindings)-.1 F(that perform history e)72 698.4 Q (xpansion or shell w)-.15 E(ord e)-.1 E(xpansions on the current input line.) -.15 E .707(Readline interprets a number of v)97 714 R .706 (ariables which further tune its beha)-.25 F(vior)-.2 E 5.706(.V)-.55 G .706 (ariables e)408.432 714 R .706(xist to control)-.15 F .157 (whether or not eight-bit characters are directly read as input or con)72 726 R -.15(ve)-.4 G .158(rted to meta-pre\214x).15 F .158(ed k)-.15 F .458 -.15(ey s) -.1 H .158(equences \(a).15 F EP %%Page: 5 5 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF 2.5(-5-)279.67 48 S(meta-pre\214x)72 84 Q 1.575(ed k) -.15 F 1.875 -.15(ey s)-.1 H 1.575 (equence consists of the character with the eighth bit zeroed, preceded by the) .15 F/F1 10/Times-Italic@0 SF(meta-)4.074 E(pr)72 96 Q(e\214x)-.37 E F0 (character)4.45 E 2.784(,u)-.4 G .284 (sually escape, which selects an alternate k)145.374 96 R -.15(ey)-.1 G .285 (map\), to decide whether to output characters).15 F .485 (with the eighth bit set directly or as a meta-pre\214x)72 108 R .485(ed k)-.15 F .784 -.15(ey s)-.1 H .484(equence, whether or not to wrap to a ne).15 F 2.984 (ws)-.25 G(creen)482.35 108 Q .157 (line when a line being edited is longer than the screen width, the k)72 120 R -.15(ey)-.1 G .158(map to which subsequent k).15 F .458 -.15(ey b)-.1 H (indings).15 E .531(should apply)72 132 R 3.031(,o)-.65 G 3.031(re)133.802 132 S -.15(ve)144.353 132 S 3.031(nw).15 G .531(hat happens when readline w)168.894 132 R .531(ants to ring the terminal')-.1 F 3.03(sb)-.55 G 3.03(ell. All)399.37 132 R .53(of these v)3.03 F(ariables)-.25 E(can be set in the inputrc \214le.) 72 144 Q .284(The startup \214le understands a set of C preprocessor)97 159.6 R (-lik)-.2 E 2.785(ec)-.1 G .285(onditional constructs which allo)329.49 159.6 R 2.785(wv)-.25 G(ariables)472.9 159.6 Q .12(or k)72 171.6 R .42 -.15(ey b)-.1 H .119(indings to be assigned based on the application using readline, the termi\ nal currently being used, or).15 F .338(the editing mode.)72 183.6 R .338 (Users can add program-speci\214c bindings to mak)5.338 F 2.838(et)-.1 G .338 (heir li)353.02 183.6 R -.15(ve)-.25 G 2.838(se).15 G 2.838(asier: I)397.176 183.6 R(ha)2.838 E .639 -.15(ve b)-.2 H .339(indings that).15 F (let me edit the v)72 195.6 Q(alue of)-.25 E/F2 10/Times-Bold@0 SF($P)2.5 E -.95(AT)-.74 G(H).95 E F0(and double-quote the current or pre)2.5 E(vious w) -.25 E(ord:)-.1 E/F3 10/Courier@0 SF 6(#M)97 213.6 S (acros that are convenient for shell interaction)115 213.6 Q($if Bash)97 225.6 Q 6(#e)97 237.6 S(dit the path)115 237.6 Q ("\\C-xp": "PATH=${PATH}\\e\\C-e\\C-a\\ef\\C-f")97 249.6 Q 6(#p)97 261.6 S (repare to type a quoted word -- insert open and close double)115 261.6 Q 6(#q) 97 273.6 S(uotes and move to just after the open quote)115 273.6 Q ("\\C-x\\"": "\\"\\"\\C-b")97 285.6 Q 6(#Q)97 297.6 S (uote the current or previous word)115 297.6 Q("\\C-xq": "\\eb\\"\\ef\\"")97 309.6 Q($endif)97 321.6 Q F0 .322(There is a readline command to re-read the \ \214le, so users can edit the \214le, change some bindings, and be)72 343.2 R (gin)-.15 E(to use them almost immediately)72 355.2 Q(.)-.65 E .851 (Bash implements the)97 370.8 R F2(bind)3.351 E F0 -.2(bu)3.351 G .851 (iltin for more dyamic control of readline than the startup \214le permits.).2 F F2(Bind)72 382.8 Q F0 .167(is used in se)2.667 F -.15(ve)-.25 G .167(ral w) .15 F 2.667(ays. In)-.1 F F1(list)2.667 E F0 .167 (mode, it can display the current k)4.333 F .466 -.15(ey b)-.1 H .166 (indings, list all the readline edit-).15 F .149(ing directi)72 394.8 R -.15 (ve)-.25 G 2.649(sa).15 G -.25(va)132.798 394.8 S .149 (ilable for binding, list which k).25 F -.15(ey)-.1 G 2.649(si).15 G -1.9 -.4 (nv o)282.352 394.8 T .349 -.1(ke a g).4 H -2.15 -.25(iv e).1 H 2.65(nd).25 G (irecti)345.3 394.8 Q -.15(ve)-.25 G 2.65(,o).15 G 2.65(ro)385.04 394.8 S .15 (utput the current set of k)396.02 394.8 R -.15(ey)-.1 G .526(bindings in a fo\ rmat that can be incorporated directly into an inputrc \214le.)72 406.8 R(In) 5.526 E F1(batc)3.026 E(h)-.15 E F0 .526(mode, it reads a series)4.692 F .71 (of k)72 418.8 R 1.01 -.15(ey b)-.1 H .71 (indings directly from a \214le and passes them to readline.).15 F .71 (In its most common usage,)5.71 F F2(bind)3.21 E F0(tak)3.21 E .71(es a)-.1 F .534(single string and passes it directly to readline, which interprets the li\ ne as if it had just been read from the)72 430.8 R(inputrc \214le.)72 442.8 Q (Both k)5 E .3 -.15(ey b)-.1 H(indings and v).15 E (ariable assignments may appear in the string gi)-.25 E -.15(ve)-.25 G 2.5(nt) .15 G(o)427.74 442.8 Q F2(bind)2.5 E F0(.)A .401(The readline library also pro) 97 458.4 R .402(vides an interf)-.15 F .402(ace for)-.1 F F1(wor)2.902 E 2.902 (dc)-.37 G(ompletion)328.546 458.4 Q F0 5.402(.W)C .402(hen the)385.888 458.4 R F1(completion)2.902 E F0(character)4.568 E 1.261(\(usually T)72 470.4 R 1.261 (AB\) is typed, readline looks at the w)-.93 F 1.26 (ord currently being entered and computes the set of \214le-)-.1 F .523 (names of which the current w)72 482.4 R .523(ord is a v)-.1 F .523 (alid pre\214x.)-.25 F .524 (If there is only one possible completion, the rest of the)5.523 F .358 (characters are inserted directly)72 494.4 R 2.858(,o)-.65 G .358(therwise the\ common pre\214x of the set of \214lenames is added to the current)205.232 494.4 R -.1(wo)72 506.4 S 3.199(rd. A).1 F .699(second T)3.199 F .699(AB chara\ cter entered immediately after a non-unique completion causes readline to list) -.93 F 1.814(the possible completions; there is an option to ha)72 518.4 R 2.113 -.15(ve t)-.2 H 1.813(he list displayed immediately).15 F 6.813(.R)-.65 G 1.813(eadline pro)436.517 518.4 R(vides)-.15 E .482 (hooks so that applications can pro)72 530.4 R .482 (vide speci\214c types of completion before the def)-.15 F .483 (ault \214lename completion)-.1 F .132(is attempted.)72 542.4 R .132 (This is quite \215e)5.132 F .132(xible, though it is not completely user)-.15 F 2.632(-programmable. Bash,)-.2 F .132(for e)2.632 F .132(xample, can)-.15 F .37(complete \214lenames, command names \(including aliases, b)72 554.4 R .37 (uiltins, shell reserv)-.2 F .37(ed w)-.15 F .37(ords, shell functions, and)-.1 F -.15(exe)72 566.4 S .424(cutables found in the \214le system\), shell v).15 F .424(ariables, usernames, and hostnames.)-.25 F .423 (It uses a set of heuristics)5.424 F(that, while not perfect, is generally qui\ te good at determining what type of completion to attempt.)72 578.4 Q F2 2.5 (4.4. History)72 602.4 R F0 .144(Access to the list of commands pre)97 618 R .144(viously entered \(the)-.25 F F1 .144(command history)2.644 F F0 2.644(\)i) C 2.644(sp)398.014 618 S(ro)409.548 618 Q .144(vided jointly by Bash)-.15 F .078(and the readline library)72 630 R 5.077(.B)-.65 G .077(ash pro)178.861 630 R .077(vides v)-.15 F .077(ariables \()-.25 F F2($HISTFILE)A F0(,)A F2 ($HISTSIZE)2.577 E F0 2.577(,a)C(nd)391.916 630 Q F2($HISTCONTR)2.577 E(OL)-.3 E F0 2.577(\)a)C(nd)494 630 Q(the)72 642 Q F2(history)2.89 E F0(and)2.89 E F2 (fc)2.89 E F0 -.2(bu)2.89 G .39(iltins to manipulate the history list.).2 F .391(The v)5.391 F .391(alue of)-.25 F F2($HISTFILE)2.891 E F0 .391 (specifes the \214le where)2.891 F .49(Bash writes the command history on e)72 654 R .489(xit and reads it on startup.)-.15 F F2($HISTSIZE)5.489 E F0 .489 (is used to limit the number)2.989 F .642(of commands sa)72 666 R -.15(ve)-.2 G 3.142(di).15 G 3.142(nt)158.286 666 S .642(he history)169.208 666 R(.)-.65 E F2 ($HISTCONTR)5.642 E(OL)-.3 E F0(pro)3.142 E .642 (vides a crude form of control o)-.15 F -.15(ve)-.15 G 3.142(rw).15 G .642 (hich com-)463.088 666 R .32(mands are sa)72 678 R -.15(ve)-.2 G 2.819(do).15 G 2.819(nt)146.199 678 S .319(he history list: a v)156.798 678 R .319(alue of) -.25 F F1(ignor)2.819 E(espace)-.37 E F0 .319(means to not sa)4.485 F .619 -.15 (ve c)-.2 H .319(ommands which be).15 F .319(gin with)-.15 F 2.866(as)72 690 S .366(pace; a v)83.196 690 R .366(alue of)-.25 F F1(ignor)2.866 E(edups)-.37 E F0 .367(means to not sa)4.533 F .667 -.15(ve c)-.2 H .367 (ommands identical to the last command sa).15 F -.15(ve)-.2 G(d.).15 E F2 ($HIST)5.367 E(-)-.92 E(CONTR)72 702 Q(OL)-.3 E F0 -.1(wa)3.778 G 3.778(sn).1 G (amed)150.266 702 Q F2($history_contr)3.778 E(ol)-.18 E F0 1.278(in earlier v) 3.778 F 1.278(ersions of Bash; the old name is still accepted for)-.15 F(backw) 72 714 Q .575(ards compatibility)-.1 F 5.575(.T)-.65 G(he)184.61 714 Q F2 (history)3.075 E F0 .575 (command can read or write \214les containing the history list and dis-)3.075 F .167(play the current list contents.)72 726 R(The)5.167 E F2(fc)2.667 E F0 -.2 (bu)2.667 G .167(iltin, adopted from POSIX.2 and the K).2 F .167 (orn Shell, allo)-.35 F .167(ws display and)-.25 F EP %%Page: 6 6 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF 2.5(-6-)279.67 48 S(re-e)72 84 Q -.15(xe)-.15 G .58 (cution, with optional editing, of commands from the history list.).15 F .58 (The readline library of)5.58 F .58(fers a set of)-.25 F 1.255(commands to sea\ rch the history list for a portion of the current input line or a string typed\ by the user)72 96 R(.)-.55 E(Finally)72 108 Q 3.499(,t)-.65 G(he)108.469 108 Q /F1 10/Times-Italic@0 SF(history)3.499 E F0(library)5.165 E 3.499(,g)-.65 G 1 (enerally incorporated directly into the readline library)191.362 108 R 3.5(,i) -.65 G 1(mplements a f)420.44 108 R(acility)-.1 E .613(for history recall, e)72 120 R .613(xpansion, and re-e)-.15 F -.15(xe)-.15 G .613(cution of pre).15 F .613(vious commands v)-.25 F .613(ery similar to csh \(`)-.15 F .612 (`bang history')-.74 F(',)-.74 E(so called because the e)72 132 Q (xclamation point introduces a history substitution\):)-.15 E/F2 10/Courier@0 SF 6($e)97 150 S(cho a b c d e)115 150 Q 6(abcde)97 162 S 6($!)97 174 S 6 (!fghi)115 174 S(echo a b c d e f g h i)97 186 Q 6(abcdefghi)97 198 S 6($!)97 210 S(-2)115 210 Q(echo a b c d e)97 222 Q 6(abcde)97 234 S 6($e)97 246 S (cho !-2:1-4)115 246 Q(echo a b c d)97 258 Q 6(abcd)97 270 S F0 1.456 (The command history is only sa)72 291.6 R -.15(ve)-.2 G 3.957(dw).15 G 1.457 (hen the shell is interacti)232.599 291.6 R -.15(ve)-.25 G 3.957(,s).15 G 3.957 (oi)352.804 291.6 S 3.957(ti)364.541 291.6 S 3.957(sn)374.058 291.6 S 1.457 (ot a)386.905 291.6 R -.25(va)-.2 G 1.457(ilable for use by shell).25 F (scripts.)72 303.6 Q/F3 10/Times-Bold@0 SF 2.5(4.5. New)72 327.6 R(Shell V)2.5 E(ariables)-.92 E F0 .59(There are a number of con)97 343.2 R -.15(ve)-.4 G .589(nience v).15 F .589(ariables that Bash interprets to mak)-.25 F 3.089(el) -.1 G .589(ife easier)403.093 343.2 R 5.589(.T)-.55 G .589(hese include)453.701 343.2 R F3(FIGNORE)72 355.2 Q F0 3.973(,w)C 1.473 (hich is a set of \214lename suf)132.363 355.2 R<8c78>-.25 E 1.474 (es identifying \214les to e)-.15 F 1.474(xclude when completing \214lenames;) -.15 F F3(HOSTTYPE)72 367.2 Q F0 2.932(,w)C .432 (hich is automatically set to a string describing the type of hardw)139.112 367.2 R .431(are on which Bash is cur)-.1 F(-)-.2 E .335(rently e)72 379.2 R -.15(xe)-.15 G(cuting;).15 E F3(command_oriented_history)2.835 E F0 2.835(,w)C .335(hich directs Bash to sa)272.685 379.2 R .635 -.15(ve a)-.2 H .336 (ll lines of a multiple-line com-).15 F 1.071(mand such as a)72 391.2 R F1 (while)3.571 E F0(or)3.571 E F1(for)3.571 E F0 1.071 (loop in a single history entry)3.571 F 3.57(,a)-.65 G(llo)321.92 391.2 Q 1.07 (wing easy re-editing; and)-.25 F F3(IGNOREEOF)3.57 E F0(,)A .747(whose v)72 403.2 R .747(alue indicates the number of consecuti)-.25 F 1.047 -.15(ve E)-.25 H .747(OF characters that an interacti).15 F 1.048 -.15(ve s)-.25 H .748 (hell will read before).15 F -.15(ex)72 415.2 S 1.432(iting \255 an easy w).15 F 1.432(ay to k)-.1 F 1.432(eep yourself from being logged out accidentally)-.1 F 6.432(.T)-.65 G(he)399.926 415.2 Q F3(auto_r)3.932 E(esume)-.18 E F0 -.25(va) 3.932 G(riable).25 E .571(alters the w)72 427.2 R .571 (ay the shell treats simple command names: if job control is acti)-.1 F -.15 (ve)-.25 G 3.071(,a).15 G .571(nd this v)396.954 427.2 R .571 (ariable is set, sin-)-.25 F(gle-w)72 439.2 Q .239(ord simple commands without\ redirections cause the shell to \214rst look for and restart a suspended job) -.1 F(with that name before starting a ne)72 451.2 Q 2.5(wp)-.25 G(rocess.) 225.33 451.2 Q F3 2.5(4.6. Brace)72 475.2 R(Expansion)2.5 E F0 .653 (Since sh of)97 490.8 R .653(fers no con)-.25 F -.15(ve)-.4 G .653(nient w).15 F .653(ay to generate arbitrary strings that share a common pre\214x or suf)-.1 F<8c78>-.25 E 2.124(\(\214lename e)72 502.8 R 2.124 (xpansion requires that the \214lenames e)-.15 F 2.123(xist\), Bash implements) -.15 F F1(br)4.623 E 2.123(ace e)-.15 F(xpansion)-.2 E F0 4.623(,ac)C (apability)469 502.8 Q(pick)72 514.8 Q .773(ed up from csh.)-.1 F .774(Brace e) 5.773 F .774(xpansion is similar to \214lename e)-.15 F .774(xpansion, b)-.15 F .774(ut the strings generated need not)-.2 F 1.107(correspond to e)72 526.8 R 1.107(xisting \214les.)-.15 F 3.607(Ab)6.107 G 1.107(race e)207.655 526.8 R 1.107(xpression consists of an optional)-.15 F F1(pr)3.606 E(eamble)-.37 E F0 3.606(,f)1.666 G(ollo)419.286 526.8 Q 1.106(wed by a pair of)-.25 F 2.809 (braces enclosing a series of comma-separated strings, and an optional)72 538.8 R F1(postamble)5.31 E F0 7.81(.T)1.666 G 2.81(he preamble is)440.06 538.8 R(pr\ epended to each string within the braces, and the postamble is then appended t\ o each resulting string:)72 550.8 Q F2 6($e)97 568.8 S(cho a{d,c,b}e)115 568.8 Q(ade ace abe)97 580.8 Q F0 .306(As this e)72 602.4 R .306 (xample demonstrates, the results of brace e)-.15 F .305 (xpansion are not sorted, as the)-.15 F 2.805(ya)-.15 G .305 (re by \214lename e)416.315 602.4 R(xpan-)-.15 E(sion.)72 614.4 Q F3 2.5 (4.7. Pr)72 638.4 R(ocess Substitution)-.18 E F0 .457 (On systems that can support it, Bash pro)97 654 R .457(vides a f)-.15 F .457 (acility kno)-.1 F .458(wn as)-.25 F F1(pr)2.958 E .458(ocess substitution)-.45 F F0 5.458(.P)C .458(rocess sub-)458.832 654 R .347(stitution is similar to co\ mmand substitution in that its speci\214cation includes a command to e)72 666 R -.15(xe)-.15 G .346(cute, b).15 F .346(ut the)-.2 F .181 (shell does not collect the command')72 678 R 2.681(so)-.55 G .181 (utput and insert it into the command line.)228.076 678 R(Rather)5.181 E 2.681 (,B)-.4 G .182(ash opens a pipe)437.635 678 R 1.763 (to the command, which is run in the background.)72 690 R 1.763 (The shell uses named pipes \(FIFOs\) or the)6.763 F F1(/de)4.263 E(v/fd)-.15 E F0 .961(method of naming open \214les to e)72 702 R .962 (xpand the process substitution to a \214lename which connects to the pipe)-.15 F .104(when opened.)72 714 R .103(This \214lename becomes the result of the e) 5.104 F 2.603(xpansion. Process)-.15 F .103(substitution can be used to com-) 2.603 F(pare the outputs of tw)72 726 Q 2.5(od)-.1 G(if)171.61 726 Q(ferent v) -.25 E(ersions of an application as part of a re)-.15 E(gression test:)-.15 E EP %%Page: 7 7 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF 2.5(-7-)279.67 48 S/F1 10/Courier@0 SF 6($c)97 84 S (mp <\(old_prog\) <\(new_prog\))115 84 Q/F2 10/Times-Bold@0 SF 2.5(4.8. Pr)72 114 R(ompt Customization)-.18 E F0 2.229(One of the more popular interacti)97 129.6 R 2.529 -.15(ve f)-.25 H 2.229(eatures that Bash pro).15 F 2.23 (vides is the ability to customize the)-.15 F 3.234(prompt. Both)72 141.6 R F2 ($PS1)3.234 E F0(and)3.234 E F2($PS2,)3.234 E F0 .734 (the primary and secondary prompts, are e)3.234 F .733 (xpanded before being displayed.)-.15 F -.15(Pa)72 153.6 S .804(rameter and v) .15 F .804(ariable e)-.25 F .805 (xpansion is performed when the prompt string is e)-.15 F .805(xpanded, so an) -.15 F 3.305(ys)-.15 G .805(hell v)453.735 153.6 R(ariable)-.25 E .729 (can be put into the prompt \(e.g.,)72 165.6 R F2($SHL)3.228 E(VL)-.92 E F0 3.228(,w)C .728(hich indicates ho)258.568 165.6 R 3.228(wd)-.25 G .728 (eeply the current shell is nested\).)342.992 165.6 R(Bash)5.728 E 1.895 (specially interprets characters in the prompt string preceded by a backslash.) 72 177.6 R 1.895(Some of these backslash)6.895 F .874 (escapes are replaced with the current time, the date, the current w)72 189.6 R .874(orking directory)-.1 F 3.373(,t)-.65 G .873(he username, and the)416.961 189.6 R .78(command number or history number of the command being entered.)72 201.6 R .781(There is e)5.781 F -.15(ve)-.25 G 3.281(nab).15 G .781 (ackslash escape to)429.128 201.6 R .007 (cause the shell to change its prompt when running as root after an)72 213.6 R /F3 10/Times-Italic@0 SF(su)2.507 E F0 5.007(.B)C .007 (efore printing each primary prompt,)360.392 213.6 R .305(Bash e)72 225.6 R .305(xpands the v)-.15 F(ariable)-.25 E F2($PR)2.805 E(OMPT_COMMAND)-.3 E F0 .305(and, if it has a v)2.805 F .306(alue, e)-.25 F -.15(xe)-.15 G .306 (cutes the e).15 F .306(xpanded v)-.15 F .306(alue as)-.25 F 3.735(ac)72 237.6 S 1.235(ommand, allo)84.615 237.6 R 1.234 (wing additional prompt customization.)-.25 F -.15(Fo)6.234 G 3.734(re).15 G 1.234(xample, this assignment causes the current)327.3 237.6 R(user)72 249.6 Q 2.917(,t)-.4 G .417 (he current host, the time, the last component of the current w)96.457 249.6 R .417(orking directory)-.1 F 2.917(,t)-.65 G .418(he le)417.188 249.6 R -.15(ve) -.25 G 2.918(lo).15 G 2.918(fs)456.504 249.6 S .418(hell nest-)466.642 249.6 R (ing, and the history number of the current command to be embedded into the pr\ imary prompt:)72 261.6 Q F1 6($P)97 279.6 S (S1='\\u@\\h [\\t] \\W\($SHLVL:\\!\)\\$ ')115 279.6 Q (chet@odin [21:03:44] documentation\(2:636\)$ cd ..)97 291.6 Q (chet@odin [21:03:54] src\(2:637\)$)97 303.6 Q F0 .146 (The string being assigned is surrounded by single quotes so that if it is e)72 325.2 R .146(xported, the v)-.15 F .146(alue of)-.25 F F2($SHL)2.646 E(VL)-.92 E F0(will)2.646 E(be updated by a child shell:)72 337.2 Q F1 (chet@odin [21:17:35] src\(2:638\)$ export PS1)97 355.2 Q (chet@odin [21:17:40] src\(2:639\)$ bash)97 367.2 Q (chet@odin [21:17:46] src\(3:696\)$)97 379.2 Q F0 (The \\$ escape is displayed as `)72 400.8 Q(`)-.74 E F2($)A F0 1.48 -.74('' w) D(hen running as a normal user).74 E 2.5(,b)-.4 G(ut as `)342.08 400.8 Q(`)-.74 E F2(#)A F0 1.48 -.74('' w)D(hen running as root.).74 E F2 2.5(4.9. File)72 424.8 R(System V)2.5 E(iews)-.37 E F0 .029(Since Berk)97 440.4 R(ele)-.1 E 2.529(yi)-.15 G .029 (ntroduced symbolic links in 4.2 BSD, one of their most anno)162.908 440.4 R .03(ying properties has been)-.1 F 1.701(the `)72 452.4 R(`w)-.74 E(arping')-.1 E 4.201('t)-.74 G 4.201(oac)139.912 452.4 S 1.701(ompletely dif)162.194 452.4 R 1.701(ferent area of the \214le system when using)-.25 F F2(cd)4.2 E F0 4.2(,a) C 1.7(nd the resultant non-)416.41 452.4 R(intuiti)72 464.4 Q .658 -.15(ve b) -.25 H(eha).15 E .359(vior of `)-.2 F(`)-.74 E F2 .359(cd ..)B F0 -.74('')C 5.359(.T).74 G(he)200.304 464.4 Q/F4 9/Times-Roman@0 SF(UNIX)2.859 E F0 -.1(ke) 2.859 G .359(rnel treats symbolic links).1 F F3(physically)2.859 E F0 5.359(.W) 1.666 G .359(hen the k)411.574 464.4 R .359(ernel is trans-)-.1 F .401(lating \ a pathname in which one component is a symbolic link, it replaces all or part \ of the pathname while)72 476.4 R .946(processing the link.)72 488.4 R .946 (If the contents of the symbolic link be)5.946 F .946(gin with a slash, the k) -.15 F .947(ernel replaces the path-)-.1 F .661 (name entirely; if not, the link contents replace the current component.)72 500.4 R .66(In either case, the symbolic link is)5.66 F 2.546(visible. If)72 512.4 R .046(the link v)2.546 F .047 (alue is an absolute pathname, the user \214nds himself in a completely dif) -.25 F .047(ferent part of the)-.25 F(\214le system.)72 524.4 Q .599(Bash pro) 97 540 R .599(vides a)-.15 F F3(lo)3.099 E(gical)-.1 E F0(vie)4.765 E 3.099(wo) -.25 G 3.099(ft)224.761 540 S .599(he \214le system.)233.97 540 R .599 (In this def)5.599 F .599(ault mode, command and \214lename com-)-.1 F .522 (pletion and b)72 552 R .522(uiltin commands such as)-.2 F F2(cd)3.022 E F0 (and)3.022 E F2(pushd)3.022 E F0 .522(which change the current w)3.022 F .522 (orking directory transpar)-.1 F(-)-.2 E .127(ently follo)72 564 R 2.627(ws) -.25 G .127(ymbolic links as if the)127.004 564 R 2.627(yw)-.15 G .127 (ere directories.)231.099 564 R(The)5.126 E F2($PWD)2.626 E F0 -.25(va)2.626 G .126(riable, which holds the shell').25 F 2.626(si)-.55 G .126(dea of)479.164 564 R .366(the current w)72 576 R .366(orking directory)-.1 F 2.866(,d)-.65 G .367(epends on the path used to reach the directory rather than its ph)200.184 576 R .367(ysical loca-)-.05 F(tion in the local \214le system hierarch)72 588 Q 3.8 -.65(y. F)-.05 H(or e).5 E(xample:)-.15 E F1 6($c)97 606 S 6(d/)115 606 S (usr/local/bin)133 606 Q 6($e)97 618 S(cho $PWD)115 618 Q(/usr/local/bin)97 630 Q 6($p)97 642 S(wd)115 642 Q(/usr/local/bin)97 654 Q 6($/)97 666 S(bin/pwd)115 666 Q(/net/share/sun4/local/bin)97 678 Q 6($c)97 690 S 6(d.)115 690 S(.)133 690 Q 6($p)97 702 S(wd)115 702 Q(/usr/local)97 714 Q 6($/)97 726 S(bin/pwd)115 726 Q EP %%Page: 8 8 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF 2.5(-8-)279.67 48 S/F1 10/Courier@0 SF (/net/share/sun4/local)97 84 Q 6($c)97 96 S 6(d.)115 96 S(.)133 96 Q 6($p)97 108 S(wd)115 108 Q(/usr)97 120 Q 6($/)97 132 S(bin/pwd)115 132 Q(/usr)97 144 Q F0 .3(One problem with this, of course, arises when programs that do not under\ stand the shell')72 165.6 R 2.8(sl)-.55 G .3(ogical notion of)440.07 165.6 R .717(the \214le system interpret `)72 177.6 R(`..)-.74 E 2.197 -.74('' d)-.7 H (if).74 E(ferently)-.25 E 5.717(.T)-.65 G .717 (his generally happens when Bash completes \214lenames contain-)246.521 177.6 R .977(ing `)72 189.6 R(`..)-.74 E 2.457 -.74('' a)-.7 H .977 (ccording to a logical hierarch).74 F 3.476(yw)-.05 G .976 (hich does not correspond to their ph)249.056 189.6 R .976(ysical location.) -.05 F -.15(Fo)5.976 G 3.476(ru).15 G(sers)488.45 189.6 Q (who \214nd this troublesome, a corresponding)72 201.6 Q/F2 10/Times-Italic@0 SF(physical)2.5 E F0(vie)4.166 E 2.5(wo)-.25 G 2.5(ft)312.006 201.6 S (he \214le system is a)320.616 201.6 Q -.25(va)-.2 G(ilable:).25 E F1 6($c)97 219.6 S 6(d/)115 219.6 S(usr/local/bin)133 219.6 Q 6($p)97 231.6 S(wd)115 231.6 Q(/usr/local/bin)97 243.6 Q 6($s)97 255.6 S(et -o physical)115 255.6 Q 6($p)97 267.6 S(wd)115 267.6 Q(/net/share/sun4/local/bin)97 279.6 Q/F3 10/Times-Bold@0 SF 2.5(4.10. Inter)72 309.6 R(nationalization)-.15 E F0 .052 (One of the most signi\214cant impro)97 325.2 R -.15(ve)-.15 G .052(ments in v) .15 F .053(ersion 1.13 of Bash w)-.15 F .053(as the change to `)-.1 F .053 (`eight-bit clean-)-.74 F(liness')72 337.2 Q 2.846('. Pre)-.74 F .346(vious v) -.25 F .345 (ersions used the eighth bit of characters to mark whether or not the)-.15 F 2.845(yw)-.15 G .345(ere quoted when)437.22 337.2 R 1.495(performing w)72 349.2 R 1.495(ord e)-.1 F 3.995(xpansions. While)-.15 F 1.495(this did not af)3.995 F 1.496(fect the majority of users, most of whom used only)-.25 F(se)72 361.2 Q -.15(ve)-.25 G 1.236(n-bit ASCII characters, some found it con\214ning.).15 F (Be)6.236 E 1.236(ginning with v)-.15 F 1.236(ersion 1.13, Bash implemented a) -.15 F(dif)72 373.2 Q .02 (ferent quoting mechanism that did not alter the eighth bit of characters.)-.25 F .021(This allo)5.021 F .021(wed Bash to manipulate)-.25 F .263 (\214les with `)72 385.2 R(`odd')-.74 E 2.763('c)-.74 G .262 (haracters in their names, b)146.019 385.2 R .262 (ut did nothing to help users enter those names, so v)-.2 F .262(ersion 1.13) -.15 F 1.458 (introduced changes to readline that made it eight-bit clean as well.)72 397.2 R 1.458(Options e)6.458 F 1.458(xist that force readline to)-.15 F .744(attach\ no special signi\214cance to characters with the eighth bit set \(the def)72 409.2 R .744(ault beha)-.1 F .744(vior is to con)-.2 F -.15(ve)-.4 G .744 (rt these).15 F 1.88(characters to meta-pre\214x)72 421.2 R 1.88(ed k)-.15 F 2.18 -.15(ey s)-.1 H 1.88 (equences\) and to output these characters without con).15 F -.15(ve)-.4 G 1.88 (rsion to meta-).15 F(pre\214x)72 433.2 Q .582(ed sequences.)-.15 F .581 (These changes, along with the e)5.582 F .581(xpansion of k)-.15 F -.15(ey)-.1 G .581(maps to a full eight bits, enable read-).15 F(line to w)72 445.2 Q (ork with most of the ISO-8859 f)-.1 E(amily of character sets, used by man)-.1 E 2.5(yE)-.15 G(uropean countries.)394.94 445.2 Q F3 2.5(4.11. POSIX)72 469.2 R (Mode)2.5 E F0 .584(Although Bash is intended to be POSIX.2 conformant, there \ are areas in which the def)97 484.8 R .584(ault beha)-.1 F(vior)-.2 E .463 (is not compatible with the standard.)72 496.8 R -.15(Fo)5.463 G 2.962(ru).15 G .462(sers who wish to operate in a strict POSIX.2 en)244.25 496.8 R .462 (vironment, Bash)-.4 F .505(implements a)72 508.8 R F2 .505(POSIX mode)3.005 F F0 5.505(.W)C .505(hen this mode is acti)199 508.8 R -.15(ve)-.25 G 3.005(,B) .15 G .505(ash modi\214es its def)304.455 508.8 R .505 (ault operation where it dif)-.1 F(fers)-.25 E .267 (from POSIX.2 to match the standard.)72 520.8 R .266 (POSIX mode is entered when Bash is started with the)5.267 F F3(-posix)2.766 E F0(option.)2.766 E .149(This feature is also a)72 532.8 R -.25(va)-.2 G .149 (ilable as an option to the).25 F F3(set)2.649 E F0 -.2(bu)2.649 G(iltin,).2 E F3 .149(set -o posix)2.649 F F0 5.149(.F)C .149 (or compatibility with other GNU)371.744 532.8 R(softw)72 544.8 Q 4.02(are tha\ t attempts to be POSIX.2 compliant, Bash also enters POSIX mode if the v)-.1 F (ariable)-.25 E F3($POSIXL)72 556.8 Q(Y_CORRECT)-.92 E F0 5.824 (is set when Bash is started or assigned a v)8.324 F 5.825(alue during e)-.25 F -.15(xe)-.15 G(cution.).15 E F3($POSIX_PED)72 568.8 Q(ANTIC)-.35 E F0 .27 (is accepted as well, to be compatible with some older GNU utilities.)2.77 F .27(When Bash is)5.27 F .428(started in POSIX mode, for e)72 580.8 R .428 (xample, it sources the \214le named by the v)-.15 F .429(alue of)-.25 F F3 ($ENV)2.929 E F0 .429(rather than the `)2.929 F(`nor)-.74 E(-)-.2 E(mal')72 592.8 Q 2.5('s)-.74 G(tartup \214les, and does not allo)99.31 592.8 Q 2.5(wr) -.25 G(eserv)227.66 592.8 Q(ed w)-.15 E(ords to be aliased.)-.1 E F3 2.5 (5. New)72 616.8 R -.25(Fe)2.5 G(atur).25 E(es and Futur)-.18 E 2.5(eP)-.18 G (lans)201.65 616.8 Q F0 1.632(There are se)97 632.4 R -.15(ve)-.25 G 1.632 (ral features introduced in the current v).15 F 1.631(ersion of Bash, v)-.15 F 1.631(ersion 1.14, and a number)-.15 F .241 (under consideration for future releases.)72 644.4 R .242 (This section will brie\215y detail the ne)5.242 F 2.742(wf)-.25 G .242 (eatures in v)395.702 644.4 R .242(ersion 1.14 and)-.15 F(describe se)72 656.4 Q -.15(ve)-.25 G(ral features that may appear in later v).15 E(ersions.)-.15 E F3 2.5(5.1. New)72 680.4 R -.25(Fe)2.5 G(atur).25 E(es in Bash-1.14)-.18 E F0 .884(The ne)97 696 R 3.384(wf)-.25 G .884(eatures a)139.058 696 R -.25(va)-.2 G .884(ilable in Bash-1.14 answer se).25 F -.15(ve)-.25 G .883 (ral of the most common requests for enhance-).15 F 2.931(ments. Most)72 708 R (notably)2.931 E 2.931(,t)-.65 G .432(here is a mechanism for including non-vi\ sible character sequences in prompts, such)164.873 708 R 1.533 (as those which cause a terminal to print characters in dif)72 720 R 1.532 (ferent colors or in standout mode.)-.25 F 1.532(There w)6.532 F(as)-.1 E EP %%Page: 9 9 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF 2.5(-9-)279.67 48 S 1.967(nothing pre)72 84 R -.15(ve) -.25 G 1.967(nting the use of these sequences in earlier v).15 F 1.967 (ersions, b)-.15 F 1.967(ut the readline redisplay algorithm)-.2 F (assumed each character occupied ph)72 96 Q(ysical screen space and w)-.05 E (ould wrap lines prematurely)-.1 E(.)-.65 E .13(Readline has a fe)97 111.6 R 2.63(wn)-.25 G .63 -.25(ew va)180.58 111.6 T .13(riables, se).25 F -.15(ve)-.25 G .13(ral ne).15 F 2.63(wb)-.25 G .13 (indable commands, and some additional emacs mode)290.19 111.6 R(def)72 123.6 Q .918(ault k)-.1 F 1.218 -.15(ey b)-.1 H 3.418(indings. A).15 F(ne)3.418 E 3.418 (wh)-.25 G .919 (istory search mode has been implemented: in this mode, readline searches) 199.03 123.6 R .336(the history for lines be)72 135.6 R .336 (ginning with the characters between the be)-.15 F .336 (ginning of the current line and the cursor)-.15 F(.)-.55 E .555(The e)72 147.6 R .556(xisting readline incremental search commands no longer match identical \ lines more than once.)-.15 F(File-)5.556 E 1.979(name completion no)72 159.6 R 4.479(we)-.25 G 1.979(xpands v)173.357 159.6 R 1.979 (ariables in directory names.)-.25 F 1.978(The history e)6.978 F 1.978 (xpansion f)-.15 F 1.978(acilities are no)-.1 F(w)-.25 E 1.449 (nearly completely csh-compatible: missing modi\214ers ha)72 171.6 R 1.749 -.15 (ve b)-.2 H 1.449(een added and history substitution has been).15 F -.15(ex)72 183.6 S(tended.).15 E(Se)97 199.2 Q -.15(ve)-.25 G .474 (ral of the features described earlier).15 F 2.973(,s)-.4 G .473(uch as)266.483 199.2 R/F1 10/Times-Bold@0 SF .473(set -o posix)2.973 F F0(and)2.973 E F1 ($POSIX_PED)2.973 E(ANTIC)-.35 E F0 2.973(,a)C .473(re ne)466.094 199.2 R 2.973 (wi)-.25 G(n)499 199.2 Q -.15(ve)72 211.2 S .106(rsion 1.14.).15 F .106 (There is a ne)5.106 F 2.606(ws)-.25 G .106(hell v)194.156 211.2 R(ariable,) -.25 E F1(OSTYPE)2.606 E F0 2.606(,t)C 2.606(ow)296.724 211.2 S .106 (hich Bash assigns a v)311.55 211.2 R .106(alue that identi\214es the v)-.25 F (er)-.15 E(-)-.2 E 1.38(sion of)72 223.2 R/F2 9/Times-Roman@0 SF(UNIX)3.88 E F0 (it')3.88 E 3.879(sr)-.55 G 1.379(unning on \(great for putting architecture-s\ peci\214c binary directories into the)150.57 223.2 R F1($P)3.879 E -.95(AT)-.74 G(H).95 E F0(\).)A -1 -.8(Tw o)72 235.2 T -.25(va)6.215 G 2.915(riables ha).25 F 3.215 -.15(ve b)-.2 H 2.915(een renamed:).15 F F1($HISTCONTR)5.416 E(OL)-.3 E F0(replaces)5.416 E F1($history_contr)5.416 E(ol)-.18 E F0 5.416(,a)C(nd) 432.454 235.2 Q F1($HOSTFILE)5.416 E F0(replaces)72 247.2 Q F1 ($hostname_completion_\214le)2.521 E F0 5.021(.I)C 2.521(nb)234.242 247.2 S .021(oth cases, the old names are accepted for backw)246.763 247.2 R .02 (ards compatibil-)-.1 F(ity)72 259.2 Q 5.676(.T)-.65 G .677(he ksh)96.196 259.2 R/F3 10/Times-Italic@0 SF(select)3.177 E F0 .677(construct, which allo)4.843 F .677(ws the generation of simple menus, has been implemented.)-.25 F(Ne)5.677 E (w)-.25 E 2.892(capabilities ha)72 271.2 R 3.192 -.15(ve b)-.2 H 2.892 (een added to e).15 F 2.892(xisting v)-.15 F(ariables:)-.25 E F1($auto_r)5.392 E(esume)-.18 E F0 2.892(can no)5.392 F 5.392(wt)-.25 G(ak)404.13 271.2 Q 5.391 (ev)-.1 G 2.891(alues of)428.051 271.2 R F3 -.2(ex)5.391 G(act).2 E F0(or)7.057 E F3(substring)72 283.2 Q F0 3.278(,a)1.666 G(nd)121.114 283.2 Q F1($HISTCONTR) 3.278 E(OL)-.3 E F0 .778(understands the v)3.278 F(alue)-.25 E F3(ignor)3.278 E (eboth)-.37 E F0 3.278(,w)1.666 G .778(hich combines the tw)366.248 283.2 R 3.278(op)-.1 G(re)467.03 283.2 Q(viously)-.25 E 1.556(acceptable v)72 295.2 R 4.056(alues. The)-.25 F F1(dirs)4.056 E F0 -.2(bu)4.056 G 1.556 (iltin has acquired options to print out speci\214c members of the directory).2 F 3.062(stack. The)72 307.2 R F1($nolinks)3.062 E F0 -.25(va)3.062 G .562 (riable, which forces a ph).25 F .562(ysical vie)-.05 F 3.062(wo)-.25 G 3.062 (ft)322.028 307.2 S .563(he \214le system, has been superseded by the)331.2 307.2 R F172 319.2 Q F0 .494(option to the)2.994 F F1(set)2.994 E F0 -.2 (bu)2.994 G .494(iltin \(equi).2 F -.25(va)-.25 G .494(lent to).25 F F1 .494 (set -o ph)2.994 F(ysical)-.15 E F0 .493(\); the v)B .493 (ariable is retained for backw)-.25 F .493(ards compati-)-.1 F(bility)72 331.2 Q 5.196(.T)-.65 G .196(he v)106.276 331.2 R .196(ersion string contained in) -.15 F F1($B)2.696 E(ASH_VERSION)-.3 E F0(no)2.696 E 2.696(wi)-.25 G .196 (ncludes an indication of the patch le)335.558 331.2 R -.15(ve)-.25 G 2.696(la) .15 G(s)500.11 331.2 Q .665(well as the `)72 343.2 R(`b)-.74 E .665(uild v)-.2 F(ersion')-.15 E 3.165('. Some)-.74 F .665(little-used features ha)3.165 F .965 -.15(ve b)-.2 H .665(een remo).15 F -.15(ve)-.15 G 3.165(d: the).15 F F1(by) 3.165 E(e)-.1 E F0(synon)3.165 E .665(ym for)-.15 F F1(exit)3.165 E F0(and) 3.165 E(the)72 355.2 Q F1($NO_PR)3.498 E(OMPT_V)-.3 E(ARS)-1.35 E F0 -.25(va) 3.498 G .998(riable are gone.).25 F .998(There is no)5.998 F 3.498(wa)-.25 G 3.498(no)331.114 355.2 S -2.19 -.18(rg a)344.612 355.2 T .998 (nized test suite that can be run as a).18 F(re)72 367.2 Q (gression test when b)-.15 E(uilding a ne)-.2 E 2.5(wv)-.25 G(ersion of Bash.) 222.34 367.2 Q 1.696(The documentation has been thoroughly o)97 382.8 R -.15 (ve)-.15 G 1.696(rhauled: there is a ne).15 F 4.196(wm)-.25 G 1.695 (anual page on the readline)392.25 382.8 R .467(library and the)72 394.8 R F3 (info)2.967 E F0 .467(\214le has been updated to re\215ect the current v)2.967 F 2.968(ersion. As)-.15 F(al)2.968 E -.1(wa)-.1 G .468(ys, as man).1 F 2.968 (yb)-.15 G .468(ugs as possi-)451.954 394.8 R(ble ha)72 406.8 Q .3 -.15(ve b) -.2 H(een \214x).15 E(ed, although some surely remain.)-.15 E F1 2.5 (5.2. Other)72 430.8 R -.25(Fe)2.5 G(atur).25 E(es)-.18 E F0 1.68 (There are a fe)97 446.4 R 4.18(wf)-.25 G 1.68 (eatures that I hope to include in later Bash releases.)171.76 446.4 R 1.68 (Some are based on w)6.68 F(ork)-.1 E(already done in other shells.)72 458.4 Q .958(In addition to simple v)97 474 R .959 (ariables, a future release of Bash will include one-dimensional arrays, using) -.25 F .206(the ksh implementation of arrays as a model.)72 486 R .205 (Additions to the ksh syntax, such as)5.205 F F3(varname)2.705 E F0 .205 (=\( ... \) to assign)B 2.587(al)72 498 S .087(ist of w)81.807 498 R .088 (ords directly to an array and a mechanism to allo)-.1 F 2.588(wt)-.25 G(he) 320.248 498 Q F1 -.18(re)2.588 G(ad).18 E F0 -.2(bu)2.588 G .088 (iltin to read a list of v).2 F .088(alues directly)-.25 F .092(into an array) 72 510 R 2.592(,w)-.65 G .092(ould be desirable.)134.286 510 R(Gi)5.092 E -.15 (ve)-.25 G 2.592(nt).15 G .092(hose e)239.794 510 R .092(xtensions, the ksh) -.15 F F1 .092(set \255A)2.592 F F0 .091(syntax may not be w)2.591 F .091 (orth support-)-.1 F(ing \(the)72 522 Q F12.5 E F0 (option assigns a list of v)2.5 E(alues to an array)-.25 E 2.5(,b)-.65 G (ut is a rather peculiar special case\).)292.41 522 Q .76 (Some shells include a means of)97 537.6 R F3(pr)3.26 E -.1(og)-.45 G -.15(ra) .1 G(mmable).15 E F0 -.1(wo)3.26 G .76 (rd completion, where the user speci\214es on a per).1 F(-)-.2 E .163 (command basis ho)72 549.6 R 2.663(wt)-.25 G .163(he ar)159.179 549.6 R .163(g\ uments of the command are to be treated when completion is attempted: as \214l\ e-)-.18 F .194(names, hostnames, e)72 561.6 R -.15(xe)-.15 G .194 (cutable \214les, and so on.).15 F .195 (The other aspects of the current Bash implementation could)5.195 F .482 (remain as-is; the e)72 573.6 R .482(xisting heuristics w)-.15 F .481 (ould still be v)-.1 F 2.981(alid. Only)-.25 F .481(when completing the ar) 2.981 F .481(guments to a simple)-.18 F(command w)72 585.6 Q (ould the programmable completion be in ef)-.1 E(fect.)-.25 E .479(It w)97 601.2 R .479(ould also be nice to gi)-.1 F .779 -.15(ve t)-.25 H .479 (he user \214ner).15 F .479(-grained control o)-.2 F -.15(ve)-.15 G 2.98(rw).15 G .48(hich commands are sa)363.92 601.2 R -.15(ve)-.2 G 2.98(do).15 G .48 (nto the)476.02 601.2 R 1.786(history list.)72 613.2 R 1.786 (One proposal is for a v)6.786 F 1.786(ariable, tentati)-.25 F -.15(ve)-.25 G 1.786(ly named).15 F F1(HISTIGNORE)4.286 E F0 4.285(,w)C 1.785(hich w)415.145 613.2 R 1.785(ould contain a)-.1 F .496(colon-separated list of commands.)72 625.2 R .496(Lines be)5.496 F .496 (ginning with these commands, after the restrictions of)-.15 F F1($HIST)2.997 E (-)-.92 E(CONTR)72 637.2 Q(OL)-.3 E F0(ha)2.65 E .45 -.15(ve b)-.2 H .15 (een applied, w).15 F .15(ould not be placed onto the history list.)-.1 F .15 (The shell pattern-matching capa-)5.15 F(bilities could also be a)72 649.2 Q -.25(va)-.2 G(ilable when specifying the contents of).25 E F1($HISTIGNORE)2.5 E F0(.)A .729(One thing that ne)97 664.8 R .729(wer shells such as)-.25 F F1 (wksh)3.229 E F0 .729(\(also kno)3.229 F .729(wn as)-.25 F F1(dtksh)3.23 E F0 3.23(\)p)C(ro)370.79 664.8 Q .73(vide is a command to dynami-)-.15 F 1.189 (cally load code implementing additional b)72 676.8 R 1.189 (uiltin commands into a running shell.)-.2 F 1.188(This ne)6.188 F 3.688(wb) -.25 G 1.188(uiltin w)454.292 676.8 R(ould)-.1 E(tak)72 688.8 Q 2.69(ea)-.1 G 2.69(no)95.69 688.8 S .19(bject \214le or shared library implementing the `) 108.38 688.8 R(`body')-.74 E 2.69('o)-.74 G 2.69(ft)327.83 688.8 S .19(he b) 336.63 688.8 R .19(uiltin \()-.2 F F3(xxx_b)A(uiltin\(\))-.2 E F0 .19 (for those f)2.69 F(amiliar)-.1 E .052 (with Bash internals\) and a structure containing the name of the ne)72 700.8 R 2.552(wc)-.25 G .051(ommand, the function to call when the)349.544 700.8 R(ne) 72 712.8 Q 3.458(wb)-.25 G .958(uiltin is in)96.668 712.8 R -.2(vo)-.4 G -.1 (ke).2 G 3.458(d\().1 G .959 (presumably de\214ned in the shared object speci\214ed as an ar)169.682 712.8 R .959(gument\), and the docu-)-.18 F 1.352(mentation to be printed by the)72 724.8 R F1(help)3.851 E F0 1.351 (command \(possibly present in the shared object as well\).)3.851 F 1.351(It w) 6.351 F(ould)-.1 E EP %%Page: 10 10 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF 2.5(-1)277.17 48 S 2.5(0-)288 48 S (manage the details of e)72 84 Q(xtending the internal table of b)-.15 E (uiltins.)-.2 E 3.291(Af)97 99.6 S 1.291 -.25(ew o)110.841 99.6 T .791(ther b) .25 F .791(uiltins w)-.2 F .791(ould also be desirable: tw)-.1 F 3.291(oa)-.1 G .791(re the POSIX.2)307.609 99.6 R/F1 10/Times-Bold@0 SF(getconf)3.292 E F0 .792(command, which prints)3.292 F 1.412(the v)72 111.6 R 1.412 (alues of system con\214guration v)-.25 F 1.411 (ariables de\214ned by POSIX.2, and a)-.25 F F1(diso)3.911 E(wn)-.1 E F0 -.2 (bu)3.911 G 1.411(iltin, which causes a).2 F 1.173 (shell running with job control acti)72 123.6 R 1.473 -.15(ve t)-.25 H 3.673 (o`).15 G(`for)240.45 123.6 Q 1.173(get about')-.18 F 3.673('o)-.74 G 1.173 (ne or more background jobs in its internal jobs)307.966 123.6 R 3.465 (table. Using)72 135.6 R F1(getconf)3.465 E F0 3.465(,f)C .965(or e)167.655 135.6 R .965(xample, a user could retrie)-.15 F 1.264 -.15(ve a v)-.25 H .964 (alue for)-.1 F F1($P)3.464 E -.95(AT)-.74 G(H).95 E F0 .964 (guaranteed to \214nd all of the)3.464 F .884 (POSIX standard utilities, or \214nd out ho)72 147.6 R 3.385(wl)-.25 G .885 (ong \214lenames may be in the \214le system containing a speci\214ed)247.39 147.6 R(directory)72 159.6 Q(.)-.65 E 1.521 (There are no implementation timetables for an)97 175.2 R 4.021(yo)-.15 G 4.021 (ft)305.517 175.2 S 1.52(hese features, nor are there concrete plans to)315.648 175.2 R(include them.)72 187.2 Q(If an)5 E (yone has comments on these proposals, feel free to send me electronic mail.) -.15 E F1 2.5(6. Re\215ections)72 211.2 R(and Lessons Lear)2.5 E(ned)-.15 E F0 .433(The lesson that has been repeated most often during Bash de)97 226.8 R -.15(ve)-.25 G .433(lopment is that there are dark corners).15 F .181 (in the Bourne shell, and people use all of them.)72 238.8 R .18 (In the original description of the Bourne shell, quoting and)5.181 F .073(the\ shell grammar are both poorly speci\214ed and incomplete; subsequent descript\ ions ha)72 250.8 R .373 -.15(ve n)-.2 H .073(ot helped much.).15 F 1.856 (The grammar presented in Bourne')72 262.8 R 4.356(sp)-.55 G 1.856 (aper describing the shell distrib)232.64 262.8 R 1.855(uted with the Se)-.2 F -.15(ve)-.25 G 1.855(nth Edition of).15 F/F2 9/Times-Roman@0 SF(UNIX)72 274.8 Q F0 2.5<8769>C 2.5(ss)104.771 274.8 S 2.5(of)115.051 274.8 S(ar of)125.781 274.8 Q 2.5(ft)-.25 G(hat it does not allo)152.741 274.8 Q 2.5(wt)-.25 G(he command) 238.881 274.8 Q/F3 10/Courier@0 SF(who|wc)2.5 E F0 5(.I)C 2.5(nf)339.591 274.8 S(act, as T)350.321 274.8 Q(om Duf)-.8 E 2.5(fs)-.25 G(tates:)423.421 274.8 Q 1.375(Nobody really kno)97 290.4 R 1.375(ws what the Bourne shell')-.25 F 3.875 (sg)-.55 G 1.375(rammar is.)296.635 290.4 R(Ev)6.376 E 1.376(en e)-.15 F 1.376 (xamination of the source)-.15 F(code is little help.\210)97 302.4 Q .382 (The POSIX.2 standard includes a)72 318 R/F4 10/Times-Italic@0 SF(yacc)2.882 E F0 .382(grammar that comes close to capturing the Bourne shell')2.882 F 2.882 (sb)-.55 G(eha)472.11 318 Q(vior)-.2 E(,)-.4 E -.2(bu)72 330 S 3.246(ti).2 G 3.246(td)90.606 330 S(isallo)101.632 330 Q .747(ws some constructs which sh ac\ cepts without complaint \255 and there are scripts out there that)-.25 F .501 (use them.)72 342 R .501(It took a fe)5.501 F 3.001(wv)-.25 G .501 (ersions and se)176.256 342 R -.15(ve)-.25 G .501(ral b).15 F .5 (ug reports before Bash implemented sh-compatible quoting,)-.2 F .094 (and there are still some `)72 354 R(`le)-.74 E -.05(ga)-.15 G(l').05 E 2.594 ('s)-.74 G 2.594(hc)205.294 354 S .094 (onstructs which Bash \215ags as syntax errors.)217.328 354 R .095 (Complete sh compatibility)5.095 F(is a tough nut.)72 366 Q 1.231 (The shell is bigger and slo)97 381.6 R 1.231(wer than I w)-.25 F 1.231 (ould lik)-.1 F 1.23(e, though the current v)-.1 F 1.23 (ersion is substantially f)-.15 F(aster)-.1 E .086(than pre)72 393.6 R(viously) -.25 E 5.086(.T)-.65 G .087(he readline library could stand a substantial re) 146.822 393.6 R 2.587(write. A)-.25 F .087(hand-written parser to replace the) 2.587 F(current)72 405.6 Q F4(yacc)2.978 E F0 .478(-generated one w)B .477 (ould probably result in a speedup, and w)-.1 F .477(ould solv)-.1 F 2.977(eo) -.15 G .477(ne glaring problem:)406.469 405.6 R(the)5.477 E .199 (shell could parse commands in `)72 417.6 R(`$\(...\)')-.74 E 2.699('c)-.74 G .199(onstructs as the)236.954 417.6 R 2.699(ya)-.15 G .2 (re entered, rather than reporting errors when the)311.001 417.6 R (construct is e)72 429.6 Q(xpanded.)-.15 E 1.064(As al)97 445.2 R -.1(wa)-.1 G 1.064(ys, there is some chaf).1 F 3.564(ft)-.25 G 3.564(og)230.404 445.2 S 3.564(ow)243.968 445.2 S 1.064(ith the wheat.)259.752 445.2 R 1.063 (Areas of duplicated functionality need to be)6.063 F .382(cleaned up.)72 457.2 R .382(There are se)5.382 F -.15(ve)-.25 G .382 (ral cases where Bash treats a v).15 F .382 (ariable specially to enable functionality a)-.25 F -.25(va)-.2 G(ilable).25 E .185(another w)72 469.2 R .185(ay \()-.1 F F1($notify)A F0(vs.)2.684 E F1 .184 (set -o notify)5.184 F F0(and)2.684 E F1($nolinks)2.684 E F0(vs.)2.684 E F1 .184(set -o ph)2.684 F(ysical)-.15 E F0 2.684(,f)C .184 (or instance\); the special treatment)368.294 469.2 R 3.421(of the v)72 481.2 R 3.421(ariable name should probably be remo)-.25 F -.15(ve)-.15 G 5.921(d. A).15 F(fe)5.921 E 5.921(wm)-.25 G 3.422(ore things could stand remo)346.47 481.2 R -.25(va)-.15 G 3.422(l; the).25 F F1($allo)72 493.2 Q(w_null_glob_expansion)-.1 E F0(and)4.112 E F1($glob_dot_\214lenames)4.112 E F0 -.25(va)4.111 G 1.611 (riables are of particularly questionable v).25 F(alue.)-.25 E(The)72 505.2 Q F1($[...])3.977 E F0 1.477(arithmetic e)3.977 F -.25(va)-.25 G 1.478 (luation syntax is redundant no).25 F 3.978(wt)-.25 G 1.478 (hat the POSIX-mandated)312.76 505.2 R F1($\(\(...\)\))3.978 E F0 1.478 (construct has)3.978 F .326(been implemented, and could be deleted.)72 517.2 R .326(It w)5.326 F .326(ould be nice if the te)-.1 F .326(xt output by the)-.15 F F1(help)2.825 E F0 -.2(bu)2.825 G .325(iltin were e).2 F(xter)-.15 E(-)-.2 E .061(nal to the shell rather than compiled into it.)72 529.2 R .062(The beha) 5.062 F .062(vior enabled by)-.2 F F1($command_oriented_history)2.562 E F0 2.562(,w)C(hich)486.78 529.2 Q 1.125(causes the shell to attempt to sa)72 541.2 R 1.424 -.15(ve a)-.2 H 1.124 (ll lines of a multi-line command in a single history entry).15 F 3.624(,s)-.65 G 1.124(hould be)468.156 541.2 R(made the def)72 553.2 Q(ault and the v)-.1 E (ariable remo)-.25 E -.15(ve)-.15 G(d.).15 E F1 2.5(7. A)72 577.2 R -.1(va)-1 G (ilability).1 E F0 8.538(As with all other GNU softw)97 592.8 R 8.538 (are, Bash is a)-.1 F -.25(va)-.2 G 8.539(ilable for anon).25 F 8.539 (ymous FTP from)-.15 F F4(pr)72 604.8 Q(ep.ai.mit.edu:/pub/gnu)-.37 E F0 4.552 (and from other GNU softw)8.718 F 4.552(are mirror sites.)-.1 F 4.552 (The current v)9.552 F 4.552(ersion is in)-.15 F F4(bash-1.14.1.tar)72 616.8 Q (.gz)-1.11 E F0 .074(in that directory)4.24 F 5.075(.U)-.65 G(se)226.084 616.8 Q F4(ar)2.575 E -.15(ch)-.37 G(ie).15 E F0 .075(to \214nd the nearest archi) 4.241 F .375 -.15(ve s)-.25 H 2.575(ite. The).15 F .075(latest v)2.575 F .075 (ersion is al)-.15 F -.1(wa)-.1 G(ys).1 E -.2(av)72 628.8 S 3.659 (ailable for FTP from)-.05 F F4(bash.CWR)6.159 E -.25(U.)-.4 G(Edu:/pub/dist.) .25 E F0 3.658(Bash documentation is a)7.825 F -.25(va)-.2 G 3.658 (ilable for FTP from).25 F F4(bash.CWR)72 640.8 Q -.25(U.)-.4 G(Edu:/pub/bash.) .25 E F0 1.168(The Free Softw)97 656.4 R 1.168(are F)-.1 F 1.168 (oundation sells tapes and CD-R)-.15 F 1.169 (OMs containing Bash; send electronic mail to)-.4 F F3(gnu@prep.ai.mit.edu)72 668.4 Q F0(or call)2.5 E F3(+1-617-876-3296)2.5 E F0(for more information.)2.5 E .32 LW 76 678.4 72 678.4 DL 80 678.4 76 678.4 DL 84 678.4 80 678.4 DL 88 678.4 84 678.4 DL 92 678.4 88 678.4 DL 96 678.4 92 678.4 DL 100 678.4 96 678.4 DL 104 678.4 100 678.4 DL 108 678.4 104 678.4 DL 112 678.4 108 678.4 DL 116 678.4 112 678.4 DL 120 678.4 116 678.4 DL 124 678.4 120 678.4 DL 128 678.4 124 678.4 DL 132 678.4 128 678.4 DL 136 678.4 132 678.4 DL 140 678.4 136 678.4 DL 144 678.4 140 678.4 DL/F5 8/Times-Roman@0 SF 1.39(\207S. R. Bourne, `)72 688.4 R 1.389(`UNIX T)-.592 F 1.389(ime-Sharing System:)-.28 F 1.389(The UNIX Shell') 5.389 F(',)-.592 E/F6 8/Times-Italic@0 SF 1.389(Bell System T)3.389 F(ec)-.736 E 1.389(hnical J)-.12 F(ournal)-.2 E F5 3.389(,5)C 1.389(7\(6\), July-August,) 408.171 688.4 R(1978, pp. 1971-1990.)72 698.4 Q<8854>72 708.4 Q .684(om Duf) -.64 F .684(f, `)-.2 F .684(`Rc \255 A Shell for Plan 9 and)-.592 F/F7 7 /Times-Roman@0 SF(UNIX)2.684 E F5(systems')2.684 E(',)-.592 E F6(Pr)2.684 E .684(oc. of the Summer 1990 EUUG Confer)-.36 F(ence)-.296 E F5 2.685(,L)C .685 (ondon, July)428.499 708.4 R(,)-.52 E(1990, pp. 21-33.)72 718.4 Q EP %%Page: 11 11 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF 2.5(-1)277.17 48 S 2.5(1-)288 48 S .695 (Bash is also distrib)97 84 R .694(uted with se)-.2 F -.15(ve)-.25 G .694 (ral v).15 F .694(ersions of)-.15 F/F1 9/Times-Roman@0 SF(UNIX)3.194 E F0 .694 (-compatible systems.)B .694(It is included as /bin/sh)5.694 F .948 (and /bin/bash on se)72 96 R -.15(ve)-.25 G .948(ral Linux distrib).15 F .948 (utions \(more about the dif)-.2 F .948(ference in a moment\), and as contrib) -.25 F(uted)-.2 E(softw)72 108 Q(are in BSDI')-.1 E 2.5(sB)-.55 G (SD/386* and FreeBSD.)157.73 108 Q .599(The Linux distrib)97 123.6 R .599 (ution deserv)-.2 F .599(es special mention.)-.15 F .598(There are tw)5.599 F 3.098(oc)-.1 G .598(on\214gurations included in the stan-)364.948 123.6 R .547 (dard Bash distrib)72 135.6 R .547(ution: a `)-.2 F(`normal')-.74 E 3.047('c) -.74 G .548 (on\214guration, in which all of the standard features are included, and a) 222.755 135.6 R -.74(``)72 147.6 S(minimal').74 E 2.792('c)-.74 G .292(on\214g\ uration, which omits job control, aliases, history and command line editing, t\ he directory)124.412 147.6 R .747(stack and)72 159.6 R/F2 10/Times-Bold@0 SF (pushd/popd/dirs,)3.247 E F0 .747 (process substitution, prompt string special character decoding, and the)3.247 F/F3 10/Times-Italic@0 SF(select)3.247 E F0 3.369(construct. This)72 171.6 R .869(minimal v)3.369 F .869 (ersion is designed to be a drop-in replacement for the traditional)-.15 F F1 (UNIX)3.368 E F0(/bin/sh,)3.368 E(and is included as the Linux /bin/sh in se)72 183.6 Q -.15(ve)-.25 G(ral packagings.).15 E F2 2.5(8. Conclusion)72 207.6 R F0 .8(Bash is a w)97 223.2 R(orth)-.1 E 3.3(ys)-.05 G .8(uccessor to sh.)173.379 223.2 R .8(It is suf)5.8 F .8(\214ciently portable to run on nearly e)-.25 F -.15(ve)-.25 G .8(ry v).15 F .8(ersion of)-.15 F F1(UNIX)3.3 E F0 .311 (from 4.3 BSD to SVR4.2, and se)72 235.2 R -.15(ve)-.25 G(ral).15 E F1(UNIX) 2.811 E F0 -.1(wo)2.811 G(rkalik).1 E 2.811(es. It)-.1 F .31(is rob)2.81 F .31 (ust enough to replace sh on most of those)-.2 F 1.515(systems, and pro)72 247.2 R 1.515(vides more functionality)-.15 F 6.515(.I)-.65 G 4.015(th)254.315 247.2 S 1.515(as se)266.11 247.2 R -.15(ve)-.25 G 1.515(ral thousand re).15 F 1.515(gular users, and their feedback has)-.15 F(helped to mak)72 259.2 Q 2.5 (ei)-.1 G 2.5(ta)138.28 259.2 S 2.5(sg)148 259.2 S (ood as it is today \255 a testament to the bene\214ts of free softw)159.39 259.2 Q(are.)-.1 E .32 LW 76 698 72 698 DL 80 698 76 698 DL 84 698 80 698 DL 88 698 84 698 DL 92 698 88 698 DL 96 698 92 698 DL 100 698 96 698 DL 104 698 100 698 DL 108 698 104 698 DL 112 698 108 698 DL 116 698 112 698 DL 120 698 116 698 DL 124 698 120 698 DL 128 698 124 698 DL 132 698 128 698 DL 136 698 132 698 DL 140 698 136 698 DL 144 698 140 698 DL/F4 8/Times-Roman@0 SF (*BSD/386 is a trademark of Berk)72 708 Q(ele)-.08 E 2(yS)-.12 G(oftw)198.896 708 Q(are Design, Inc.)-.08 E EP %%Trailer end %%EOF doc/rose94.ps100664 436 0 305031 6773742075 11616 0ustar chetwheel%!PS-Adobe-3.0 %%Creator: groff version 1.08 %%DocumentNeededResources: font Times-Bold %%+ font Times-Italic %%+ font Times-Roman %%+ font Courier %%+ font Symbol %%DocumentSuppliedResources: procset grops 1.08 0 %%Pages: 13 %%PageOrder: Ascend %%Orientation: Portrait %%EndComments %%BeginProlog %%BeginResource: procset grops 1.08 0 /setpacking where{ pop currentpacking true setpacking }if /grops 120 dict dup begin /SC 32 def /A/show load def /B{0 SC 3 -1 roll widthshow}bind def /C{0 exch ashow}bind def /D{0 exch 0 SC 5 2 roll awidthshow}bind def /E{0 rmoveto show}bind def /F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def /G{0 rmoveto 0 exch ashow}bind def /H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def /I{0 exch rmoveto show}bind def /J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def /K{0 exch rmoveto 0 exch ashow}bind def /L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def /M{rmoveto show}bind def /N{rmoveto 0 SC 3 -1 roll widthshow}bind def /O{rmoveto 0 exch ashow}bind def /P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def /Q{moveto show}bind def /R{moveto 0 SC 3 -1 roll widthshow}bind def /S{moveto 0 exch ashow}bind def /T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def /SF{ findfont exch [exch dup 0 exch 0 exch neg 0 0]makefont dup setfont [exch/setfont cvx]cvx bind def }bind def /MF{ findfont [5 2 roll 0 3 1 roll neg 0 0]makefont dup setfont [exch/setfont cvx]cvx bind def }bind def /level0 0 def /RES 0 def /PL 0 def /LS 0 def /PLG{ gsave newpath clippath pathbbox grestore exch pop add exch pop }bind def /BP{ /level0 save def 1 setlinecap 1 setlinejoin 72 RES div dup scale LS{ 90 rotate }{ 0 PL translate }ifelse 1 -1 scale }bind def /EP{ level0 restore showpage }bind def /DA{ newpath arcn stroke }bind def /SN{ transform .25 sub exch .25 sub exch round .25 add exch round .25 add exch itransform }bind def /DL{ SN moveto SN lineto stroke }bind def /DC{ newpath 0 360 arc closepath }bind def /TM matrix def /DE{ TM currentmatrix pop translate scale newpath 0 0 .5 0 360 arc closepath TM setmatrix }bind def /RC/rcurveto load def /RL/rlineto load def /ST/stroke load def /MT/moveto load def /CL/closepath load def /FL{ currentgray exch setgray fill setgray }bind def /BL/fill load def /LW/setlinewidth load def /RE{ findfont dup maxlength 1 index/FontName known not{1 add}if dict begin { 1 index/FID ne{def}{pop pop}ifelse }forall /Encoding exch def dup/FontName exch def currentdict end definefont pop }bind def /DEFS 0 def /EBEGIN{ moveto DEFS begin }bind def /EEND/end load def /CNT 0 def /level1 0 def /PBEGIN{ /level1 save def translate div 3 1 roll div exch scale neg exch neg exch translate 0 setgray 0 setlinecap 1 setlinewidth 0 setlinejoin 10 setmiterlimit []0 setdash /setstrokeadjust where{ pop false setstrokeadjust }if /setoverprint where{ pop false setoverprint }if newpath /CNT countdictstack def userdict begin /showpage{}def }bind def /PEND{ clear countdictstack CNT sub{end}repeat level1 restore }bind def end def /setpacking where{ pop setpacking }if %%EndResource %%IncludeResource: font Times-Bold %%IncludeResource: font Times-Italic %%IncludeResource: font Times-Roman %%IncludeResource: font Courier %%IncludeResource: font Symbol grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72 def/PL 792 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron/Zcaron/scaron/zcaron /Ydieresis/trademark/quotesingle/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/space /exclam/quotedbl/numbersign/dollar/percent/ampersand/quoteright/parenleft /parenright/asterisk/plus/comma/hyphen/period/slash/zero/one/two/three/four /five/six/seven/eight/nine/colon/semicolon/less/equal/greater/question/at/A/B/C /D/E/F/G/H/I/J/K/L/M/N/O/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash /bracketright/circumflex/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q /r/s/t/u/v/w/x/y/z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase /guillemotleft/guillemotright/bullet/florin/fraction/perthousand/dagger /daggerdbl/endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut /dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash /quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen/brokenbar /section/dieresis/copyright/ordfeminine/guilsinglleft/logicalnot/minus /registered/macron/degree/plusminus/twosuperior/threesuperior/acute/mu /paragraph/periodcentered/cedilla/onesuperior/ordmasculine/guilsinglright /onequarter/onehalf/threequarters/questiondown/Agrave/Aacute/Acircumflex/Atilde /Adieresis/Aring/AE/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute /Icircumflex/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis /multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn/germandbls /agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla/egrave/eacute /ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis/eth/ntilde/ograve /oacute/ocircumflex/otilde/odieresis/divide/oslash/ugrave/uacute/ucircumflex /udieresis/yacute/thorn/ydieresis]def/Courier@0 ENC0/Courier RE/Times-Roman@0 ENC0/Times-Roman RE/Times-Italic@0 ENC0/Times-Italic RE/Times-Bold@0 ENC0 /Times-Bold RE %%EndProlog %%Page: 1 1 %%BeginPageSetup BP %%EndPageSetup /F0 12/Times-Bold@0 SF(Bash, the Bour)210.99 123 Q(ne\255Again Shell)-.18 E/F1 10/Times-Italic@0 SF(Chet Rame)263.85 147 Q(y)-.3 E(Case W)221.72 159 Q (estern Reserve Univer)-.92 E(sity)-.1 E -.15(ch)250.425 171 S(et@po.cwru.edu) .15 E(ABSTRA)264.535 213 Q(CT)-.3 E/F2 10/Times-Roman@0 SF .019(An o)133 237 R -.15(ve)-.15 G(rvie).15 E 2.519(wo)-.25 G 2.519(f/)191.918 237 S .018 (bin/sh\255compatible shells is presented, as well as an introduction to) 200.547 237 R .128(the POSIX.2 shell and tools standard.)108 249 R .128 (These serv)5.128 F 2.628(ea)-.15 G 2.628(sa)318.562 249 S 2.628(ni)329.52 249 S .128(ntroduction to bash.)339.928 249 R 2.628(Ac)5.128 G(ompar)439.32 249 Q (-)-.2 E .188(ison of bash to sh and ksh is presented, as well as a discussion\ of features unique to bash.)108 261 R(Finally)108 273 Q 3.178(,s)-.65 G .678 (ome of the changes and ne)145.258 273 R 3.178(wf)-.25 G .678 (eatures to appear in the ne)268.486 273 R .678(xt bash release will be)-.15 F (discussed.)108 285 Q/F3 10/Times-Bold@0 SF 2.5(1. Intr)72 321 R(oduction)-.18 E(Bash)97 336.6 Q F2 .904(is the shell, or command language interpreter)3.404 F 3.404(,t)-.4 G .904(hat will appear in the GNU operating system.)316.032 336.6 R .782(The name is an acron)72 348.6 R .782(ym for the `)-.15 F(`Bourne\255Ag) -.74 E .782(ain SHell')-.05 F .782(', a pun on Ste)-.74 F 1.082 -.15(ve B)-.25 H .783(ourne, the author of the direct).15 F .212(ancestor of the current)72 360.6 R/F4 9/Times-Roman@0 SF(UNIX)2.712 E F2 2.712<8773>C(hell)199.131 360.6 Q F1(/bin/sh)2.712 E F2 2.712(,w)C .212(hich appeared in the Se)256.505 360.6 R -.15(ve)-.25 G .211(nth Edition Bell Labs Research v).15 F(er)-.15 E(-)-.2 E (sion of)72 372.6 Q F4(UNIX)2.5 E F2([1].).833 E .191(Bash is an)97 388.2 R F3 (sh)2.691 E F2 .192 (\255compatible shell that incorporates useful features from the K)B .192 (orn shell \()-.35 F F3(ksh)A F2 .833(\)[)C .192(2] and the)-.833 F 2.767(Cs)72 400.2 S .267(hell \()85.327 400.2 R F3(csh)A F2 .833(\)[)C .267 (3], described later in this article.)-.833 F .266 (It is ultimately intended to be a conformant implementation)5.267 F 1.965 (of the IEEE POSIX Shell and T)72 412.2 R 1.966(ools speci\214cation \(IEEE W) -.8 F 1.966(orking Group 1003.2\).)-.8 F 1.966(It of)6.966 F 1.966 (fers functional)-.25 F(impro)72 424.2 Q -.15(ve)-.15 G(ments o).15 E -.15(ve) -.15 G 2.5(rs).15 G 2.5(hf)155.28 424.2 S(or both interacti)166.11 424.2 Q .3 -.15(ve a)-.25 H(nd programming use.).15 E .802 (While the GNU operating system will most lik)97 439.8 R .801(ely include a v) -.1 F .801(ersion of the Berk)-.15 F(ele)-.1 E 3.301(ys)-.15 G .801 (hell csh, bash)448.238 439.8 R .108(will be the def)72 451.8 R .108 (ault shell.)-.1 F(Lik)5.108 E 2.608(eo)-.1 G .108(ther GNU softw)199.658 451.8 R .108(are, bash is quite portable.)-.1 F .109(It currently runs on nearly e) 5.109 F -.15(ve)-.25 G(ry).15 E -.15(ve)72 463.8 S .367(rsion of).15 F F4(UNIX) 2.867 E F2 .367(and a fe)2.867 F 2.867(wo)-.25 G .367 (ther operating systems \255 an independently-supported port e)187.933 463.8 R .366(xists for OS/2, and)-.15 F .706(there are rumors of ports to DOS and W)72 475.8 R(indo)-.4 E .706(ws NT)-.25 F 5.706(.P)-.74 G .706(orts to)295.97 475.8 R F4(UNIX)3.206 E F2(-lik)A 3.206(es)-.1 G .706(ystems such as QNX and Minix) 372.979 475.8 R(are part of the distrib)72 487.8 Q(ution.)-.2 E .51 (The original author of bash w)97 503.4 R .51(as Brian F)-.1 F .509 (ox, an emplo)-.15 F .509(yee of the Free Softw)-.1 F .509(are F)-.1 F 3.009 (oundation. The)-.15 F(cur)3.009 E(-)-.2 E(rent de)72 515.4 Q -.15(ve)-.25 G (loper and maintainer is Chet Rame).15 E 1.3 -.65(y, a v)-.15 H(olunteer who w) .45 E(orks at Case W)-.1 E(estern Reserv)-.8 E 2.5(eU)-.15 G(ni)458.91 515.4 Q -.15(ve)-.25 G(rsity).15 E(.)-.65 E F3 2.5(2. What)72 539.4 R(is a shell?)2.5 E F2 1.241(At its base, a shell is simply a macro processor that e)97 555 R -.15 (xe)-.15 G 1.242(cutes commands.).15 F(A)6.242 E F4(UNIX)3.742 E F2 1.242 (shell is both a)3.742 F .189(command interpreter)72 567 R 2.688(,w)-.4 G .188 (hich pro)167.787 567 R .188(vides the user interf)-.15 F .188 (ace to the rich set of)-.1 F F4(UNIX)2.688 E F2 .188 (utilities, and a programming)2.688 F .751(language, allo)72 579 R .752 (wing these utilitites to be combined.)-.25 F .752 (The shell reads commands either from a terminal or a)5.752 F 2.52 (\214le. Files)72 591 R .019 (containing commands can be created, and become commands themselv)2.52 F 2.519 (es. These)-.15 F(ne)2.519 E 2.519(wc)-.25 G(ommands)465.11 591 Q(ha)72 603 Q .395 -.15(ve t)-.2 H .095(he same status as system commands in directories lik) .15 F(e)-.1 E F3(/bin)2.595 E F2 2.595(,a)C(llo)342.575 603 Q .096 (wing users or groups to establish cus-)-.25 F(tom en)72 615 Q(vironments.)-.4 E F3 2.5(2.1. Command)72 639 R(Inter)2.5 E(pr)-.1 E(eter)-.18 E F2 2.926(As)97 654.6 S .426(hell allo)111.036 654.6 R .426(ws e)-.25 F -.15(xe)-.15 G .426 (cution of).15 F F4(UNIX)2.926 E F2 .426 (commands, both synchronously and asynchronously)2.926 F 5.425(.T)-.65 G(he) 460.165 654.6 Q F1 -.37(re)2.925 G(dir).37 E(ec-)-.37 E(tion)72 666.6 Q F2 .334 (constructs permit \214ne-grained control of the input and output of those com\ mands, and the shell allo)2.833 F(ws)-.25 E .559(control o)72 678.6 R -.15(ve) -.15 G 3.058(rt).15 G .558(he contents of their en)126.697 678.6 R(vironment.) -.4 E F4(UNIX)5.558 E F2 .558(shells also pro)3.058 F .558 (vide a small set of b)-.15 F .558(uilt-in commands)-.2 F(\()72 690.6 Q F1 -.2 (bu)C(iltins).2 E F2 4.611(\)i)C 2.112 (mplementing functionality impossible \(e.g.,)115.861 690.6 R F3(cd)4.612 E F2 (,)A F3(br)4.612 E(eak)-.18 E F2(,)A F3(continue)4.612 E F2 4.612(,a)C(nd) 399.074 690.6 Q F3(exec)4.612 E F2 4.612(\)o)C 4.612(ri)444.948 690.6 S(ncon) 455.67 690.6 Q -.15(ve)-.4 G(nient).15 E .32 LW 76 700.6 72 700.6 DL 80 700.6 76 700.6 DL 84 700.6 80 700.6 DL 88 700.6 84 700.6 DL 92 700.6 88 700.6 DL 96 700.6 92 700.6 DL 100 700.6 96 700.6 DL 104 700.6 100 700.6 DL 108 700.6 104 700.6 DL 112 700.6 108 700.6 DL 116 700.6 112 700.6 DL 120 700.6 116 700.6 DL 124 700.6 120 700.6 DL 128 700.6 124 700.6 DL 132 700.6 128 700.6 DL 136 700.6 132 700.6 DL 140 700.6 136 700.6 DL 144 700.6 140 700.6 DL/F5 8/Times-Roman@0 SF 2<8755>72 710.6 S(NIX is a trademark of X/OPEN)83.776 710.6 Q EP %%Page: 2 2 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF 2.5(-2-)279.67 48 S(\()72 84 Q/F1 10/Times-Bold@0 SF (history)A F0(,)A F1(getopts)3.505 E F0(,)A F1(kill)3.505 E F0 3.505(,o)C(r) 172.795 84 Q F1(pwd)3.505 E F0 3.505(,f)C 1.005(or e)207.305 84 R 1.005 (xample\) to obtain via separate utilities.)-.15 F 1.005 (Shells may be used interac-)6.005 F(ti)72 96 Q -.15(ve)-.25 G (ly or non-interacti).15 E -.15(ve)-.25 G 2.5(ly: the).15 F 2.5(ya)-.15 G (ccept input typed from the k)207.42 96 Q -.15(ey)-.1 G (board or from a \214le.).15 E F1 2.5(2.2. Pr)72 120 R(ogramming Language)-.18 E F0 .501(While e)97 135.6 R -.15(xe)-.15 G .501 (cuting commands is essential, most of the po).15 F .501(wer \(and comple)-.25 F .502(xity\) of shells is due to their)-.15 F .05 (embedded programming languages.)72 147.6 R(Lik)5.049 E 2.549(ea)-.1 G .349 -.15(ny h)245.398 147.6 T(igh-le).15 E -.15(ve)-.25 G 2.549(ll).15 G .049 (anguage, the shell pro)303.276 147.6 R .049(vides v)-.15 F .049 (ariables, \215o)-.25 F 2.549(wc)-.25 G(ontrol)480.11 147.6 Q (constructs, quoting, and functions.)72 159.6 Q .475 (The basic syntactic element is a)97 175.2 R/F2 10/Times-Italic@0 SF .475 (simple command)2.975 F F0 5.475(.A)C .475 (simple command consists of an optional set of)315.405 175.2 R -.25(va)72 187.2 S .525(riable assignments, a command w).25 F .525 (ord, and an optional list of ar)-.1 F 3.024(guments. Operators)-.18 F .524 (to redirect input and)3.024 F(output may appear an)72 199.2 Q (ywhere in a simple command.)-.15 E(Some e)5 E(xamples are:)-.15 E/F3 10 /Courier@0 SF(who)97 211.2 Q(trn -e -S1 -N)97 223.2 Q(ls -l /bin > binfiles)97 235.2 Q(make > make.out 2>make.errs)97 247.2 Q F0 2.518(Ap)97 262.8 S .018 (ipeline is a sequence of tw)111.738 262.8 R 2.518(oo)-.1 G 2.518(rm)230.056 262.8 S .018(ore commands separated by the character)243.684 262.8 R/F4 10 /Symbol SF2.519 E F0 5.019(.T)C .019(he standard output)430.082 262.8 R (of the \214rst command is connected to the standard input of the second.)72 274.8 Q(Examples of pipelines include:)5 E F3(who | wc -l)97 286.8 Q (ls -l | sort +3nr)97 298.8 Q F0 .578 (Simple commands and pipelines may be combined into)97 314.4 R F2(lists)3.078 E F0 5.578(.A)C .578(list is a sequence of pipelines sepa-)360.002 314.4 R .289 (rated by one of)72 326.4 R F1(;)2.789 E F0(,)A F1(&)2.789 E F0(,)A F1(&&)2.789 E F0 2.789(,o)C(r)185.103 326.4 Q F42.789 E F0 2.789(,a)C .289 (nd optionally terminated by)210.831 326.4 R F1(;)2.789 E F0(,)A F1(&)2.789 E F0 2.789(,o)C 2.789(ran)352.555 326.4 S -.25(ew)370.903 326.4 S 2.789 (line. Commands).25 F .289(separated by)2.789 F F1(;)72 338.4 Q F0 .336(are e) 2.836 F -.15(xe)-.15 G .336(cuted sequentially; the shell w).15 F .335 (aits for each to complete in turn.)-.1 F .335(If a command is terminated by) 5.335 F F1(&)2.835 E F0(,)A .007(the shell e)72 350.4 R -.15(xe)-.15 G .007 (cutes it in the).15 F F2(bac)2.507 E(kgr)-.2 E(ound)-.45 E F0 2.508(,a)1.666 G .008(nd does not w)236.076 350.4 R .008(ait for it to \214nish.)-.1 F .008 (If tw)5.008 F 2.508(oc)-.1 G .008(ommands are separated by)397.616 350.4 R F1 (&&)72 362.4 Q F0 3.008(,t)C .508(he second command e)96.948 362.4 R -.15(xe) -.15 G .508(cutes only if the \214rst command succeeds.).15 F 3.007(As)5.508 G .507(eparator of)383.575 362.4 R F43.007 E F0 .507(causes the sec-)3.007 F(ond command to e)72 374.4 Q -.15(xe)-.15 G(cute only if the \214rst f).15 E 2.5(ails. Some)-.1 F -.15(ex)2.5 G(amples are:).15 E F3(who ; date)97 386.4 Q (cd /usr/src || exit 1)97 398.4 Q(cd "$@" && xtitle $HOST: $PWD)97 410.4 Q F0 1.36(The shell programming language pro)97 426 R 1.361(vides a v)-.15 F 1.361 (ariety of \215o)-.25 F 3.861(wc)-.25 G 1.361(ontrol structures.)353.276 426 R (The)6.361 E F1 -.25(fo)3.861 G(r).25 E F0(command)3.861 E(allo)72 438 Q .654 (ws a list of commands to be e)-.25 F -.15(xe)-.15 G .654 (cuted once for each w).15 F .654(ord in a w)-.1 F .654(ord list.)-.1 F(The) 5.654 E F1(case)3.154 E F0 .654(command allo)3.154 F .654(ws a)-.25 F .627 (list to be e)72 450 R -.15(xe)-.15 G .628(cuted if a w).15 F .628 (ord matches a speci\214ed pattern.)-.1 F(The)5.628 E F1(while)3.128 E F0(and) 3.128 E F1(until)3.128 E F0 .628(commands e)3.128 F -.15(xe)-.15 G .628 (cute a list of).15 F 1.559 (commands as long as a guard command completes successfully or f)72 462 R 1.559 (ails, respecti)-.1 F -.15(ve)-.25 G(ly).15 E 6.559(.T)-.65 G(he)440.892 462 Q F1(if)4.059 E F0(command)4.059 E(allo)72 474 Q(ws e)-.25 E -.15(xe)-.15 G (cution of dif).15 E(ferent command lists depending on the e)-.25 E (xit status of a guard command.)-.15 E(A)97 489.6 Q F2 .385(shell function) 2.885 F F0 .385(associates a list of commands with a name.)2.885 F .386 (Each time the name is used as a simple)5.385 F .938(command, the list is e)72 501.6 R -.15(xe)-.15 G 3.438(cuted. This).15 F -.15(exe)3.438 G .938 (cution tak).15 F .938(es place in the current shell conte)-.1 F .937 (xt; no ne)-.15 F 3.437(wp)-.25 G .937(rocess is)468.903 501.6 R 2.5 (created. Functions)72 513.6 R(may ha)2.5 E .3 -.15(ve t)-.2 H(heir o).15 E (wn ar)-.25 E(gument lists and local v)-.18 E(ariables, and may be recursi)-.25 E -.15(ve)-.25 G(.).15 E .722(The shell language pro)97 529.2 R .722(vides v) -.15 F .722(ariables, which may be both set and referenced.)-.25 F 3.222(An) 5.722 G .722(umber of special)435.906 529.2 R 1.02 (parameters are present, such as)72 541.2 R F1($@)3.519 E F0 3.519(,w)C 1.019 (hich returns the shell')231.257 541.2 R 3.519(sp)-.55 G 1.019 (ositional parameters \(command-line ar)333.103 541.2 R(gu-)-.18 E(ments\),)72 553.2 Q F1($?)2.906 E F0 2.906(,t)C .406(he e)122.812 553.2 R .406 (xit status of the pre)-.15 F .406(vious command, and)-.25 F F1($$)2.906 E F0 2.906(,t)C .406(he shell')322.436 553.2 R 2.906(sp)-.55 G .406(rocess I.D.) 368.248 553.2 R .407(In addition to pro)5.406 F(vid-)-.15 E .129 (ing special parameters and user)72 565.2 R .129(-de\214ned v)-.2 F .129 (ariables, the shell permits the v)-.25 F .128(alues of certain v)-.25 F .128 (ariables to control)-.25 F .16(its beha)72 577.2 R(vior)-.2 E 5.16(.S)-.55 G .16(ome of these v)131.57 577.2 R .16(ariables include)-.25 F F1(IFS)2.661 E F0 2.661(,w)C .161(hich controls ho)284.202 577.2 R 2.661(wt)-.25 G .161 (he shell splits w)361.375 577.2 R(ords,)-.1 E F1 -.74(PA)2.661 G(TH)-.21 E F0 2.661(,w)C(hich)486.78 577.2 Q .392 (tells the shell where to look for commands, and)72 589.2 R F1(PS1)2.892 E F0 2.892(,w)C .392(hose v)297.01 589.2 R .392 (alue is the string the shell uses to prompt for)-.25 F 3.371(commands. There) 72 601.2 R .871(are a fe)3.371 F 3.371(wv)-.25 G .871(ariables whose v)196.645 601.2 R .871(alues are set by the shell and normally only referenced by)-.25 F (users;)72 613.2 Q F1(PWD)3.663 E F0 3.663(,w)C 1.163(hose v)135.706 613.2 R 1.163(alue is the pathname of the shell')-.25 F 3.662(sc)-.55 G 1.162(urrent w) 313.068 613.2 R 1.162(orking directory)-.1 F 3.662(,i)-.65 G 3.662(so)421.894 613.2 S 1.162(ne such v)434.446 613.2 R(ariable.)-.25 E -1.11(Va)72 625.2 S .008(riables can be used in nearly an)1.11 F 2.509(ys)-.15 G .009(hell conte) 219.37 625.2 R .009(xt and are particularly v)-.15 F .009 (aluable when used with control struc-)-.25 F(tures.)72 637.2 Q .583 (There are se)97 652.8 R -.15(ve)-.25 G .583(ral shell).15 F F2 -.2(ex)3.083 G (pansions).2 E F0 5.583(.A)C -.25(va)254.298 652.8 S(riable).25 E F2(name)3.083 E F0 .583(is e)3.083 F .582(xpanded to its v)-.15 F .582(alue using ${)-.25 F F2(name)A F0 .582(}, where)B 1.387(the braces are optional.)72 664.8 R 1.387 (There are a number of parameter e)6.387 F 1.388(xpansions a)-.15 F -.25(va)-.2 G 3.888(ilable. F).25 F 1.388(or e)-.15 F 1.388(xample, there are)-.15 F(${)72 676.8 Q F2(name)A F0<3aad>A F2(wor)A(d)-.37 E F0 .891(}, which e)B .891 (xpands to)-.15 F F2(wor)3.391 E(d)-.37 E F0(if)3.391 E F2(name)3.391 E F0 .891 (is unset or null, and the in)3.391 F -.15(ve)-.4 G .89(rse ${).15 F F2(name)A F0(:+)A F2(wor)A(d)-.37 E F0 .89(}, which)B -.15(ex)72 688.8 S 1.203(pands to) .15 F F2(wor)3.703 E(d)-.37 E F0(if)3.703 E F2(name)3.703 E F0 1.203 (is set and not null.)3.703 F F2 1.203(Command substitution)6.203 F F0(allo) 3.703 E 1.204(ws the output of a command to)-.25 F .918 (replace the command name.)72 700.8 R .918(The syntax is `)5.918 F F2(command)A F0(`.)A F2(Command)5.918 E F0 .918(is e)3.418 F -.15(xe)-.15 G .918 (cuted and it and the backquotes).15 F .299 (are replaced by its output, with trailing ne)72 712.8 R .299(wlines remo)-.25 F -.15(ve)-.15 G(d.).15 E F2 -.8(Pa)5.299 G .299(thname e).8 F(xpansion)-.2 E F0 .299(is a w)2.799 F .299(ay to e)-.1 F .299(xpand a w)-.15 F(ord)-.1 E 1.586 (to a set of \214lenames.)72 724.8 R -.8(Wo)6.586 G 1.586(rds are re).8 F -.05 (ga)-.15 G 1.586(rded as patterns, in which the characters).05 F F1(*)4.086 E F0(,)A F1(?)4.086 E F0 4.085(,a)C(nd)432.115 724.8 Q F1([)4.085 E F0(ha)4.085 E 1.885 -.15(ve s)-.2 H(pecial).15 E EP %%Page: 3 3 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF 2.5(-3-)279.67 48 S 2.845(meaning. W)72 84 R .346(ords\ containing these special characters are replaced with a sorted list of matchi\ ng pathnames.)-.8 F(If a w)72 96 Q (ord generates no matches, it is left unchanged.)-.1 E/F1 10/Times-Italic@0 SF (Quoting)97 111.6 Q F0 .85(is used to remo)3.35 F 1.15 -.15(ve t)-.15 H .85 (he special meaning of characters or w).15 F 3.35(ords. It)-.1 F .85 (can disable special treat-)3.35 F .314 (ment for shell operators or other special characters, pre)72 123.6 R -.15(ve) -.25 G .315(nt reserv).15 F .315(ed w)-.15 F .315 (ords from being recognized as such,)-.1 F .683(and inhibit v)72 135.6 R .683 (ariable e)-.25 F 3.183(xpansion. The)-.15 F .683 (shell has three quoting mechanisms:)3.183 F 3.183(ab)5.683 G .683 (ackslash preserv)387.413 135.6 R .682(es the literal)-.15 F -.25(va)72 147.6 S .417(lue of the ne).25 F .417(xt character)-.15 F 2.917(,ap)-.4 G .417 (air of single quotes preserv)196.712 147.6 R .417(es the literal v)-.15 F .418 (alue of each character between the)-.25 F 1.426 (quotes, and a pair of double quotes preserv)72 159.6 R 1.425 (es the literal meaning of enclosed characters while allo)-.15 F(wing)-.25 E (some e)72 171.6 Q(xpansions.)-.15 E 1.054(Some of the commands b)97 187.2 R 1.054(uilt into the shell are part of the programming language.)-.2 F(The)6.055 E/F2 10/Times-Bold@0 SF(br)3.555 E(eak)-.18 E F0(and)3.555 E F2(continue)72 199.2 Q F0 1.175(commands control loop e)3.675 F -.15(xe)-.15 G 1.175 (cution as in the C language.).15 F(The)6.175 E F2 -2.3 -.15(ev a)3.675 H(l).15 E F0 -.2(bu)3.675 G 1.174(iltin allo).2 F 1.174(ws a string to be)-.25 F .204 (parsed and e)72 211.2 R -.15(xe)-.15 G .204(cuted as a command.).15 F F2 -.65 (Wa)5.205 G(it).65 E F0 .205 (tells the shell to pause until the processes speci\214ed as ar)2.705 F (guments)-.18 E(ha)72 223.2 Q .3 -.15(ve ex)-.2 H(ited.).15 E F2 2.5 (2.3. Interacti)72 247.2 R .2 -.1(ve F)-.1 H(eatur)-.15 E(es)-.18 E F0 .51 (Shells ha)97 262.8 R .81 -.15(ve b)-.2 H -.15(eg).15 G .51(un of).15 F .51 (fering features geared speci\214cally for interacti)-.25 F .81 -.15(ve u)-.25 H .51(se rather than to augment the).15 F .76(programming language.)72 274.8 R .761(These interacti)5.76 F 1.061 -.15(ve f)-.25 H .761 (eatures include job control, command line editing, history and).15 F(aliases.) 72 286.8 Q .626(Job control is a f)97 302.4 R .626(acility pro)-.1 F .626 (vided jointly by the shell and the)-.15 F/F3 9/Times-Roman@0 SF(UNIX)3.125 E F0 -.1(ke)3.125 G .625(rnel that allo).1 F .625(ws users to selec-)-.25 F(ti)72 314.4 Q -.15(ve)-.25 G .344 (ly stop \(suspend\) and restart \(resume\) processes.).15 F .345 (Each pipeline e)5.345 F -.15(xe)-.15 G .345 (cuted by the shell is referred to as a).15 F F1(job)72 326.4 Q F0 2.989(.J)C .488(obs may be suspended and restarted in either the fore)94.159 326.4 R .488 (ground, where the)-.15 F 2.988(yh)-.15 G -2.25 -.2(av e)397.148 326.4 T .488 (access to the terminal,)3.188 F .833(or background, where the)72 338.4 R 3.333 (ya)-.15 G .834(re isolated and cannot read from the terminal.)189.312 338.4 R -.8(Ty)5.834 G .834(ping the).8 F F1(suspend)3.334 E F0(character)5 E .459(whi\ le a process is running stops that process and returns control to the shell.)72 350.4 R .459(Once a job is suspended, the)5.459 F .392 (user manipulates the job')72 362.4 R 2.892(ss)-.55 G .392(tate, using)184.118 362.4 R F2(bg)2.892 E F0 .393(to continue it in the background,)2.892 F F2(fg) 2.893 E F0 .393(to return it to the fore)2.893 F(ground)-.15 E .891(and a)72 374.4 R -.1(wa)-.15 G .891(it its completion, or).1 F F2(kill)3.391 E F0 .891 (to send it a signal.)3.391 F(The)5.89 E F2(jobs)3.39 E F0 .89 (command lists the status of jobs, and)3.39 F F2(wait)3.39 E F0 .407 (will pause the shell until a speci\214ed job terminates.)72 386.4 R .407 (The shell pro)5.407 F .407(vides a number of w)-.15 F .407 (ays to refer to a job,)-.1 F(and will notify the user whene)72 398.4 Q -.15 (ve)-.25 G 2.5(rab).15 G(ackground job terminates.)220.18 398.4 Q -.4(Wi)97 414 S .956(th the adv).4 F .956(ent of more po)-.15 F .956 (werful terminals and terminal emulators, more sophisticated interaction)-.25 F .253(than that pro)72 426 R .253(vided by the)-.15 F F3(UNIX)2.753 E F0 -.1(ke) 2.754 G .254(rnel terminal dri).1 F -.15(ve)-.25 G 2.754(ri).15 G 2.754(sp) 293.592 426 S 2.754(ossible. Some)305.236 426 R .254(shells of)2.754 F .254 (fer command line editing,)-.25 F 1.141 (which permits a user to edit lines of input using f)72 438 R(amiliar)-.1 E F1 (emacs)3.64 E F0(or)3.64 E F1(vi)3.64 E F0 1.14 (-style commands before submitting)B .02(them to the shell.)72 450 R .02 (Editors allo)5.02 F 2.52(wc)-.25 G .02(orrections to be made without ha)206.31 450 R .021(ving to erase back to the point of error)-.2 F 2.521(,o)-.4 G(r) 500.67 450 Q .135(start the line ane)72 462 R 3.935 -.65(w. C)-.25 H .135 (ommand line editors run the g).65 F .135(amut from a small \214x)-.05 F .134 (ed set of commands and k)-.15 F .434 -.15(ey b)-.1 H(ind-).15 E (ings to input f)72 474 Q(acilities which allo)-.1 E 2.5(wa)-.25 G (rbitrary actions to be bound to a k)217.2 474 Q .3 -.15(ey o)-.1 H 2.5(rk).15 G .3 -.15(ey s)379.88 474 T(equence.).15 E .145(Modern shells also k)97 489.6 R .145(eep a history)-.1 F 2.645(,w)-.65 G .146 (hich is the list of commands a user has typed.)243.49 489.6 R .146(Shell f) 5.146 F .146(acilities are)-.1 F -.2(av)72 501.6 S .368(ailable to recall pre) -.05 F .367(vious commands and use portions of old commands when composing ne) -.25 F 2.867(wo)-.25 G 2.867(nes. The)467.253 501.6 R 1.456 (command history can be sa)72 513.6 R -.15(ve)-.2 G 3.957(dt).15 G 3.957 (oa\214)207.522 513.6 S 1.457 (le and read back in at shell startup, so it persists across sessions.)230.436 513.6 R .675(Shells which pro)72 525.6 R .675 (vide both command editing and history generally ha)-.15 F .974 -.15(ve e)-.2 H .674(diting commands to interacti).15 F -.15(ve)-.25 G(ly).15 E(step forw)72 537.6 Q(ard and backw)-.1 E(ard through the history list.)-.1 E .013 (Aliases allo)97 553.2 R -5.012 2.513(wa s)-.25 H .014 (tring to be substituted for a command name.)164.28 553.2 R(The)5.014 E 2.514 (yc)-.15 G .014(an be used to create a mnemonic)373.396 553.2 R .568(for a)72 565.2 R F3(UNIX)3.068 E F0 .568(command name \()3.068 F/F4 10/Courier@0 SF .568 (alias del=rm)B F0 .568(\), to e)B .567(xpand a single w)-.15 F .567 (ord to a comple)-.1 F 3.067(xc)-.15 G .567(ommand \()432.603 565.2 R F4(alias) A .255(news='xterm -g 80x45 -title trn -e trn -e -S1 -N &')72 577.2 R F0 .255 (\), or to ensure that a command)B(is in)72 589.2 Q -.2(vo)-.4 G -.1(ke).2 G 2.5(dw).1 G(ith a basic set of options \()122.41 589.2 Q F4 (alias ls="/bin/ls -F")A F0(\).)A F2 2.5(3. The)72 613.2 R (POSIX Shell Standard)2.5 E F1(POSIX)97 628.8 Q F0 .239 (is a name originally coined by Richard Stallman for a f)4.405 F .239 (amily of open system standards based)-.1 F(on)72 640.8 Q F3(UNIX)3.239 E F0 5.739(.T)C .74(here are a number of aspects of)122.079 640.8 R F3(UNIX)3.24 E F0 .74(under consideration for standardization, from the basic)3.24 F .192 (system services at the system call and C library le)72 652.8 R -.15(ve)-.25 G 2.692(lt).15 G 2.692(oa)290.16 652.8 S .191 (pplications and tools to system administration and)302.292 652.8 R 2.5 (management. Each)72 664.8 R(area of standardization is assigned to a w)2.5 E (orking group in the 1003 series.)-.1 E 3.602(The POSIX Shell and T)97 680.4 R 3.602(ools standard has been de)-.8 F -.15(ve)-.25 G 3.603(loped by IEEE W).15 F 3.603(orking Group 1003.2)-.8 F -1.667(\(POSIX.2\) [4].)72 692.4 R 2.799 (It concentrates on the command interpreter interf)7.799 F 2.799 (ace and utility programs commonly)-.1 F -.15(exe)72 704.4 S 2.345 (cuted from the command line or by other programs.).15 F 2.345(An initial v) 7.345 F 2.345(ersion of the standard has been)-.15 F(appro)72 716.4 Q -.15(ve) -.15 G 2.915(da).15 G .414(nd published by the IEEE, and w)116.265 716.4 R .414 (ork is currently underw)-.1 F .414(ay to update it.)-.1 F .414 (There are four primary)5.414 F(areas of w)72 728.4 Q (ork in the 1003.2 standard:)-.1 E EP %%Page: 4 4 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF 2.5(-4-)279.67 48 S 21.5<8341>72 84 S .835 (spects of the shell')104.22 84 R 3.335(ss)-.55 G .835 (yntax and command language.)192 84 R 3.335(An)5.835 G .835(umber of special b) 338.095 84 R .835(uiltins such as)-.2 F/F1 10/Times-Bold@0 SF(cd)3.335 E F0 (and)3.335 E F1(exec)97 96 Q F0 .545(are being speci\214ed as part of the shel\ l, since their functionality usually cannot be implemented)3.046 F (by a separate e)97 108 Q -.15(xe)-.15 G(cutable;).15 E 21.5<8341>72 123.6 S .73(set of utilities to be called by shell scripts and applications.)107.45 123.6 R .731(Examples are programs lik)5.731 F(e)-.1 E/F2 10/Times-Italic@0 SF 2.397(sed, tr)3.231 F(,)-1.11 E F0(and)97 135.6 Q F2(awk.)2.853 E F0 .352 (Utilities commonly implemented as shell b)4.519 F .352 (uiltins are described in this section, such as)-.2 F F1(test)2.852 E F0(and)97 147.6 Q F1(kill)3.422 E F0 5.922(.A)C 3.422(ne)144.404 147.6 S .922 (xpansion of this section')157.116 147.6 R 3.423(ss)-.55 G .923 (cope, termed the User Portability Extension, or UPE, has)268.586 147.6 R (standardized interacti)97 159.6 Q .3 -.15(ve p)-.25 H(rograms such as).15 E F2 (vi)2.5 E F0(and)4.166 E F2(mailx;)2.5 E F0 21.5<8341>72 175.2 S .926 (group of functional interf)107.646 175.2 R .926(aces to services pro)-.1 F .926(vided by the shell, such as the traditional)-.15 F F2(system)3.425 E F0(C) 5.091 E .507(library function.)97 187.2 R .507 (There are functions to perform shell w)5.507 F .508(ord e)-.1 F .508 (xpansions, perform \214lename e)-.15 F(xpansion)-.15 E(\()97 199.2 Q F2 (globbing)A F0 .58(\), obtain v)B .58 (alues of POSIX.2 system con\214guration v)-.25 F .58(ariables, retrie)-.25 F .88 -.15(ve v)-.25 H .58(alues of en)-.1 F(vironment)-.4 E -.25(va)97 211.2 S (riables \().25 E F2 -.1(ge)C(ten).1 E(v\(\))-.4 E F0(\), and other services;) .833 E 21.5<8341>72 226.8 S(suite of `)106.72 226.8 Q(`de)-.74 E -.15(ve)-.25 G (lopment').15 E 2.5('u)-.74 G(tilities such as)209.54 226.8 Q F2(c89)2.5 E F0 (\(the POSIX.2 v)4.166 E(ersion of)-.15 E F2(cc)2.5 E F0(\), and)A F2(yacc.)2.5 E F0 .483(Bash is concerned with the aspects of the shell')97 242.4 R 2.983(sb) -.55 G(eha)301.597 242.4 Q .484(vior de\214ned by POSIX.2.)-.2 F .484 (The shell command)5.484 F 1.439 (language has of course been standardized, including the basic \215o)72 254.4 R 3.938(wc)-.25 G 1.438(ontrol and program e)359.688 254.4 R -.15(xe)-.15 G 1.438 (cution con-).15 F 1.145(structs, I/O redirection and pipelining, ar)72 266.4 R 1.145(gument handling, v)-.18 F 1.145(ariable e)-.25 F 1.146 (xpansion, and quoting.)-.15 F(The)6.146 E F2(special)3.646 E F0 -.2(bu)72 278.4 S .676(iltins, which must be implemented as part of the shell to pro).2 F .676(vide the desired functionality)-.15 F 3.176(,a)-.65 G .676(re speci\214ed) 457.504 278.4 R .7(as being part of the shell; e)72 290.4 R .7 (xamples of these are)-.15 F F1 -2.3 -.15(ev a)3.201 H(l).15 E F0(and)3.201 E F1(export)3.201 E F0 5.701(.O)C .701(ther utilities appear in the sections of) 352.034 290.4 R .256(POSIX.2 not de)72 302.4 R -.2(vo)-.25 G .256(ted to the s\ hell which are commonly \(and in some cases must be\) implemented as b).2 F (uiltin)-.2 E(commands, such as)72 314.4 Q F1 -.18(re)2.5 G(ad).18 E F0(and)2.5 E F1(test)2.5 E F0(.)A .972(POSIX.2 also speci\214es aspects of the shell')97 330 R 3.473(si)-.55 G(nteracti)286.016 330 Q 1.273 -.15(ve b)-.25 H(eha).15 E .973(vior as part of the UPE, including job)-.2 F .233 (control, command line editing, and history)72 342 R 5.233(.I)-.65 G .233 (nterestingly enough, only)253.849 342 R F2(vi)2.733 E F0 .233 (-style line editing commands ha)B -.15(ve)-.2 G(been standardized;)72 354 Q F2 (emacs)2.5 E F0(editing commands were left out due to objections.)2.5 E .148 (There were certain areas in which POSIX.2 felt standardization w)97 369.6 R .149(as necessary)-.1 F 2.649(,b)-.65 G .149(ut no e)420.643 369.6 R .149 (xisting imple-)-.15 F 1.598(mentation pro)72 381.6 R 1.598 (vided the proper beha)-.15 F(vior)-.2 E 6.598(.T)-.55 G 1.598(he w)251.56 381.6 R 1.597(orking group in)-.1 F -.15(ve)-.4 G 1.597 (nted and standardized functionality in).15 F .228(these areas.)72 393.6 R(The) 5.228 E F1(command)2.728 E F0 -.2(bu)2.728 G .228(iltin w).2 F .228(as in)-.1 F -.15(ve)-.4 G .228(nted so that shell functions could be written to replace b) .15 F(uiltins;)-.2 E 1.663(it mak)72 405.6 R 1.663 (es the capabilities of the b)-.1 F 1.663(uiltin a)-.2 F -.25(va)-.2 G 1.663 (ilable to the function.).25 F 1.663(The reserv)6.663 F 1.663(ed w)-.15 F 1.663 (ord `)-.1 F(`!')-.74 E 4.163('w)-.74 G 1.663(as added to)455.685 405.6 R(ne)72 417.6 Q -.05(ga)-.15 G .915(te the return v).05 F .915 (alue of a command or pipeline; it w)-.25 F .916(as nearly impossible to e)-.1 F .916(xpress `)-.15 F .916(`if not x')-.74 F 3.416('c)-.74 G(leanly)479.56 417.6 Q .904(using the sh language.)72 429.6 R .904(There e)5.904 F .904 (xist multiple incompatible implementations of the)-.15 F F1(test)3.403 E F0 -.2(bu)3.403 G .903(iltin, which tests).2 F .28 (\214les for type and other attrib)72 441.6 R .281 (utes and performs arithmetic and string comparisons.)-.2 F .281 (POSIX considered none)5.281 F .868(of these correct, so the standard beha)72 453.6 R .868(vior w)-.2 F .868(as speci\214ed in terms of the number of ar)-.1 F .867(guments to the com-)-.18 F 3.803(mand. POSIX.2)72 465.6 R 1.303 (dictates e)3.803 F 1.303(xactly what will happen when four or fe)-.15 F 1.303 (wer ar)-.25 F 1.303(guments are gi)-.18 F -.15(ve)-.25 G 3.803(nt).15 G(o) 459.462 465.6 Q F1(test)3.804 E F0 3.804(,a)C(nd)494 465.6 Q(lea)72 477.6 Q -.15(ve)-.2 G 4.531(st).15 G 2.031(he beha)103.951 477.6 R 2.031 (vior unde\214ned when more ar)-.2 F 2.031(guments are supplied.)-.18 F 2.03 (Bash uses the POSIX.2 algorithm,)7.031 F(which w)72 489.6 Q(as concei)-.1 E -.15(ve)-.25 G 2.5(db).15 G 2.5(yD)164.53 489.6 S -.2(av)179.25 489.6 S(id K).2 E(orn.)-.35 E 1.128 (While POSIX.2 includes much of what the shell has traditionally pro)97 505.2 R 1.129(vided, some important things)-.15 F(ha)72 517.2 Q .58 -.15(ve b)-.2 H .28 (een omitted as being `).15 F(`be)-.74 E .28(yond its scope.)-.15 F 4.26 -.74 ('' T)-.7 H .28(here is, for instance, no mention of a dif).74 F .28 (ference between)-.25 F(a)72 529.2 Q F2(lo)3.354 E(gin)-.1 E F0 .854 (shell and an)5.02 F 3.354(yo)-.15 G .854(ther interacti)167.956 529.2 R 1.154 -.15(ve s)-.25 H .854(hell \(since POSIX.2 does not specify a login program\).) .15 F .855(No \214x)5.855 F(ed)-.15 E (startup \214les are de\214ned, either \255 the standard does not mention)72 541.2 Q F2(.pr)2.5 E(o\214le)-.45 E F0(.)1.666 E F1 2.5(4. Shell)72 565.2 R (Comparison)2.5 E F0 .693(This section compares features of bash, sh, and ksh \ \(the three shells closest to POSIX compliance\).)97 580.8 R .245(Since ksh an\ d bash are supersets of sh, the features common to all three are co)72 592.8 R -.15(ve)-.15 G .245(red \214rst.).15 F .245(Some of the fea-)5.245 F 1.198 (tures bash and ksh contain which are not in sh will be discussed.)72 604.8 R (Ne)6.198 E 1.198(xt, features unique to bash will be)-.15 F 2.866(listed. The) 72 616.8 R .366(\214rst three sections pro)2.866 F .366(vide a progressi)-.15 F -.15(ve)-.25 G .366(ly more detailed o).15 F -.15(ve)-.15 G(rvie).15 E 2.866 (wo)-.25 G 2.866(fb)395.706 616.8 S 2.866(ash. Finally)406.902 616.8 R 2.866 (,f)-.65 G .366(eatures of)464.484 616.8 R(ksh-88 \(the currently-a)72 628.8 Q -.25(va)-.2 G(ilable v).25 E(ersion\) not in sh or bash will be presented.)-.15 E F1 2.5(4.1. Common)72 652.8 R -.25(Fe)2.5 G(atur).25 E(es)-.18 E F0 .021 (All three shells ha)97 668.4 R .321 -.15(ve t)-.2 H .021 (he same basic feature set, which is essentially that pro).15 F .02 (vided by sh and described)-.15 F 1.026(in an)72 680.4 R 3.526(ys)-.15 G 3.526 (hm)105.012 680.4 S 1.027 (anual page. Bash and ksh are both sh supersets, and so all three pro)121.318 680.4 R 1.027(vide the command inter)-.15 F(-)-.2 E .714 (preter and programming language described earlier)72 692.4 R 3.214(.T)-.55 G .714(he shell grammar)291.506 692.4 R 3.214(,s)-.4 G .714(yntax, \215o)371.568 692.4 R 3.214(wc)-.25 G .714(ontrol, redirections,)424.686 692.4 R(and b)72 704.4 Q(uiltins implemented by the Bourne shell are the baseline for subsequen\ t discussion.)-.2 E EP %%Page: 5 5 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF 2.5(-5-)279.67 48 S/F1 10/Times-Bold@0 SF 2.5(4.2. F)72 84 R(eatur)-.25 E(es in bash and ksh)-.18 E F0 .458(Ksh and bash ha)97 99.6 R .758 -.15(ve s)-.2 H -2.15 -.25(ev e).15 H .459(ral features in common be).25 F .459(yond this base le)-.15 F -.15(ve)-.25 G 2.959(lo).15 G 2.959(ff)387.814 99.6 S(unctionality)397.433 99.6 Q 5.459(.S)-.65 G .459(ome of this)458.082 99.6 R(is due to the POSIX.2 standard.)72 111.6 Q(Other functions ha)5 E .3 -.15(ve b)-.2 H(een implemented in bash using ksh as a guide.).15 E F1 2.5 (4.2.1. V)72 135.6 R(ariables and V)-.92 E(ariable Expansion)-.92 E F0 .097 (Bash and ksh ha)97 151.2 R .396 -.15(ve a)-.2 H .096(ugmented v).15 F .096 (ariable e)-.25 F 2.596(xpansion. Arithmetic)-.15 F .096(substitution allo) 2.596 F .096(ws an e)-.25 F .096(xpression to be)-.15 F -.25(eva)72 163.2 S .6 (luated and the result substituted.).25 F .6(Shell v)5.6 F .6 (ariables may be used as operands, and the result of an e)-.25 F(xpres-)-.15 E .41(sion may be assigned to a v)72 175.2 R 2.91(ariable. Nearly)-.25 F .41 (all of the operators from the C language are a)2.91 F -.25(va)-.2 G .41 (ilable, with the).25 F(same precedence rules:)72 187.2 Q/F2 10/Courier@0 SF 6 ($e)97 205.2 S(cho $\(\(3 + 5 * 32\)\))115 205.2 Q(163)97 217.2 Q F0 -1.11(Va) 72 238.8 S 1.445(riables may be declared as)1.11 F/F3 10/Times-Italic@0 SF (inte)3.945 E -.1(ge)-.4 G(r).1 E F0 3.945(,w)1.666 G 1.446 (hich causes arithmetic e)240.956 238.8 R -.25(va)-.25 G 1.446 (luation to be performed on the v).25 F(alue)-.25 E(whene)72 250.8 Q -.15(ve) -.25 G 2.5(rt).15 G(he)115.75 250.8 Q 2.5(ya)-.15 G(re assigned to.)136.98 250.8 Q .483(There are ne)97 266.4 R 2.983(we)-.25 G .483 (xpansions to obtain the length of a v)162.179 266.4 R(ariable')-.25 E 2.982 (sv)-.55 G .482(alue and to remo)352.19 266.4 R .782 -.15(ve s)-.15 H .482 (ubstrings match-).15 F .063(ing speci\214ed patterns from the be)72 278.4 R .063(ginning and end of v)-.15 F .063(ariable v)-.25 F 2.563(alues. A)-.25 F (ne)2.563 E 2.563(wf)-.25 G .064(orm of command substitution,)383.249 278.4 R F1($\()72 290.4 Q F3(list)A F1(\))A F0 2.5(,i)C 2.5(sm)103.67 290.4 S (uch easier to nest than `)117.84 290.4 Q F3(list)A F0 2.5(`a)C (nd has simpli\214ed quoting rules.)235.04 290.4 Q .082(There are ne)97 306 R 2.582(wv)-.25 G .082(ariables to control the shell')161.436 306 R 2.581(sb)-.55 G(eha)284.333 306 Q(vior)-.2 E 2.581(,a)-.4 G .081(nd additional v)323.244 306 R .081(ariables set or interpreted spe-)-.25 F 1.038(cially by the shell.)72 318 R F1(RANDOM)6.038 E F0(and)3.538 E F1(SECONDS)3.538 E F0(are)3.539 E F3 (dynamic)3.539 E F0 -.25(va)3.539 G 3.539(riables: their).25 F -.25(va)3.539 G 1.039(lues are generated afresh).25 F 1.022(each time the)72 330 R 3.522(ya) -.15 G 1.022(re referenced.)140.176 330 R F1(RANDOM)6.022 E F0 1.021 (returns a dif)3.521 F 1.021(ferent random number each time it is referenced,) -.25 F(and)72 342 Q F1(SECONDS)3.138 E F0 .638 (returns the number of seconds since the shell w)3.138 F .638 (as started or the v)-.1 F .639(ariable w)-.25 F .639(as assigned to,)-.1 F 1.448(plus an)72 354 R 3.948(yv)-.15 G 1.448(alue assigned.)115.606 354 R F1 (PWD)6.448 E F0(and)3.948 E F1(OLDPWD)3.947 E F0 1.447 (are set to the current and pre)3.947 F 1.447(vious w)-.25 F 1.447 (orking directories,)-.1 F(respecti)72 366 Q -.15(ve)-.25 G(ly).15 E(.)-.65 E F1(TMOUT)5.604 E F0 .604(controls ho)3.104 F 3.104(wl)-.25 G .604 (ong the shell will w)226.436 366 R .604(ait at a prompt for input.)-.1 F(If) 5.604 E F1(TMOUT)3.104 E F0 .605(is set to a)3.105 F -.25(va)72 378 S 1.168 (lue greater than zero, the shell e).25 F 1.168(xits after w)-.15 F 1.168 (aiting that man)-.1 F 3.668(ys)-.15 G 1.167(econds for input.)337.478 378 R F1 (REPL)6.167 E(Y)-.92 E F0 1.167(is the def)3.667 F(ault)-.1 E -.25(va)72 390 S .991(riable for the).25 F F1 -.18(re)3.491 G(ad).18 E F0 -.2(bu)3.491 G .991 (iltin; if no v).2 F .992(ariable names are supplied as ar)-.25 F .992 (guments, the line read is assigned to)-.18 F F1(REPL)72 402 Q(Y)-.92 E F0(.)A F1 2.5(4.2.2. New)72 426 R(and Modi\214ed Builtins)2.5 E F0 .652(Both shells e) 97 441.6 R .651(xpand the basic sh set of b)-.15 F .651(uiltin commands.)-.2 F F1(Let)5.651 E F0(pro)3.151 E .651(vides a w)-.15 F .651 (ay to perform arithmetic)-.1 F 2.767(on shell v)72 453.6 R 5.268 (ariables. Shell)-.25 F 2.768(programmers use)5.268 F F1(typeset)5.268 E F0 2.768(\(bash includes)5.268 F F1(declar)5.268 E(e)-.18 E F0 2.768(as a synon) 5.268 F 2.768(ym\) to assign)-.15 F(attrib)72 465.6 Q .295(utes such as)-.2 F F3 -.2(ex)2.795 G(port).2 E F0(and)4.461 E F3 -.37(re)2.795 G(adonly).37 E F0 .295(to v)4.461 F(ariables.)-.25 E F1(Getopts)5.295 E F0 .294 (is used by shell scripts to parse script options)2.795 F .962(and ar)72 477.6 R 3.462(guments. The)-.18 F F1(set)3.462 E F0 .962(command has a ne)3.462 F 3.462(wo)-.25 G(ption)266.446 477.6 Q F13.463 E F0 .963(which tak)3.463 F .963(es option names as ar)-.1 F 3.463(guments. Option)-.18 F 1.28 (names are synon)72 489.6 R 1.28(yms for the other set options \(e.g.,)-.15 F F13.78 E F0(and)3.78 E F1 1.28(\255o noglob)3.78 F F0 3.78(\)o)C 3.78(rp) 375.97 489.6 S(ro)388.08 489.6 Q 1.28(vide ne)-.15 F 3.78(wf)-.25 G 1.28 (unctionality \()440.78 489.6 R F1(-o)A(notify)72 501.6 Q F0 3.348(,f)C .849 (or e)106.178 501.6 R 3.349(xample\). The)-.15 F F1 -.18(re)3.349 G(ad).18 E F0 -.2(bu)3.349 G .849(iltin tak).2 F .849(es a ne)-.1 F(w)-.25 E F13.349 E F0 .849(option to specify that a line ending in a backslash)3.349 F (should not be continued.)72 513.6 Q F1 2.5(4.2.3. T)72 537.6 R(ilde Expansion) -.18 E F0 -.35(Ti)97 553.2 S .252(lde e).35 F .251 (xpansion is a feature adopted from the C shell.)-.15 F 2.751(At)5.251 G .251 (ilde character at the be)331.172 553.2 R .251(ginning of a w)-.15 F .251 (ord is)-.1 F -.15(ex)72 565.2 S(panded to either).15 E F1($HOME)2.5 E F0 (or the home directory of another user)2.5 E 2.5(,d)-.4 G (epending on what follo)345.84 565.2 Q(ws the tilde.)-.25 E F1 2.5 (4.2.4. Interacti)72 589.2 R .2 -.1(ve I)-.1 H(mpr).1 E -.1(ove)-.18 G(ments).1 E F0 .789(The most noticable impro)97 604.8 R -.15(ve)-.15 G .789(ments o).15 F -.15(ve)-.15 G 3.289(rs).15 G 3.289(ha)263.385 604.8 S .789 (re geared for interacti)276.114 604.8 R 1.089 -.15(ve u)-.25 H 3.29(se. Ksh) .15 F .79(and bash pro)3.29 F .79(vide job)-.15 F .882(control in a v)72 616.8 R .882(ery similar f)-.15 F .882 (ashion, with the same options to enable and disable it \()-.1 F F1 .881 (set -o monitor)B F0 3.381(\)a)C .881(nd the)478.399 616.8 R(same b)72 628.8 Q (uiltin commands to manipulate jobs \()-.2 E F1(jobs/fg/bg/kill/wait)A F0(\).)A .866(Command line editing, with emacs and vi-style k)97 644.4 R 1.166 -.15 (ey b)-.1 H .866(indings, is a).15 F -.25(va)-.2 G .866(ilable in both shells.) .25 F .866(The Bash)5.866 F F3 -.37(re)72 656.4 S(adline).37 E F0 1.578 (library is considerably more sophisticated than the ksh editing library:)5.744 F 1.577(it allo)6.577 F 1.577(ws arbitrary k)-.25 F -.15(ey)-.1 G 1.867 (bindings, macros, a per)72 668.4 R 1.868(-user customization \214le \()-.2 F F3(~/.inputr)A(c)-.37 E F0 1.868(\), a number of v)B 1.868 (ariables to further customize)-.25 F(beha)72 680.4 Q(vior)-.2 E 3.538(,a)-.4 G 1.038(nd a much lar)116.868 680.4 R 1.038 (ger set of bindable editing commands.)-.18 F 1.037 (The ksh editing library pro)6.037 F 1.037(vides a small)-.15 F<8c78>72 692.4 Q (ed command set and only clumsy macros.)-.15 E .706(Both shells of)97 708 R .706(fer access to the command history)-.25 F 5.706(.T)-.65 G .706 (he in-line editing options ha)307.278 708 R 1.006 -.15(ve d)-.2 H(ef).15 E .706(ault k)-.1 F 1.006 -.15(ey b)-.1 H(ind-).15 E .624 (ings to access the history list.)72 720 R(The)5.624 E F1(fc)3.124 E F0 .624 (command is pro)3.124 F .624(vided to re-e)-.15 F -.15(xe)-.15 G .623(cute pre) .15 F .623(vious commands and display)-.25 F EP %%Page: 6 6 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF 2.5(-6-)279.67 48 S(the contents of the history list.) 72 84 Q/F1 10/Times-Bold@0 SF 2.5(4.2.5. Miscellaneous)72 108 R (Changes and Impr)2.5 E -.1(ov)-.18 G(ments).1 E F0 .707(Other impro)97 123.6 R -.15(ve)-.15 G .707(ments include aliases, the).15 F F1(select)3.207 E F0 .708 (shell language construct, which supports the genera-)3.207 F 1.298 (tion and presentation of simple menus, and e)72 135.6 R 1.298 (xtensions to the)-.15 F F1(export)3.798 E F0(and)3.798 E F1 -.18(re)3.798 G (adonly).18 E F0 -.2(bu)3.798 G 1.298(iltins which allo).2 F(w)-.25 E -.25(va) 72 147.6 S .017(riables to be assigned v).25 F .017 (alues at the same time the attrib)-.25 F .017(utes are set.)-.2 F -.8(Wo)5.018 G .018(rd splitting has changed:).8 F .018(if tw)5.018 F 2.518(oo)-.1 G(r) 500.67 147.6 Q .158(more adjacent w)72 159.6 R .157 (ord splitting characters occur)-.1 F 2.657(,b)-.4 G .157 (ash and ksh will generate null \214elds; sh mak)264.893 159.6 R .157 (es runs of mul-)-.1 F .339 (tiple \214eld separator charactors the same as a single separator)72 171.6 R 5.339(.B)-.55 G .34(ash and ksh split only the results of e)330.89 171.6 R (xpan-)-.15 E(sion, rather than e)72 183.6 Q -.15(ve)-.25 G(ry w).15 E (ord as sh does, closing a long-standing shell security hole.)-.1 E 1.234 (Shell functions in bash and ksh may ha)97 199.2 R 1.534 -.15(ve l)-.2 H 1.234 (ocal v).15 F 3.734(ariables. V)-.25 F 1.234(ariables declared with)-1.11 F F1 (typeset)3.734 E F0 1.234(\(or the)3.734 F .001(bash synon)72 211.2 R(ym,)-.15 E F1(local)2.501 E F0 .001(\), ha)B .301 -.15(ve a s)-.2 H .001 (cope restricted to the function and its descendents, and may shado).15 F 2.502 (wv)-.25 G(ariables)472.9 211.2 Q(de\214ned by the in)72 223.2 Q -.2(vo)-.4 G (king shell.).2 E(Local v)5 E(ariables are remo)-.25 E -.15(ve)-.15 G 2.5(dw) .15 G(hen a function completes.)317.75 223.2 Q F1 2.5(4.3. F)72 247.2 R(eatur) -.25 E(es Unique to bash)-.18 E F0(Naturally)97 262.8 Q 2.895(,b)-.65 G .395 (ash includes features not in sh or ksh.)144.515 262.8 R .395 (This section discusses some of the features which)5.395 F(mak)72 274.8 Q 2.986 (eb)-.1 G .486(ash unique.)101.546 274.8 R .486(Most of them pro)5.486 F .486 (vide impro)-.15 F -.15(ve)-.15 G 2.986(di).15 G(nteracti)288.098 274.8 Q .787 -.15(ve u)-.25 H .487(se, b).15 F .487(ut a fe)-.2 F 2.987(wp)-.25 G .487 (rogramming impro)394.653 274.8 R -.15(ve)-.15 G(ments).15 E (are present as well.)72 286.8 Q (Full descriptions of these features can be found in the bash documentation.)5 E F1 2.5(4.3.1. Startup)72 310.8 R(Files)2.5 E F0 .281(Bash e)97 326.4 R -.15 (xe)-.15 G .281(cutes startup \214les dif).15 F .281 (ferently than other shells.)-.25 F .281(The bash beha)5.281 F .28 (vior is a compromise between)-.2 F .116 (the csh principle of startup \214les with \214x)72 338.4 R .116(ed names e) -.15 F -.15(xe)-.15 G .116(cuted for each shell and the sh `).15 F (`minimalist')-.74 E 2.616('b)-.74 G(eha)472.26 338.4 Q(vior)-.2 E(.)-.55 E 2.956(An interacti)72 350.4 R 3.256 -.15(ve i)-.25 H 2.956 (nstance of bash started as a login shell reads and e).15 F -.15(xe)-.15 G (cutes).15 E/F2 10/Times-Italic@0 SF(~/.bash_pr)5.455 E(o\214le)-.45 E F0 2.955 (\(the \214le)7.121 F F2(.bash_pr)72 362.4 Q(o\214le)-.45 E F0 .835 (in the user')5 F 3.335(sh)-.55 G .835(ome directory\), if it e)187.385 362.4 R 3.335(xists. An)-.15 F(interacti)3.335 E 1.135 -.15(ve n)-.25 H .835 (on-login shell reads and e).15 F -.15(xe)-.15 G(cutes).15 E F2(~/.bashr)72 374.4 Q(c)-.37 E F0 5.538(.A)1.666 G(non-interacti)127.422 374.4 Q .838 -.15 (ve s)-.25 H .538(hell \(one be).15 F .538(gun to e)-.15 F -.15(xe)-.15 G .538 (cute a shell script, for e).15 F .537(xample\) reads no \214x)-.15 F .537 (ed startup)-.15 F .139(\214le, b)72 386.4 R .139(ut uses the v)-.2 F .139 (alue of the v)-.25 F(ariable)-.25 E F1(ENV)2.639 E F0 2.639(,i)C 2.639(fs) 253.361 386.4 S .139(et, as the name of a startup \214le.)263.22 386.4 R .139 (The ksh practice of reading)5.139 F F1($ENV)72 398.4 Q F0 .69(for e)3.19 F -.15(ve)-.25 G .69(ry shell, with the accompan).15 F .689(ying dif)-.15 F .689 (\214culty of de\214ning the proper v)-.25 F .689(ariables and functions for) -.25 F(interacti)72 410.4 Q .946 -.15(ve a)-.25 H .646(nd non-interacti).15 F .946 -.15(ve s)-.25 H .646(hells or ha).15 F .646 (ving the \214le read only for interacti)-.2 F .946 -.15(ve s)-.25 H .646 (hells, w).15 F .646(as considered too)-.1 F(comple)72 422.4 Q(x.)-.15 E F1 2.5 (4.3.2. New)72 446.4 R(Builtin Commands)2.5 E F0 1.119(There are a fe)97 462 R 3.619(wb)-.25 G 1.118(uiltins which are ne)170.986 462 R 3.618(wo)-.25 G 3.618 (rh)268.528 462 S -2.25 -.2(av e)280.476 462 T 1.118(been e)3.818 F 1.118 (xtended in bash.)-.15 F(The)6.118 E F1(enable)3.618 E F0 -.2(bu)3.618 G 1.118 (iltin allo).2 F(ws)-.25 E -.2(bu)72 474 S .736 (iltin commands to be turned on and of).2 F 3.236(fa)-.25 G(rbitrarily)250.198 474 Q 5.736(.T)-.65 G 3.237(ou)298.644 474 S .737(se the v)311.881 474 R .737 (ersion of)-.15 F F2(ec)3.237 E(ho)-.15 E F0 .737(found in a user')4.903 F 3.237(ss)-.55 G(earch)482.35 474 Q .013(path rather than the bash b)72 486 R (uiltin,)-.2 E/F3 10/Courier@0 SF .013(enable -n echo)2.513 F F0(suf)2.513 E 2.513(\214ces. The)-.25 F F1(help)2.513 E F0 -.2(bu)2.513 G .013(iltin pro).2 F .013(vides quick synopses of)-.15 F 1.382(the shell f)72 498 R 1.382 (acilities without requiring access to a manual page.)-.1 F F1(Builtin)6.382 E F0 1.383(is similar to)3.882 F F1(command)3.883 E F0 1.383(in that it)3.883 F .342(bypasses shell functions and directly e)72 510 R -.15(xe)-.15 G .342 (cutes b).15 F .342(uiltin commands.)-.2 F .342 (Access to a csh-style stack of directories)5.342 F .072(is pro)72 522 R .073 (vided via the)-.15 F F1(pushd)2.573 E F0(,)A F1(popd)2.573 E F0 2.573(,a)C(nd) 211.197 522 Q F1(dirs)2.573 E F0 -.2(bu)2.573 G(iltins.).2 E F1(Pushd)5.073 E F0(and)2.573 E F1(popd)2.573 E F0 .073(insert and remo)2.573 F .373 -.15(ve d) -.15 H .073(irectories from the).15 F .094(stack, respecti)72 534 R -.15(ve) -.25 G(ly).15 E 2.594(,a)-.65 G(nd)154.448 534 Q F1(dirs)2.594 E F0 .094 (lists the stack contents.The)2.594 F F1(suspend)2.594 E F0 .094 (command will stop the shell process when)2.594 F 1.329(job control is acti)72 546 R -.15(ve)-.25 G 3.829(;m).15 G 1.329(ost other shells do not allo)169.136 546 R 3.829(wt)-.25 G(hemselv)294.64 546 Q 1.33(es to be stopped lik)-.15 F 3.83(et)-.1 G(hat.)421.31 546 Q F1 -.74(Ty)6.33 G(pe,).74 E F0 1.33(the bash) 3.83 F(answer to)72 558 Q F1(which)2.5 E F0(and)2.5 E F1(whence,)2.5 E F0(sho) 2.5 E(ws what will happen when a w)-.25 E(ord is typed as a command:)-.1 E F3 6 ($t)97 576 S(ype export)115 576 Q(export is a shell builtin)97 588 Q 6($t)97 600 S(ype -t export)115 600 Q(builtin)97 612 Q 6($t)97 624 S(ype bash)115 624 Q (bash is /bin/bash)97 636 Q 6($t)97 648 S(ype cd)115 648 Q(cd is a function)97 660 Q(cd \(\))97 672 Q({)97 684 Q(builtin cd "$@" && xtitle $HOST: $PWD)121 696 Q(})97 708 Q EP %%Page: 7 7 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF 2.5(-7-)279.67 48 S -1.11(Va)72 84 S .682 (rious modes tell what a command w)1.11 F .681(ord is \(reserv)-.1 F .681(ed w) -.15 F .681(ord, alias, function, b)-.1 F .681(uiltin, or \214le\) or which v) -.2 F(er)-.15 E(-)-.2 E 1.15(sion of a command will be e)72 96 R -.15(xe)-.15 G 1.15(cuted based on a user').15 F 3.65(ss)-.55 G 1.15(earch path.)305.7 96 R 1.15(Some of this functionality has been)6.15 F (adopted by POSIX.2 and folded into the)72 108 Q/F1 10/Times-Bold@0 SF(command) 2.5 E F0(utility)2.5 E(.)-.65 E F1 2.5(4.3.3. Editing)72 132 R(and Completion) 2.5 E F0 .682(One area in which bash shines is command line editing.)97 147.6 R .682(Bash uses the)5.682 F/F2 10/Times-Italic@0 SF -.37(re)3.182 G(adline).37 E F0 .682(library to read and)4.848 F .102(edit lines when interacti)72 159.6 R -.15(ve)-.25 G 5.102(.R).15 G .103(eadline is a po)191.438 159.6 R .103 (werful and \215e)-.25 F .103(xible input f)-.15 F .103 (acility that a user can con\214gure to his)-.1 F 2.506(tastes. It)72 171.6 R (allo)2.506 E .006(ws lines to be edited using either emacs or vi commands, wh\ ere those commands are appropri-)-.25 F 2.994(ate. The)72 183.6 R .494 (full capability of emacs is not present \255 there is no w)2.994 F .495 (ay to e)-.1 F -.15(xe)-.15 G .495(cute a named command with M-x,).15 F .222 (for instance \255 b)72 195.6 R .222(ut the e)-.2 F .222 (xisting commands are more than adequate.)-.15 F .221 (The vi mode is compliant with the com-)5.222 F (mand line editing standardized by POSIX.2.)72 207.6 Q 1.69 (Readline is fully customizable.)97 223.2 R 1.691 (In addition to the basic commands and k)6.69 F 1.991 -.15(ey b)-.1 H 1.691 (indings, the library).15 F(allo)72 235.2 Q .83 (ws users to de\214ne additional k)-.25 F 1.13 -.15(ey b)-.1 H .83 (indings using a startup \214le.).15 F(The)5.83 E F2(inputr)3.329 E(c)-.37 E F0 .829(\214le, which def)4.995 F .829(aults to the)-.1 F(\214le)72 247.2 Q F2 (~/.inputr)4.287 E(c)-.37 E F0 4.287(,i)1.666 G 4.287(sr)137.43 247.2 S 1.788(\ ead each time readline initializes, permitting users to maintain a consistent \ interf)148.937 247.2 R(ace)-.1 E .547(across a set of programs.)72 259.2 R .546 (Readline includes an e)5.546 F .546(xtensible interf)-.15 F .546 (ace, so each program using the library can)-.1 F .23(add its o)72 271.2 R .23 (wn bindable commands and program-speci\214c k)-.25 F .531 -.15(ey b)-.1 H 2.731(indings. Bash).15 F .231(uses this f)2.731 F .231 (acility to add bindings)-.1 F(that perform history e)72 283.2 Q (xpansion or shell w)-.15 E(ord e)-.1 E(xpansions on the current input line.) -.15 E .707(Readline interprets a number of v)97 298.8 R .706 (ariables which further tune its beha)-.25 F(vior)-.2 E 5.706(.V)-.55 G .706 (ariables e)408.432 298.8 R .706(xist to control)-.15 F .157 (whether or not eight-bit characters are directly read as input or con)72 310.8 R -.15(ve)-.4 G .158(rted to meta-pre\214x).15 F .158(ed k)-.15 F .458 -.15 (ey s)-.1 H .158(equences \(a).15 F(meta-pre\214x)72 322.8 Q 1.575(ed k)-.15 F 1.875 -.15(ey s)-.1 H 1.575 (equence consists of the character with the eighth bit zeroed, preceded by the) .15 F F2(meta-)4.074 E(pr)72 334.8 Q(e\214x)-.37 E F0(character)4.45 E 2.784 (,u)-.4 G .284(sually escape, which selects an alternate k)145.374 334.8 R -.15 (ey)-.1 G .285(map\), to decide whether to output characters).15 F .485 (with the eighth bit set directly or as a meta-pre\214x)72 346.8 R .485(ed k) -.15 F .784 -.15(ey s)-.1 H .484(equence, whether or not to wrap to a ne).15 F 2.984(ws)-.25 G(creen)482.35 346.8 Q .157 (line when a line being edited is longer than the screen width, the k)72 358.8 R -.15(ey)-.1 G .158(map to which subsequent k).15 F .458 -.15(ey b)-.1 H (indings).15 E .531(should apply)72 370.8 R 3.031(,o)-.65 G 3.031(re)133.802 370.8 S -.15(ve)144.353 370.8 S 3.031(nw).15 G .531 (hat happens when readline w)168.894 370.8 R .531(ants to ring the terminal') -.1 F 3.03(sb)-.55 G 3.03(ell. All)399.37 370.8 R .53(of these v)3.03 F (ariables)-.25 E(can be set in the inputrc \214le.)72 382.8 Q .284 (The startup \214le understands a set of C preprocessor)97 398.4 R(-lik)-.2 E 2.785(ec)-.1 G .285(onditional constructs which allo)329.49 398.4 R 2.785(wv) -.25 G(ariables)472.9 398.4 Q .12(or k)72 410.4 R .42 -.15(ey b)-.1 H .119(ind\ ings to be assigned based on the application using readline, the terminal curr\ ently being used, or).15 F .316(the editing mode.)72 422.4 R .317 (Users can add program-speci\214c bindings to mak)5.317 F 2.817(et)-.1 G .317 (heir li)352.808 422.4 R -.15(ve)-.25 G 2.817(se).15 G 2.817(asier: here) 396.922 422.4 R .317(are bindings to)2.817 F(edit the v)72 434.4 Q(alue of)-.25 E F1 -.74(PA)2.5 G(TH)-.21 E F0(and double-quote the current or pre)2.5 E (vious w)-.25 E(ord:)-.1 E/F3 10/Courier@0 SF 6(#M)97 452.4 S (acros that are convenient for shell interaction)115 452.4 Q($if Bash)97 464.4 Q 6(#e)97 476.4 S(dit the path)115 476.4 Q ("\\C-xp": "PATH=${PATH}\\e\\C-e\\C-a\\ef\\C-f")97 488.4 Q 6(#p)97 500.4 S (repare to type a quoted word -- insert open and close double quotes)115 500.4 Q 6(#a)97 512.4 S(nd move to just after the open quote)115 512.4 Q ("\\C-x\\"": "\\"\\"\\C-b")97 524.4 Q 6(#Q)97 536.4 S (uote the current or previous word)115 536.4 Q("\\C-xq": "\\eb\\"\\ef\\"")97 548.4 Q($endif)97 560.4 Q F0 .322(There is a readline command to re-read the \ \214le, so users can edit the \214le, change some bindings, and be)72 582 R (gin)-.15 E(to use them almost immediately)72 594 Q(.)-.65 E .851 (Bash implements the)97 609.6 R F1(bind)3.351 E F0 -.2(bu)3.351 G .851 (iltin for more dyamic control of readline than the startup \214le permits.).2 F F1(Bind)72 621.6 Q F0 .167(is used in se)2.667 F -.15(ve)-.25 G .167(ral w) .15 F 2.667(ays. In)-.1 F F2(list)2.667 E F0 .167 (mode, it can display the current k)4.333 F .466 -.15(ey b)-.1 H .166 (indings, list all the readline edit-).15 F .149(ing directi)72 633.6 R -.15 (ve)-.25 G 2.649(sa).15 G -.25(va)132.798 633.6 S .149 (ilable for binding, list which k).25 F -.15(ey)-.1 G 2.649(si).15 G -1.9 -.4 (nv o)282.352 633.6 T .349 -.1(ke a g).4 H -2.15 -.25(iv e).1 H 2.65(nd).25 G (irecti)345.3 633.6 Q -.15(ve)-.25 G 2.65(,o).15 G 2.65(ro)385.04 633.6 S .15 (utput the current set of k)396.02 633.6 R -.15(ey)-.1 G .526(bindings in a fo\ rmat that can be incorporated directly into an inputrc \214le.)72 645.6 R(In) 5.526 E F2(batc)3.026 E(h)-.15 E F0 .526(mode, it reads a series)4.692 F .71 (of k)72 657.6 R 1.01 -.15(ey b)-.1 H .71 (indings directly from a \214le and passes them to readline.).15 F .71 (In its most common usage,)5.71 F F1(bind)3.21 E F0(tak)3.21 E .71(es a)-.1 F .534(single string and passes it directly to readline, which interprets the li\ ne as if it had just been read from the)72 669.6 R(inputrc \214le.)72 681.6 Q (Both k)5 E .3 -.15(ey b)-.1 H(indings and v).15 E (ariable assignments can appear in the string gi)-.25 E -.15(ve)-.25 G 2.5(nt) .15 G(o)424.4 681.6 Q F1(bind)2.5 E F0(.)A .401(The readline library also pro) 97 697.2 R .402(vides an interf)-.15 F .402(ace for)-.1 F F2(wor)2.902 E 2.902 (dc)-.37 G(ompletion)328.546 697.2 Q F0 5.402(.W)C .402(hen the)385.888 697.2 R F2(completion)2.902 E F0(character)4.568 E 1.261(\(usually T)72 709.2 R 1.261 (AB\) is typed, readline looks at the w)-.93 F 1.26 (ord currently being entered and computes the set of \214le-)-.1 F .523 (names of which the current w)72 721.2 R .523(ord is a v)-.1 F .523 (alid pre\214x.)-.25 F .524 (If there is only one possible completion, the rest of the)5.523 F EP %%Page: 8 8 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF 2.5(-8-)279.67 48 S .358 (characters are inserted directly)72 84 R 2.858(,o)-.65 G .358(therwise the co\ mmon pre\214x of the set of \214lenames is added to the current)205.232 84 R -.1(wo)72 96 S 3.199(rd. A).1 F .699(second T)3.199 F .699(AB character entere\ d immediately after a non-unique completion causes readline to list)-.93 F 1.814(the possible completions; there is an option to ha)72 108 R 2.113 -.15 (ve t)-.2 H 1.813(he list displayed immediately).15 F 6.813(.R)-.65 G 1.813 (eadline pro)436.517 108 R(vides)-.15 E .482 (hooks so that applications can pro)72 120 R .482 (vide speci\214c types of completion before the def)-.15 F .483 (ault \214lename completion)-.1 F .132(is attempted.)72 132 R .132 (This is quite \215e)5.132 F .132(xible, though it is not completely user)-.15 F 2.632(-programmable. Bash,)-.2 F .132(for e)2.632 F .132(xample, can)-.15 F .37(complete \214lenames, command names \(including aliases, b)72 144 R .37 (uiltins, shell reserv)-.2 F .37(ed w)-.15 F .37(ords, shell functions, and)-.1 F -.15(exe)72 156 S .424(cutables found in the \214le system\), shell v).15 F .424(ariables, usernames, and hostnames.)-.25 F .423 (It uses a set of heuristics)5.424 F(that, while not perfect, is generally qui\ te good at determining what type of completion to attempt.)72 168 Q/F1 10 /Times-Bold@0 SF 2.5(4.3.4. History)72 192 R F0 .255 (Access to the list of commands pre)97 207.6 R .255(viously entered \(the)-.25 F/F2 10/Times-Italic@0 SF .255(command history)2.755 F F0 2.756(\)i)C 2.756(sp) 399.236 207.6 S(ro)410.882 207.6 Q .256(vided jointly by bash)-.15 F .095 (and the readline library)72 219.6 R 5.094(.B)-.65 G .094(ash pro)178.928 219.6 R .094(vides v)-.15 F .094(ariables \()-.25 F F1(HISTFILE)A F0(,)A F1(HISTSIZE) 2.594 E F0 2.594(,a)C(nd)382.068 219.6 Q F1(HISTCONTR)2.594 E(OL)-.3 E F0 2.594 (\)a)C .094(nd the)479.186 219.6 R F1(history)72 231.6 Q F0(and)2.825 E F1(fc) 2.825 E F0 -.2(bu)2.825 G .325(iltins to manipulate the history list.).2 F .325 (The v)5.325 F .325(alue of)-.25 F F1(HISTFILE)2.825 E F0 .326 (specifes the \214le where bash)2.826 F .128(writes the command history on e)72 243.6 R .128(xit and reads it on startup.)-.15 F F1(HISTSIZE)5.128 E F0 .128 (is used to limit the number of com-)2.628 F .346(mands sa)72 255.6 R -.15(ve) -.2 G 2.846(di).15 G 2.846(nt)129.002 255.6 S .346(he history)139.628 255.6 R (.)-.65 E F1(HISTCONTR)5.346 E(OL)-.3 E F0(pro)2.846 E .346 (vides a crude form of control o)-.15 F -.15(ve)-.15 G 2.846(rw).15 G .346 (hich commands are)425.548 255.6 R(sa)72 267.6 Q -.15(ve)-.2 G 2.905(do).15 G 2.905(nt)102.325 267.6 S .405(he history list: a v)113.01 267.6 R .405(alue of) -.25 F F2(ignor)2.905 E(espace)-.37 E F0 .405(means to not sa)4.571 F .705 -.15 (ve c)-.2 H .405(ommands which be).15 F .405(gin with a space; a)-.15 F -.25 (va)72 279.6 S .339(lue of).25 F F2(ignor)2.839 E(edups)-.37 E F0 .339 (means to not sa)4.505 F .64 -.15(ve c)-.2 H .34 (ommands identical to the last command sa).15 F -.15(ve)-.2 G(d.).15 E F1 (HISTCONTR)5.34 E(OL)-.3 E F0 -.1(wa)72 291.6 S 3.15(sn).1 G(amed)95.6 291.6 Q F1(history_contr)3.15 E(ol)-.18 E F0 .65(in earlier v)3.15 F .649 (ersions of bash; the old name is still accepted for backw)-.15 F .649 (ards com-)-.1 F(patibility)72 303.6 Q 5.723(.T)-.65 G(he)121.803 303.6 Q F1 (history)3.223 E F0 .724(command can read or write \214les containing the hist\ ory list and display the current)3.223 F .895(list contents.)72 315.6 R(The) 5.895 E F1(fc)3.395 E F0 -.2(bu)3.395 G .895 (iltin, adopted from POSIX.2 and the K).2 F .894(orn Shell, allo)-.35 F .894 (ws display and re-e)-.25 F -.15(xe)-.15 G(cution,).15 E .461 (with optional editing, of commands from the history list.)72 327.6 R .462 (The readline library of)5.462 F .462(fers a set of commands to)-.25 F .657(se\ arch the history list for a portion of the current input line or a string type\ d by the user)72 339.6 R 5.657(.F)-.55 G(inally)445.836 339.6 Q 3.157(,t)-.65 G (he)476.403 339.6 Q F2(his-)3.157 E(tory)72 351.6 Q F0(library)4.196 E 2.53(,g) -.65 G .03(enerally incorporated directly into the readline library)128.346 351.6 R 2.53(,i)-.65 G .03(mplements a f)350.636 351.6 R .031 (acility for history recall,)-.1 F -.15(ex)72 363.6 S .594(pansion, and re-e) .15 F -.15(xe)-.15 G .594(cution of pre).15 F .594(vious commands v)-.25 F .594 (ery similar to csh \(`)-.15 F .593(`bang history')-.74 F .593 (', so called because)-.74 F(the e)72 375.6 Q (xclamation point introduces a history substitution\):)-.15 E/F3 10/Courier@0 SF 6($e)97 393.6 S(cho a b c d e)115 393.6 Q 6(abcde)97 405.6 S 6($!)97 417.6 S 6(!fghi)115 417.6 S(echo a b c d e f g h i)97 429.6 Q 6(abcdefghi)97 441.6 S 6 ($!)97 453.6 S(-2)115 453.6 Q(echo a b c d e)97 465.6 Q 6(abcde)97 477.6 S 6 ($e)97 489.6 S(cho !-2:1-4)115 489.6 Q(echo a b c d)97 501.6 Q 6(abcd)97 513.6 S F0 1.456(The command history is only sa)72 535.2 R -.15(ve)-.2 G 3.957(dw).15 G 1.457(hen the shell is interacti)232.599 535.2 R -.15(ve)-.25 G 3.957(,s).15 G 3.957(oi)352.804 535.2 S 3.957(ti)364.541 535.2 S 3.957(sn)374.058 535.2 S 1.457(ot a)386.905 535.2 R -.25(va)-.2 G 1.457(ilable for use by shell).25 F (scripts.)72 547.2 Q F1 2.5(4.3.5. New)72 571.2 R(Shell V)2.5 E(ariables)-.92 E F0 .701(There are a number of con)97 586.8 R -.15(ve)-.4 G .701(nience v).15 F .701(ariables that bash interprets to mak)-.25 F 3.2(el)-.1 G .7(ife easier) 402.76 586.8 R 5.7(.T)-.55 G .7(hese include)453.59 586.8 R F1(FIGNORE)72 598.8 Q F0 3.973(,w)C 1.473(hich is a set of \214lename suf)132.363 598.8 R<8c78>-.25 E 1.474(es identifying \214les to e)-.15 F 1.474 (xclude when completing \214lenames;)-.15 F F1(HOSTTYPE)72 610.8 Q F0 3.03(,w)C .53(hich is automatically set to a string describing the type of hardw)139.21 610.8 R .53(are on which bash is cur)-.1 F(-)-.2 E .76(rently e)72 622.8 R -.15 (xe)-.15 G(cuting;).15 E F1(OSTYPE)3.26 E F0 3.26(,t)C 3.26(ow)191.76 622.8 S .76(hich bash assigns a v)207.24 622.8 R .761(alue that identi\214es the v)-.25 F .761(ersion of)-.15 F/F4 9/Times-Roman@0 SF(UNIX)3.261 E F0(it')3.261 E 3.261 (sr)-.55 G(unning)476.22 622.8 Q 1.354 (on \(great for putting architecture-speci\214c binary directories into the)72 634.8 R F1 -.74(PA)3.854 G(TH)-.21 E F0 1.354(\); and)B F1(IGNOREEOF)3.854 E F0 3.854(,w)C(hose)485.67 634.8 Q -.25(va)72 646.8 S .062 (lue indicates the number of consecuti).25 F .362 -.15(ve E)-.25 H .062 (OF characters that an interacti).15 F .362 -.15(ve s)-.25 H .062 (hell will read before e).15 F .062(xiting \255)-.15 F .114(an easy w)72 658.8 R .113(ay to k)-.1 F .113(eep yourself from being logged out accidentally)-.1 F 5.113(.T)-.65 G(he)344.285 658.8 Q F1(auto_r)2.613 E(esume)-.18 E F0 -.25(va) 2.613 G .113(riable alters the w).25 F(ay)-.1 E .409 (the shell treats simple command names: if job control is acti)72 670.8 R -.15 (ve)-.25 G 2.909(,a).15 G .409(nd this v)335.516 670.8 R .409 (ariable is set, single-w)-.25 F .409(ord simple)-.1 F .17(commands without re\ directions cause the shell to \214rst look for a suspended job with that name \ before start-)72 682.8 R(ing a ne)72 694.8 Q 2.5(wp)-.25 G(rocess.)118.13 694.8 Q EP %%Page: 9 9 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF 2.5(-9-)279.67 48 S/F1 10/Times-Bold@0 SF 2.5 (4.3.6. Brace)72 84 R(Expansion)2.5 E F0 .653(Since sh of)97 99.6 R .653 (fers no con)-.25 F -.15(ve)-.4 G .653(nient w).15 F .653 (ay to generate arbitrary strings that share a common pre\214x or suf)-.1 F <8c78>-.25 E 1.893(\(pathname e)72 111.6 R 1.893 (xpansion requires that the \214lenames e)-.15 F 1.892(xist\), bash implements) -.15 F/F2 10/Times-Italic@0 SF(br)4.392 E 1.892(ace e)-.15 F(xpansion)-.2 E F0 4.392(,ac)C(apability)469 111.6 Q(pick)72 123.6 Q .496(ed up from csh.)-.1 F .496(Brace e)5.496 F .496(xpansion is similar to pathname e)-.15 F .496 (xpansion, b)-.15 F .497(ut the strings generated need not)-.2 F 1.107 (correspond to e)72 135.6 R 1.107(xisting \214les.)-.15 F 3.607(Ab)6.107 G 1.107(race e)207.655 135.6 R 1.107(xpression consists of an optional)-.15 F F2 (pr)3.606 E(eamble)-.37 E F0 3.606(,f)1.666 G(ollo)419.286 135.6 Q 1.106 (wed by a pair of)-.25 F 2.809 (braces enclosing a series of comma-separated strings, and an optional)72 147.6 R F2(postamble)5.31 E F0 7.81(.T)1.666 G 2.81(he preamble is)440.06 147.6 R(pr\ epended to each string within the braces, and the postamble is then appended t\ o each resulting string:)72 159.6 Q/F3 10/Courier@0 SF 6($e)97 177.6 S (cho a{d,c,b}e)115 177.6 Q(ade ace abe)97 189.6 Q F1 2.5(4.3.7. Pr)72 219.6 R (ompt Customization)-.18 E F0 .077(One of the more popular interacti)97 235.2 R .376 -.15(ve f)-.25 H .076(eatures that bash pro).15 F .076 (vides is the ability to customize the prompt.)-.15 F(Both)72 247.2 Q F1(PS1) 3.305 E F0(and)3.305 E F1(PS2,)3.305 E F0 .805 (the primary and secondary prompts, are e)3.305 F .805 (xpanded before being displayed.)-.15 F -.15(Pa)5.805 G(rameter).15 E .324 (and v)72 259.2 R .324(ariable e)-.25 F .324 (xpansion is performed when the prompt string is e)-.15 F .323 (xpanded, so the v)-.15 F .323(alue of an)-.25 F 2.823(ys)-.15 G .323(hell v) 454.217 259.2 R(ariable)-.25 E .728(can be put into the prompt \(e.g.,)72 271.2 R F1($SHL)3.228 E(VL)-.92 E F0 3.228(,w)C .728(hich indicates ho)258.564 271.2 R 3.228(wd)-.25 G .729(eeply the current shell is nested\).)342.988 271.2 R (Bash)5.729 E 1.895 (specially interprets characters in the prompt string preceded by a backslash.) 72 283.2 R 1.895(Some of these backslash)6.895 F .874 (escapes are replaced with the current time, the date, the current w)72 295.2 R .874(orking directory)-.1 F 3.374(,t)-.65 G .874(he username, and the)416.958 295.2 R .781(command number or history number of the command being entered.)72 307.2 R .78(There is e)5.781 F -.15(ve)-.25 G 3.28(nab).15 G .78 (ackslash escape to)429.13 307.2 R .007 (cause the shell to change its prompt when running as root after an)72 319.2 R F2(su)2.507 E F0 5.007(.B)C .008(efore printing each primary prompt,)360.388 319.2 R .27(bash e)72 331.2 R .27(xpands the v)-.15 F(ariable)-.25 E F1(PR)2.77 E(OMPT_COMMAND)-.3 E F0 .269(and, if it has a v)2.77 F .269(alue, e)-.25 F -.15 (xe)-.15 G .269(cutes the e).15 F .269(xpanded v)-.15 F .269(alue as a)-.25 F .04(command, allo)72 343.2 R .041(wing additional prompt customization.)-.25 F -.15(Fo)5.041 G 2.541(re).15 G .041 (xample, this assignment causes the current user)311.964 343.2 R(,)-.4 E .99 (the current host, the time, the last component of the current w)72 355.2 R .989(orking directory)-.1 F 3.489(,t)-.65 G .989(he le)402.954 355.2 R -.15(ve) -.25 G 3.489(lo).15 G 3.489(fs)443.412 355.2 S .989(hell nesting,)454.121 355.2 R(and the history number of the current command to be embedded into the primar\ y prompt:)72 367.2 Q F3 6($P)97 385.2 S (S1='\\u@\\h [\\t] \\W\($SHLVL:\\!\)\\$ ')115 385.2 Q (chet@odin [21:03:44] documentation\(2:636\)$ cd ..)97 397.2 Q (chet@odin [21:03:54] src\(2:637\)$)97 409.2 Q F0 .619 (The string being assigned is surrounded by single quotes so that if it is e)72 430.8 R(xported,)-.15 E F1(SHL)3.119 E(VL)-.92 E F0 .619(will be updated)3.119 F(by a child shell:)72 442.8 Q F3 (chet@odin [21:13:35] src\(2:638\)$ export PS1)97 460.8 Q (chet@odin [21:17:40] src\(2:639\)$ bash)97 472.8 Q (chet@odin [21:17:46] src\(3:696\)$)97 484.8 Q F0(The)72 506.4 Q F1(\\$)2.5 E F0(escape is displayed as `)2.5 E(`)-.74 E F1($)A F0 1.48 -.74('' w)D (hen running as a normal user).74 E 2.5(,b)-.4 G(ut as `)342.08 506.4 Q(`)-.74 E F1(#)A F0 1.48 -.74('' w)D(hen running as root.).74 E F1 2.5(4.3.8. POSIX)72 530.4 R(Mode)2.5 E F0 .46(Although bash is intended to be POSIX.2 compliant, t\ here are areas in which the def)97 546 R .46(ault beha)-.1 F .46(vior is)-.2 F 1.168(not compatible with the standard.)72 558 R -.15(Fo)6.169 G 3.669(ru).15 G 1.169(sers who wish to operate in a strict POSIX.2 en)238.85 558 R 1.169 (vironment, bash)-.4 F .61(implements a)72 570 R F2 .61(POSIX mode)3.11 F F0 5.61(.W)C .61(hen this mode is acti)199.42 570 R -.15(ve)-.25 G 3.109(,b).15 G .609(ash modi\214es its def)303.727 570 R .609(ault operation where it dif)-.1 F(fers)-.25 E .066(from POSIX.2 to match the standard.)72 582 R .067 (POSIX mode is entered when bash is started with the)5.066 F F1 .067(-o posix) 2.567 F F0(option)2.567 E .382(or when)72 594 R F1 .382(set -o posix)2.882 F F0 .381(is e)2.881 F -.15(xe)-.15 G 2.881(cuted. F).15 F .381 (or compatibility with other GNU softw)-.15 F .381 (are that attempts to be POSIX.2)-.1 F 5.752 (compliant, bash also enters POSIX mode if either of the v)72 606 R(ariables) -.25 E F1(POSIX_PED)8.253 E(ANTIC)-.35 E F0(or)8.253 E F1(POSIXL)72 618 Q (Y_CORRECT)-.92 E F0 1.179(is set when bash is started or assigned a v)3.679 F 1.178(alue during e)-.25 F -.15(xe)-.15 G 3.678(cution. When).15 F 1.178 (bash is)3.678 F .218(started in POSIX mode, for e)72 630 R .218(xample, the) -.15 F F1(kill)2.718 E F0 -.2(bu)2.718 G(iltin').2 E(s)-.55 E F12.718 E F0 .218(option beha)2.718 F -.15(ve)-.2 G 2.718(sd).15 G(if)370.166 630 Q .219 (ferently: it lists the names of all)-.25 F 1.084(signals on a single line sep\ arated by spaces, rather than listing the signal names and their corresponding) 72 642 R(numbers.)72 654 Q .865(Some of the def)97 669.6 R .865(ault bash beha) -.1 F .865(vior dif)-.2 F .865 (fers from other shells as a result of the POSIX standard.)-.25 F -.15(Fo)5.866 G(r).15 E 1.16(instance, bash includes the)72 681.6 R F1(!)3.66 E F0(reserv) 6.16 E 1.16(ed w)-.15 F 1.16(ord to ne)-.1 F -.05(ga)-.15 G 1.16 (te the return status of a pipeline because it has been).05 F (de\214ned by POSIX.2.)72 693.6 Q (Neither sh nor ksh has implemented that feature.)5 E EP %%Page: 10 10 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF 2.5(-1)277.17 48 S 2.5(0-)288 48 S/F1 10/Times-Bold@0 SF 2.5(4.4. F)72 84 R(eatur)-.25 E(es Unique to ksh)-.18 E F0 .177 (Ksh includes a number of features not in the currently-released v)97 99.6 R .178(ersion of bash, v)-.15 F .178(ersion 1.14.)-.15 F(Unless)5.178 E .822 (noted, none of these features is in the POSIX.2 standard.)72 111.6 R .821 (Where appropriate the equi)5.821 F -.25(va)-.25 G .821(lent bash features).25 F(are noted.)72 123.6 Q F1 2.5(4.4.1. The)72 147.6 R(ksh Language)2.5 E F0 2.955(An)97 163.2 S .955 -.25(ew c)112.175 163.2 T .455(ompound command folds) .25 F F1(test)2.955 E F0 .456(into the ksh language, delimited by the reserv) 2.955 F .456(ed w)-.15 F(ords)-.1 E F1([[)2.956 E F0(and)2.956 E F1(]])72 175.2 Q F0 5.726(.T)C .726(he syntax is identical to)92.996 175.2 R F1(test)3.225 E F0 .725(with a fe)3.225 F 3.225(wc)-.25 G .725 (hanges: for instance, instead of)262.855 175.2 R F13.225 E F0(and)3.225 E F13.225 E F0(,)A F1(&&)3.225 E F0(and)3.225 E/F2 10/Symbol SF 3.225 E F0(are)3.225 E 3.32(used. The)72 187.2 R -.1(wo)3.32 G .82(rds between) .1 F F1([[)3.32 E F0(and)3.32 E F1(]])3.32 E F0 .82(are not processed for w) 3.32 F .82(ord splitting or \214lename generation.)-.1 F .82(The ne)5.82 F(w) -.25 E .926 (command does pattern matching as well as string comparison, a la the)72 199.2 R F1(case)3.425 E F0 3.425(command. This)3.425 F(ne)3.425 E 3.425(wc)-.25 G (ontrol)480.11 199.2 Q .165(structure does ha)72 211.2 R .465 -.15(ve t)-.2 H .165(he adv).15 F .166(antage of reducing common ar)-.25 F .166 (gument problems encountered using test \(e.g.)-.18 F F1(test)2.666 E ("$string")72 223.2 Q F0 2.928(,w)C(here)125.748 223.2 Q F1($string)2.928 E F0 -.15(ex)2.928 G .428(pands to).15 F F12.928 E F0 .428(\), b)B .428 (ut at the cost of bloating the language.)-.2 F .427(The POSIX.2 test algo-) 5.427 F 2.752(rithm that bash uses, along with some programmer care, alle)72 235.2 R 2.752(viates those problems in a backw)-.25 F(ards-)-.1 E .854 (compatible w)72 247.2 R .853(ay with no additions to the language.)-.1 F .853 (The one capability of)5.853 F F1 .853([[ ]])3.353 F F0 .853(not a)3.353 F -.25 (va)-.2 G .853(ilable in bash is its).25 F(ability to test whether an indi)72 259.2 Q(vidual)-.25 E F1(set \255o)2.5 E F0(option is turned on or of)2.5 E(f.) -.25 E .339(Other parts of the ksh language are not common to bash.)97 274.8 R (The)5.34 E F1(\(\(...\)\))2.84 E F0(operator)5.34 E 2.84(,e)-.4 G(qui)419.33 274.8 Q -.25(va)-.25 G .34(lent to).25 F F1 .34(let "...")2.84 F F0(,)A .197 (is unique to ksh, as are the concept of co-processes and the)72 286.8 R F1 (time)2.697 E F0 -.1(ke)2.696 G(yw)-.05 E .196 (ord to time commands and pipelines.)-.1 F F1 2.5(4.4.2. Functions)72 310.8 R (and Aliases)2.5 E F0 1.022(The K)97 326.4 R 1.022(orn shell has)-.35 F/F3 10 /Times-Italic@0 SF(autoloaded)3.522 E F0 3.522(functions. A)3.522 F 1.022 (function mark)3.522 F 1.022(ed as)-.1 F F3(autoload)3.522 E F0 1.022 (is not de\214ned until it is)5.188 F 1.042(\214rst e)72 338.4 R -.15(xe)-.15 G 3.542(cuted. When).15 F 1.042(such a function is e)3.542 F -.15(xe)-.15 G 1.042 (cuted, a search is made through the directories in).15 F F1(FP)3.541 E -.95 (AT)-.74 G(H).95 E F0(\(a)3.541 E .27 (colon-separated list of directories similar to)72 350.4 R F1 -.74(PA)2.77 G (TH)-.21 E F0 2.77(\)f)C .27(or a \214le with the same name as the function.) 285.78 350.4 R .27(That \214le)5.27 F .548(is then read in as with the)72 362.4 R F1(.)3.881 E F0 .547(command; presumably the function is de\214ned therein.) 3.047 F .547(There is a pair of shell)5.547 F .886 (functions included in the bash distrib)72 374.4 R .886(ution \()-.2 F F3 -.2 (ex)C(amples/functions/autoload).2 E F0 5.886(\)t)C .886(hat pro)378.35 374.4 R .886(vide much of this func-)-.15 F (tionality without changing the shell itself.)72 386.4 Q .116 (Ksh functions are scoped in such a w)97 402 R .116(ay that the en)-.1 F .116 (vironment in which the)-.4 F 2.616(ya)-.15 G .116(re e)405.144 402 R -.15(xe) -.15 G .115(cuted is closer to a).15 F .827(shell script en)72 414 R 3.327 (vironment. Bash)-.4 F .827(uses the POSIX.2 scoping rules, which mak)3.327 F 3.327(et)-.1 G .827(he function e)392.517 414 R -.15(xe)-.15 G .828(cution en) .15 F(vi-)-.4 E 1.2(ronment an e)72 426 R 1.2(xact cop)-.15 F 3.7(yo)-.1 G 3.7 (ft)174.86 426 S 1.199(he shell en)184.67 426 R 1.199 (vironment with the replacement of the shell')-.4 F 3.699(sp)-.55 G 1.199 (ositional paramters)426.421 426 R(with the function ar)72 438 Q 2.5 (guments. K)-.18 F (orn shell functions do not share options or traps with the in)-.35 E -.2(vo) -.4 G(king shell.).2 E .451(Ksh has)97 453.6 R F3(tr)2.951 E(ac)-.15 E -.1(ke) -.2 G(d).1 E F0 .452(aliases, which alias a command name to its full pathname.) 2.952 F .452(Bash has true command)5.452 F(hashing.)72 465.6 Q F1 2.5 (4.4.3. Arrays)72 489.6 R F0 .246 (Arrays are an aspect of ksh that has no real bash equi)97 505.2 R -.25(va)-.25 G 2.746(lent. The).25 F 2.746(ya)-.15 G .246(re easy to create and manipulate:) 371.42 505.2 R 1.637 (an array is created automatically by using subscript assignment \()72 517.2 R F1(name)A F0([)A F3(inde)A(x)-.2 E F0(]=)A F1 -.1(va)C(lue).1 E F0 1.637 (\), and an)B 4.137(yv)-.15 G(ariable)476.79 517.2 Q 1.967 (may be referred to as an array)72 529.2 R 6.967(.K)-.65 G 1.967(sh arrays, ho) 219.229 529.2 R(we)-.25 E -.15(ve)-.25 G 2.767 -.4(r, h).15 H -2.25 -.2(av e).4 H(se)4.667 E -.15(ve)-.25 G 1.967(ral anno).15 F 1.967(ying limitations: the) -.1 F 4.466(ym)-.15 G 1.966(ay be)480.654 529.2 R(inde)72 541.2 Q -.15(xe)-.15 G 3.498(do).15 G .998(nly up to 512 or 1024 elements, depending on ho)111.858 541.2 R 3.498(wt)-.25 G .999(he shell is compiled, and there is only the) 330.188 541.2 R(clumsy)72 553.2 Q F1 .223(set -A)2.723 F F0 .223 (to assign a list of v)2.723 F .223(alues sequentially)-.25 F 5.223(.D)-.65 G .223(espite these limits, arrays are useful, if underutilized)293.31 553.2 R (by shell programmers.)72 565.2 Q F1 2.5(4.4.4. Builtin)72 589.2 R(Commands)2.5 E F0 .112(Some of the b)97 604.8 R .112(uiltin commands ha)-.2 F .412 -.15 (ve b)-.2 H .112(een e).15 F .112(xtended or are ne)-.15 F 2.612(wi)-.25 G 2.613(nk)351.402 604.8 S 2.613(sh. The)364.015 604.8 R F1(print)2.613 E F0 -.2 (bu)2.613 G .113(iltin w).2 F .113(as included)-.1 F .242(to w)72 616.8 R .242 (ork around the incompatibilities and limitations of)-.1 F F1(echo)2.741 E F0 5.241(.T)C(he)328.234 616.8 Q F1(whence)2.741 E F0 .241(command tells what w) 2.741 F .241(ould hap-)-.1 F .418(pen if each ar)72 628.8 R .418 (gument were typed as a command name.)-.18 F(The)5.418 E F1(cd)2.919 E F0 -.2 (bu)2.919 G .419(iltin has been e).2 F .419(xtended to tak)-.15 F 2.919(eu)-.1 G 2.919(pt)470.482 628.8 S 2.919(ot)481.181 628.8 S -.1(wo)491.88 628.8 S(ar)72 640.8 Q 1.425(guments: if tw)-.18 F 3.925(oa)-.1 G -.18(rg)153.485 640.8 S 1.424(uments are supplied, the second is substituted for the \214rst in the cu\ rrent directory).18 F 2.294 (name and the shell changes to the resultant directory name.)72 652.8 R 2.295 (The ksh)7.294 F F1(trap)4.795 E F0 -.2(bu)4.795 G 2.295(iltin accepts).2 F F1 (ERR)4.795 E F0(and)4.795 E F1(DEB)72 664.8 Q(UG)-.1 E F0 .15(as trap names.) 2.65 F(The)5.15 E F1(ERR)2.65 E F0 .15(trap is e)2.65 F -.15(xe)-.15 G .15 (cuted when a command f).15 F(ails;)-.1 E F1(DEB)2.65 E(UG)-.1 E F0 .15(is e) 2.65 F -.15(xe)-.15 G .15(cuted after e).15 F -.15(ve)-.25 G(ry).15 E (simple command.)72 676.8 Q .05(The bash distrib)97 692.4 R .05 (ution includes shell functions that implement)-.2 F F1(print)2.55 E F0(and) 2.55 E F1(whence)2.55 E F0 .05(and the e)2.55 F .05(xtensions to)-.15 F F1(cd) 72 704.4 Q F0(.)A EP %%Page: 11 11 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF 2.5(-1)277.17 48 S 2.5(1-)288 48 S/F1 10/Times-Bold@0 SF 2.5(4.4.5. Expansion)72 84 R F0 .282(The ksh \214lename generation \()97 99.6 R/F2 10/Times-Italic@0 SF(globbing)A F0 2.782(\)f)C .282(acilities ha) 262.45 99.6 R .581 -.15(ve b)-.2 H .281(een e).15 F .281(xtended be)-.15 F .281 (yond their bash and sh coun-)-.15 F 3.68(terparts. In)72 111.6 R 1.181 (this area, ksh can be thought of as)3.681 F F2 -.4(eg)3.681 G -.37(re).4 G(p) .37 E F0 1.181(to the bash)5.347 F F2(gr)3.681 E(ep)-.37 E F0 6.181(.K)1.666 G 1.181(sh globbing of)382.406 111.6 R 1.181(fers things lik)-.25 F(e)-.1 E 1.018 (alternation, the ability to match zero or more instances of a pattern, and th\ e ability to match e)72 123.6 R 1.018(xactly one)-.15 F(occurrence of an)72 135.6 Q 2.5(yo)-.15 G 2.5(fal)150.98 135.6 S(ist of patterns.)166.53 135.6 Q F1 2.5(4.4.6. Startup)72 159.6 R(Files)2.5 E F0 .977(Ksh and bash e)97 175.2 R -.15(xe)-.15 G .977(cute startup \214les dif).15 F(ferently)-.25 E 5.977(.K) -.65 G .977(sh e)297.879 175.2 R(xpands)-.15 E F1(ENV)3.478 E F0 .978 (and sources the \214le it names for)3.478 F -2.15 -.25(ev e)72 187.2 T 1.85 (ry shell.).25 F 1.85(Bash sources)6.85 F F1($ENV)4.35 E F0 1.85 (only in non-interacti)4.35 F 2.15 -.15(ve s)-.25 H 1.85(hells; interacti).15 F 2.15 -.15(ve s)-.25 H 1.85(hells source \214x).15 F 1.85(ed \214les, as)-.15 F -.15(ex)72 199.2 S 1.285(plained in the pre).15 F 1.285(vious section.)-.25 F 1.285(The POSIX standard has speci\214ed the ksh beha)6.285 F(vior)-.2 E 3.785 (,s)-.4 G 3.785(ob)441.545 199.2 S 1.285(ash acts the)455.33 199.2 R (same as ksh if started with the)72 211.2 Q F1(\255posix)2.5 E F0(or)2.5 E F1 (\255o posix)2.5 E F0(options.)2.5 E F1 2.5(4.4.7. History)72 235.2 R F0 (Finally)97 250.8 Q 3.372(,t)-.65 G .872(he ksh history implementation dif) 133.342 250.8 R .871(fers slightly from bash.)-.25 F .871 (Each instance of bash k)5.871 F .871(eeps the)-.1 F .633 (history list in memory and of)72 262.8 R .633(fers options to the)-.25 F F1 (history)3.133 E F0 -.2(bu)3.133 G .634 (iltin to write the list to or read it from a named).2 F 3.216(\214le. Ksh)72 274.8 R -.1(ke)3.216 G .716 (eps the history in a \214le, which it accesses each time a command is sa).1 F -.15(ve)-.2 G 3.215(dt).15 G 3.215(oo)426.445 274.8 S 3.215(rr)439.66 274.8 S (etrie)449.535 274.8 Q -.15(ve)-.25 G 3.215(df).15 G(rom)487.89 274.8 Q .338 (the history)72 286.8 R 5.338(.K)-.65 G .338 (sh history \214les may be shared among dif)129.246 286.8 R .338 (ferent concurrent instances of ksh, which could be a)-.25 F (bene\214t to the user)72 298.8 Q(.)-.55 E F1 2.5(5. F)72 322.8 R(eatur)-.25 E (es in Bash-2.0)-.18 E F0 .657(The ne)97 338.4 R .657 (xt release of bash, 2.0, will be a major o)-.15 F -.15(ve)-.15 G 3.157 (rhaul. It).15 F .656(will include man)3.157 F 3.156(yn)-.15 G 1.156 -.25(ew f) 419.532 338.4 T .656(eatures, for both).25 F .705(programming and interacti)72 350.4 R 1.005 -.15(ve u)-.25 H 3.205(se. Redundant).15 F -.15(ex)3.205 G .705 (isting functions will be remo).15 F -.15(ve)-.15 G 3.206(d. There).15 F .706 (are se)3.206 F -.15(ve)-.25 G .706(ral cases).15 F 1.34(where bash treats a v) 72 362.4 R 1.34(ariable specially to enable functionality a)-.25 F -.25(va)-.2 G 1.34(ilable another w).25 F 1.34(ay \()-.1 F F1($nolinks)A F0(vs.)3.84 E F1 1.34(set -o)3.84 F(ph)72 374.4 Q(ysical)-.15 E F0 2.5(,f)C(or e)115.19 374.4 Q (xample\); the special treatment of the v)-.15 E(ariable name will be remo)-.25 E -.15(ve)-.15 G(d.).15 E F1 2.5(5.1. Arrays)72 398.4 R F0 .546(Bash-2.0 will \ include arrays which are a superset of those in ksh, with the size limitations\ remo)97 414 R -.15(ve)-.15 G(d.).15 E(The)72 426 Q F1(declar)3.086 E(e)-.18 E F0(,)A F1 -.18(re)3.086 G(adonly).18 E F0 3.086(,a)C(nd)174.768 426 Q F1 (export)3.086 E F0 -.2(bu)3.086 G .586 (iltins will accept options to specify arrays, and the).2 F F1 -.18(re)3.085 G (ad).18 E F0 -.2(bu)3.085 G .585(iltin will).2 F(ha)72 438 Q .81 -.15(ve a)-.2 H 3.01(no).15 G .51(ption to read a list of w)110.99 438 R .51 (ords and assign them directly to an array)-.1 F 5.51(.T)-.65 G .51 (here will also be a ne)386.23 438 R 3.01(wa)-.25 G(rray)487.9 438 Q F2 .262 (compound assignment)72 450 R F0 .262(syntax a)2.762 F -.25(va)-.2 G .262 (ilable for assignment statements and the).25 F F1(declar)2.761 E(e)-.18 E F0 -.2(bu)2.761 G 2.761(iltin. This).2 F(ne)2.761 E 2.761(ws)-.25 G(yntax)481.78 450 Q .441(has the form)72 462 R F2(name)2.941 E F0(=\()A F2(value1)A F0(...) 2.941 E F2(valueN)2.941 E F0 .441(\), where each)B F2(value)2.942 E F0 .442 (has the form [)4.608 F F2(subscript)A F0(]=)A F2(string)A F0 5.442(.O)C .442 (nly the)449.776 462 R F2(string)2.942 E F0 1.395(is required.)72 474 R 1.395 (If the optional brack)6.395 F 1.395(ets and)-.1 F F2(subscript)3.894 E F0 1.394(are included, that inde)3.894 F 3.894(xi)-.15 G 3.894(sa)388.714 474 S 1.394(ssigned to, otherwise the)400.938 474 R(inde)72 486 Q 3.656(xo)-.15 G 3.656(ft)102.726 486 S 1.156(he element assigned is the last inde)112.492 486 R 3.657(xa)-.15 G 1.157(ssigned to by the statement plus one.)272.917 486 R(Inde) 6.157 E 1.157(xing starts at)-.15 F 2.73(zero. The)72 498 R .23 (same syntax is accepted by)2.73 F F1(declar)2.73 E(e)-.18 E F0 5.229(.I)C(ndi) 269.159 498 Q .229(vidual array elements may be assigned to using the ksh)-.25 F F2(name)72 510 Q F0([)A F2(subscript)A F0(]=)A F2(value)A F0(.)A F1 2.5 (5.2. Dynamic)72 534 R(Loading)2.5 E F0 .348(On systems that support the)97 549.6 R F2(dlopen)2.848 E F0 .349(\(3\) library function, bash-2.0 will allo)B 2.849(wn)-.25 G .849 -.25(ew b)407.504 549.6 T .349(uiltins to be loaded).05 F .049(into a running shell from a shared object \214le.)72 561.6 R .049(The ne) 5.049 F 2.549(wb)-.25 G .049(uiltins will ha)298.999 561.6 R .348 -.15(ve a)-.2 H .048(ccess to the rest of the shell f).15 F(acil-)-.1 E .649(ities, b)72 573.6 R .649(ut programmers will be subject to a fe)-.2 F 3.149(ws)-.25 G .649 (tructural rules.)269.591 573.6 R .65(This will be pro)5.65 F .65 (vided via a ne)-.15 F 3.15(wo)-.25 G .65(ption to)472.51 573.6 R F1(enable)72 585.6 Q F0(.)A F1 2.5(5.3. Builtins)72 609.6 R F0 .889(Some of the e)97 625.2 R .889(xisting b)-.15 F .889(uiltins will change in bash-2.0.)-.2 F .888(As pre) 5.888 F .888(viously noted,)-.25 F F1(declar)3.388 E(e)-.18 E F0(,)A F1(export) 3.388 E F0(,)A F1 -.18(re)3.388 G(ad-).18 E(only)72 637.2 Q F0 2.873(,a)C(nd) 100.153 637.2 Q F1 -.18(re)2.873 G(ad).18 E F0 .373(will accept ne)2.873 F 2.873(wo)-.25 G .374(ptions to specify arrays.)206.288 637.2 R(The)5.374 E F1 (jobs)2.874 E F0 -.2(bu)2.874 G .374(iltin will be able to list only stopped).2 F .323(or running jobs.)72 649.2 R(The)5.322 E F1(enable)2.822 E F0 .322 (command will tak)2.822 F 2.822(ean)-.1 G -.25(ew)282.84 649.2 S F13.072 E F0 .322(option to restrict its actions to the POSIX.2)2.822 F F2(spe-)2.822 E (cial)72 661.2 Q F0 -.2(bu)3.14 G(iltins.).2 E F1(Kill)5.64 E F0 .64 (will be able to list signal numbers corresponding to indi)3.14 F .64 (vidual signal names.)-.25 F .64(The read-)5.64 F .703(line library interf)72 673.2 R(ace,)-.1 E F1(bind)3.203 E F0 3.203(,w)C .703(ill ha)193.032 673.2 R 1.003 -.15(ve a)-.2 H 3.203(no).15 G .703(ption to remo)243.951 673.2 R 1.003 -.15(ve t)-.15 H .703(he binding for an).15 F 3.203(yk)-.15 G 1.002 -.15(ey s) 398.032 673.2 T .702(equence \(which is not).15 F (the same as binding it to self-insert\).)72 685.2 Q .494(There will be tw)97 700.8 R 2.994(on)-.1 G .994 -.25(ew b)177.196 700.8 T .495 (uiltin commands in bash-2.0.).05 F(The)5.495 E F1(diso)2.995 E(wn)-.1 E F0 .495(command will remo)2.995 F .795 -.15(ve j)-.15 H .495(obs from).15 F(bash') 72 712.8 Q 3.445(si)-.55 G .945(nternal jobs table when job control is acti) 103.225 712.8 R -.15(ve)-.25 G 5.945(.A).15 G(diso)303.25 712.8 Q .944 (wned job will not be listed by the jobs com-)-.25 F .666(mand, nor will its e) 72 724.8 R .666(xit status be reported.)-.15 F(Diso)5.667 E .667 (wned jobs will not be sent a)-.25 F F1(SIGHUP)3.167 E F0 .667 (when an interacti)3.167 F -.15(ve)-.25 G EP %%Page: 12 12 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF 2.5(-1)277.17 48 S 2.5(2-)288 48 S .688(shell e)72 84 R 3.187(xits. Most)-.15 F .687(of the shell')3.187 F 3.187(so)-.55 G .687 (ptional or)205.423 84 R/F1 10/Times-Italic@0 SF(to)3.187 E -.1(gg)-.1 G(led).1 E F0 .687(functionality will be folded into the ne)3.187 F(w)-.25 E/F2 10 /Times-Bold@0 SF(shopt)3.187 E F0 -.2(bu)3.187 G(iltin.).2 E(Man)72 96 Q 3.714 (yo)-.15 G 3.714(ft)103.894 96 S 1.214(he v)113.718 96 R 1.214 (ariables which alter the shell')-.25 F 3.714(sb)-.55 G(eha)266.282 96 Q 1.214 (vior when set \(re)-.2 F -.05(ga)-.15 G 1.214(rdless of their v).05 F 1.215 (alue\) will be made)-.25 F 6(options settable with)72 108 R F2(shopt)8.5 E F0 11(.E)C 6(xamples of such v)218.23 108 R 6(ariables include)-.25 F F2(allo)8.5 E(w_null_glob_expansion)-.1 E F0(,)A F2(glob_dot_\214lenames)72 120 Q F0 2.5 (,a)C(nd)163.67 120 Q F2(MAIL_W)2.5 E(ARNING)-1.2 E F0(.)A F2 2.5(5.4. V)72 144 R(ariables and V)-.92 E(ariable Expansion)-.92 E F0 .047 (Bash-2.0 will implement se)97 159.6 R -.15(ve)-.25 G .048(ral ne).15 F 2.548 (wv)-.25 G .048(ariable e)252.988 159.6 R 2.548(xpansions. These)-.15 F .048 (will answer se)2.548 F -.15(ve)-.25 G .048(ral of the most per).15 F(-)-.2 E .213(sistant requests for ne)72 171.6 R 2.713(wf)-.25 G 2.713(eatures. It) 172.582 171.6 R .213(will be possible to `)2.713 F .212(`indirectly reference') -.74 F 2.712('av)-.74 G .212(ariable with an e)398.534 171.6 R(xpansion,)-.15 E (lik)72 183.6 Q 3.01(eu)-.1 G(sing)94.91 183.6 Q/F3 10/Courier@0 SF .51 (eval \\$${name})3.01 F F0 .51(to reference a v)3.01 F .51(ariable named by) -.25 F F3(${name})3.01 E F0 5.51(.E)C .51(xpansions will be a)394.32 183.6 R -.25(va)-.2 G(ilable).25 E .462(to retrie)72 195.6 R .762 -.15(ve s)-.25 H .462 (ubstrings of v).15 F .461(ariables in an)-.25 F F1(awk)2.961 E F0(-lik)A 2.961 (em)-.1 G .461(anner: starting at a speci\214c inde)277.692 195.6 R .461 (x, retrie)-.15 F .461(ving some num-)-.25 F .941 (ber of characters or the rest of the string.)72 207.6 R .941 (It will be possible to retrie)5.941 F 1.241 -.15(ve s)-.25 H .941 (equences of array elements lik).15 F(e)-.1 E .354(this, too.)72 219.6 R .354 (It w)5.354 F .354(ould be nice to ha)-.1 F .654 -.15(ve a w)-.2 H .354 (ay to replace portions of a v).05 F .353 (ariable matching a pattern the same w)-.25 F(ay)-.1 E(leading or trailing sub\ strings are presently stripped; that capability may be a)72 231.6 Q -.25(va)-.2 G(ilable.).25 E .453(Another ne)97 247.2 R 2.953(we)-.25 G .453 (xpansion will pro)156.376 247.2 R .453(vide a w)-.15 F .454 (ay to create strings containing arbitrary characters, which is)-.1 F(incon)72 259.2 Q -.15(ve)-.4 G 1.636(nient in the current v).15 F 4.136(ersion. W)-.15 F 1.635(ords of the form $')-.8 F F1(string)A F0 4.135('w)C 1.635(ill e)355.145 259.2 R 1.635(xpand to)-.15 F F1(string)4.135 E F0 1.635(with backslash-)4.135 F 1.231(escaped characters in)72 271.2 R F1(string)3.731 E F0 1.231 (replaced as speci\214ed by the ANSI C standard.)3.731 F 1.232 (As with other single-quoted)6.232 F (shell strings, the only character that may not appear in)72 283.2 Q F1(string) 2.5 E F0(is a single quote.)2.5 E 1.436(The shell v)97 298.8 R 1.436 (ariables will change also.)-.25 F 3.936(An)6.436 G 1.936 -.25(ew va)272.052 298.8 T(riable).25 E F2(HISTIGNORE)3.936 E F0 1.435(will supersede)3.936 F F2 (HISTCON-)3.935 E(TR)72 310.8 Q(OL)-.3 E F0(.)A F2(HISTIGNORE)5.327 E F0 .327 (is the history analogy of)2.827 F F2(FIGNORE)2.828 E F0 2.828(:ac)C .328 (olon-separated list of patterns specifying)339.938 310.8 R 1.082 (commands to omit from the history list.)72 322.8 R 1.081 (The special pattern '&' will match the pre)6.081 F 1.081 (vious history line, to)-.25 F(pro)72 334.8 Q 1.568(vide the)-.15 F F2 (HISTCONTR)4.068 E(OL)-.3 E F1(ignor)4.068 E(edups)-.37 E F0(beha)5.734 E(vior) -.2 E 6.568(.M)-.55 G(an)303.546 334.8 Q 4.069(yv)-.15 G 1.569 (ariables which modify the shell')326.655 334.8 R 4.069(sb)-.55 G(eha)474.21 334.8 Q(vior)-.2 E .395(will lose their special meaning.)72 346.8 R -1.11(Va) 5.395 G .395(riables such as)1.11 F F2(notify)2.895 E F0(and)2.895 E F2(noclob) 2.895 E(ber)-.1 E F0 .395(which pro)2.895 F .395(vide functionality a)-.15 F -.25(va)-.2 G(il-).25 E .931 (able via other mechanisms will no longer be treated specially)72 358.8 R 5.931 (.O)-.65 G .931(ther v)340.06 358.8 R .932(ariables will be folded into)-.25 F F2(shopt)3.432 E F0(.)A(The)72 370.8 Q F2(history_contr)5.519 E(ol)-.18 E F0 (and)5.519 E F2(hostname_completion_\214le)5.519 E F0 -.25(va)5.519 G 3.019 (riables, superseded by).25 F F2(HISTCONTR)5.518 E(OL)-.3 E F0(and)5.518 E F2 (HOSTFILE)72 382.8 Q F0(respecti)2.5 E -.15(ve)-.25 G(ly).15 E 2.5(,w)-.65 G (ill be remo)185.12 382.8 Q -.15(ve)-.15 G(d.).15 E F2 2.5(5.5. Readline)72 406.8 R F0(Naturally)97 422.4 Q 2.94(,t)-.65 G .44(here will be impro)142.34 422.4 R -.15(ve)-.15 G .441(ments to readline as well.).15 F .441 (All of the POSIX.2)5.441 F F1(vi)2.941 E F0 .441(-mode editing com-)B .33 (mands will be implemented; missing commands lik)72 434.4 R 2.829(e`)-.1 G .329 (m' to sa)290.599 434.4 R .629 -.15(ve t)-.2 H .329 (he current cursor position \().15 F F1(mark)A F0 2.829(\)a)C .329(nd the) 478.951 434.4 R .36(`@' command for macro e)72 446.4 R .36(xpansion will be a) -.15 F -.25(va)-.2 G 2.861(ilable. The).25 F .361 (ability to set the mark and e)2.861 F .361(xchange the current)-.15 F .764 (cursor position \()72 458.4 R F1(point)A F0 3.264(\)a)C .764 (nd mark will be added to the readline emacs mode as well.)170.672 458.4 R .763 (Since there are com-)5.764 F .196 (mands to set the mark, commands to manipulate the re)72 470.4 R .197 (gion \(the characters between the point and the mark\))-.15 F .111(will be a) 72 482.4 R -.25(va)-.2 G 2.611(ilable. Commands).25 F(ha)2.611 E .411 -.15 (ve b)-.2 H .11 (een added to the readline emacs mode for more complete ksh compati-).15 F (bility)72 494.4 Q 2.5(,s)-.65 G(uch as the C-])101.36 494.4 Q F1(c)A F0 (character search command.)2.5 E F2 2.5(5.6. Con\214guration)72 518.4 R F0 .318 (Bash w)97 534 R .318 (as the \214rst GNU program to completely autocon\214gure.)-.1 F .319 (Its autocon\214guration mechanism pre-)5.319 F(dates)72 546 Q F1(autoconf)4.07 E F0 4.07(,t)C 1.569 (he current GNU con\214guration program, and needs updating.)140.97 546 R 1.569 (Bash-2.0 may include an)6.569 F .603 (autoconf-based con\214guration script, if necessary ne)72 558 R 3.103(wf)-.25 G .603(unctionality can be added to autoconf, or its limita-)294.476 558 R (tions bypassed.)72 570 Q F2 2.5(5.7. Miscellaneous)72 594 R F0 1.632 (The POSIX mode will be impro)97 609.6 R -.15(ve)-.15 G 4.131(di).15 G 4.131 (nb)254.26 609.6 S 1.631(ash-2.0; it will pro)268.391 609.6 R 1.631 (vide a more complete superset of the)-.15 F(POSIX standard.)72 621.6 Q -.15 (Fo)5 G 2.5(rt).15 G(he \214rst time, bash will recognize the e)163.79 621.6 Q (xistance of the POSIX.2)-.15 E F1(special)2.5 E F0 -.2(bu)2.5 G(iltins.).2 E 2.627(An)97 637.2 S .627 -.25(ew t)111.847 637.2 T .127(rap v).25 F(alue,)-.25 E F2(DEB)2.627 E(UG)-.1 E F0 2.627(,w)C .128(ill be present, as in ksh.)218.405 637.2 R .128(Commands speci\214ed with a)5.128 F F2(DEB)2.628 E(UG)-.1 E F0 .128(trap will)2.628 F 1.908(be e)72 649.2 R -.15(xe)-.15 G 1.908 (cuted after e).15 F -.15(ve)-.25 G 1.908(ry simple command.).15 F 1.908 (Since this mak)6.908 F 1.908(es shell script deb)-.1 F 1.908 (uggers possible, I hope to)-.2 F(include a bash deb)72 661.2 Q (ugger in the bash-2.0 release.)-.2 E F2 2.5(6. A)72 685.2 R -.1(va)-1 G (ilability).1 E F0 5.997(The current v)97 700.8 R 5.997(ersion of bash is a) -.15 F -.25(va)-.2 G 5.998(ilable for anon).25 F 5.998 (ymous FTP from prep.ai.mit.edu as)-.15 F F1(/pub/gnu/bash-1.14.2.tar)72 712.8 Q(.gz)-1.11 E F0(.)1.666 E EP %%Page: 13 13 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF 2.5(-1)277.17 48 S 2.5(3-)288 48 S/F1 10/Times-Bold@0 SF 2.5(7. Conclusion)72 84 R F0 .755(This paper has presented an o)97 99.6 R -.15(ve)-.15 G(rvie).15 E 3.255(wo)-.25 G 3.255(fb)259.27 99.6 S .755 (ash, compared its features with those of other shells, and)270.855 99.6 R (hinted at features in the ne)72 111.6 Q(xt release, bash-2.0.)-.15 E .483 (Bash is a solid replacement for sh.)97 127.2 R .483(It is suf)5.483 F .483 (\214ciently portable to run on nearly e)-.25 F -.15(ve)-.25 G .484(ry v).15 F .484(ersion of)-.15 F/F2 9/Times-Roman@0 SF(UNIX)2.984 E F0 .514 (from 4.3 BSD to SVR4.2, and se)72 139.2 R -.15(ve)-.25 G(ral).15 E F2(UNIX) 3.013 E F0 -.1(wo)3.013 G(rkalik).1 E .513(es, and rob)-.1 F .513 (ust enough to replace sh on most of those)-.2 F .771(systems, It is v)72 151.2 R .771(ery close to POSIX.2-conformant in POSIX mode, and is getting f)-.15 F (aster)-.1 E 5.771(.I)-.55 G 3.272(ti)436.684 151.2 S 3.272(sn)445.516 151.2 S .772(ot, unfortu-)457.678 151.2 R(nately)72 163.2 Q 2.663(,g)-.65 G .163 (etting smaller)105.953 163.2 R 2.663(,b)-.4 G .163(ut there are man)170.399 163.2 R 2.663(yo)-.15 G .163(ptional features.)248.101 163.2 R .163(It is v) 5.163 F .162(ery easy to b)-.15 F .162(uild a small subset to use as)-.2 F 2.5 (ad)72 175.2 S(irect replacement for /bin/sh.)83.94 175.2 Q .909 (Bash has thousands of users w)97 190.8 R .909(orldwide, all of whom ha)-.1 F 1.209 -.15(ve h)-.2 H .91(elped to mak).15 F 3.41(ei)-.1 G 3.41(tb)409.34 190.8 S(etter)420.53 190.8 Q 5.91(.A)-.55 G .91(nother testa-)453.38 190.8 R (ment to the bene\214ts of free softw)72 202.8 Q(are.)-.1 E F1 2.5(8. Refer)72 226.8 R(ences)-.18 E F0 .432([1] S. R. Bourne, `)72 242.4 R .432(`UNIX T)-.74 F .432(ime-Sharing System:)-.35 F .431(The UNIX Shell')5.431 F(',)-.74 E/F3 10 /Times-Italic@0 SF .431(Bell System T)2.931 F(ec)-.92 E .431(hnical J)-.15 F (ournal)-.25 E F0 2.931(,5)C(7\(6\),)484.84 242.4 Q (July-August, 1978, pp. 1971-1990.)72 254.4 Q .736([2] Morris Bolsk)72 270 R 3.237(ya)-.15 G .737(nd Da)153.22 270 R .737(vid K)-.2 F(orn,)-.35 E F3 .737 (The K)3.237 F .737(ornShell Command and Pr)-.4 F -.1(og)-.45 G -.15(ra).1 G .737(mming Langua).15 F -.1(ge)-.1 G F0 3.237(,P).1 G .737(rentice Hall,) 453.833 270 R(1989.)72 282 Q .142([3] Bill Jo)72 297.6 R 1.442 -.65(y, A)-.1 H 2.642(nI).65 G .141(ntroduction to the C Shell,)140.428 297.6 R F3 .141 (UNIX User')2.641 F 2.641(sS)-.4 G .141(upplementary Documents)309.346 297.6 R F0 2.641(,U)C(ni)424.328 297.6 Q -.15(ve)-.25 G .141(rsity of Califor).15 F(-) -.2 E(nia at Berk)72 309.6 Q(ele)-.1 E 1.3 -.65(y, 1)-.15 H(986.).65 E .283 ([4] IEEE,)72 325.2 R F3 .283(IEEE Standar)2.783 F 2.783(df)-.37 G .283 (or Information T)179.692 325.2 R(ec)-.92 E(hnolo)-.15 E .283(gy -- P)-.1 F .283(ortable Oper)-.8 F .283(ating System Interface \(POSIX\) P)-.15 F(art)-.8 E(2: Shell and Utilities)72 337.2 Q F0 2.5(,1)C(992.)165.06 337.2 Q F1 2.5 (9. A)72 361.2 R(uthor Inf)-.5 E(ormation)-.25 E F0 .937(Chet Rame)97 376.8 R 3.437(yi)-.15 G 3.437(sas)153.724 376.8 S(oftw)172.818 376.8 Q .936 (are engineer w)-.1 F .936(orking at Case W)-.1 F .936(estern Reserv)-.8 F 3.436(eU)-.15 G(ni)393.43 376.8 Q -.15(ve)-.25 G(rsity).15 E 5.936(.H)-.65 G 3.436(eh)443.036 376.8 S .936(as a B.S. in)455.912 376.8 R .072 (Computer Engineering and an M.S. in Computer Science, both from CWR)72 388.8 R 2.573(U. He)-.4 F .073(has been w)2.573 F .073(orking on bash)-.1 F (for six years, and the primary maintainer for one.)72 400.8 Q EP %%Trailer end %%EOF doc/bash.ps100664 436 0 1460645 7374257266 11445 0ustar chetwheel%!PS-Adobe-3.0 %%Creator: groff version 1.16.1 %%CreationDate: Tue Nov 13 12:56:05 2001 %%DocumentNeededResources: font Times-Roman %%+ font Times-Bold %%+ font Times-Italic %%+ font Courier %%+ font Symbol %%DocumentSuppliedResources: procset grops 1.16 1 %%Pages: 58 %%PageOrder: Ascend %%Orientation: Portrait %%EndComments %%BeginProlog %%BeginResource: procset grops 1.16 1 /setpacking where{ pop currentpacking true setpacking }if /grops 120 dict dup begin /SC 32 def /A/show load def /B{0 SC 3 -1 roll widthshow}bind def /C{0 exch ashow}bind def /D{0 exch 0 SC 5 2 roll awidthshow}bind def /E{0 rmoveto show}bind def /F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def /G{0 rmoveto 0 exch ashow}bind def /H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def /I{0 exch rmoveto show}bind def /J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def /K{0 exch rmoveto 0 exch ashow}bind def /L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def /M{rmoveto show}bind def /N{rmoveto 0 SC 3 -1 roll widthshow}bind def /O{rmoveto 0 exch ashow}bind def /P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def /Q{moveto show}bind def /R{moveto 0 SC 3 -1 roll widthshow}bind def /S{moveto 0 exch ashow}bind def /T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def /SF{ findfont exch [exch dup 0 exch 0 exch neg 0 0]makefont dup setfont [exch/setfont cvx]cvx bind def }bind def /MF{ findfont [5 2 roll 0 3 1 roll neg 0 0]makefont dup setfont [exch/setfont cvx]cvx bind def }bind def /level0 0 def /RES 0 def /PL 0 def /LS 0 def /MANUAL{ statusdict begin/manualfeed true store end }bind def /PLG{ gsave newpath clippath pathbbox grestore exch pop add exch pop }bind def /BP{ /level0 save def 1 setlinecap 1 setlinejoin 72 RES div dup scale LS{ 90 rotate }{ 0 PL translate }ifelse 1 -1 scale }bind def /EP{ level0 restore showpage }bind def /DA{ newpath arcn stroke }bind def /SN{ transform .25 sub exch .25 sub exch round .25 add exch round .25 add exch itransform }bind def /DL{ SN moveto SN lineto stroke }bind def /DC{ newpath 0 360 arc closepath }bind def /TM matrix def /DE{ TM currentmatrix pop translate scale newpath 0 0 .5 0 360 arc closepath TM setmatrix }bind def /RC/rcurveto load def /RL/rlineto load def /ST/stroke load def /MT/moveto load def /CL/closepath load def /FL{ currentgray exch setgray fill setgray }bind def /BL/fill load def /LW/setlinewidth load def /RE{ findfont dup maxlength 1 index/FontName known not{1 add}if dict begin { 1 index/FID ne{def}{pop pop}ifelse }forall /Encoding exch def dup/FontName exch def currentdict end definefont pop }bind def /DEFS 0 def /EBEGIN{ moveto DEFS begin }bind def /EEND/end load def /CNT 0 def /level1 0 def /PBEGIN{ /level1 save def translate div 3 1 roll div exch scale neg exch neg exch translate 0 setgray 0 setlinecap 1 setlinewidth 0 setlinejoin 10 setmiterlimit []0 setdash /setstrokeadjust where{ pop false setstrokeadjust }if /setoverprint where{ pop false setoverprint }if newpath /CNT countdictstack def userdict begin /showpage{}def }bind def /PEND{ clear countdictstack CNT sub{end}repeat level1 restore }bind def end def /setpacking where{ pop setpacking }if %%EndResource %%IncludeResource: font Times-Roman %%IncludeResource: font Times-Bold %%IncludeResource: font Times-Italic %%IncludeResource: font Courier %%IncludeResource: font Symbol grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72 def/PL 792 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron/Zcaron /scaron/zcaron/Ydieresis/trademark/quotesingle/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/space/exclam/quotedbl/numbersign/dollar/percent /ampersand/quoteright/parenleft/parenright/asterisk/plus/comma/hyphen /period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon /semicolon/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O /P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright/circumflex /underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y /z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase/guillemotleft /guillemotright/bullet/florin/fraction/perthousand/dagger/daggerdbl /endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut /dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash /quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen /brokenbar/section/dieresis/copyright/ordfeminine/guilsinglleft /logicalnot/minus/registered/macron/degree/plusminus/twosuperior /threesuperior/acute/mu/paragraph/periodcentered/cedilla/onesuperior /ordmasculine/guilsinglright/onequarter/onehalf/threequarters /questiondown/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE /Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex /Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis /multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn /germandbls/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla /egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis /eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide/oslash /ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis]def /Courier@0 ENC0/Courier RE/Times-Italic@0 ENC0/Times-Italic RE /Times-Bold@0 ENC0/Times-Bold RE/Times-Roman@0 ENC0/Times-Roman RE %%EndProlog %%Page: 1 1 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\)) -.35 E/F1 10.95/Times-Bold@0 SF -.219(NA)72 84 S(ME).219 E F0 (bash \255 GNU Bourne-Ag)108 96 Q(ain SHell)-.05 E F1(SYNOPSIS)72 112.8 Q/F2 10/Times-Bold@0 SF(bash)108 124.8 Q F0([options] [\214le])2.5 E F1 (COPYRIGHT)72 141.6 Q F0(Bash is Cop)108 153.6 Q (yright \251 1989-2001 by the Free Softw)-.1 E(are F)-.1 E (oundation, Inc.)-.15 E F1(DESCRIPTION)72 170.4 Q F2(Bash)108 182.4 Q F0 .973(is an)3.474 F F2(sh)3.473 E F0 .973 (-compatible command language interpreter that e)B -.15(xe)-.15 G .973 (cutes commands read from the standard).15 F(input or from a \214le.)108 194.4 Q F2(Bash)5 E F0(also incorporates useful features from the)2.5 E /F3 10/Times-Italic@0 SF -.4(Ko)2.5 G(rn).4 E F0(and)2.5 E F3(C)2.5 E F0 (shells \()2.5 E F2(ksh)A F0(and)2.5 E F2(csh)2.5 E F0(\).)A F2(Bash)108 211.2 Q F0 1.54(is intended to be a conformant implementation of the IE\ EE POSIX Shell and T)4.04 F 1.54(ools speci\214cation)-.8 F(\(IEEE W)108 223.2 Q(orking Group 1003.2\).)-.8 E F1(OPTIONS)72 240 Q F0 .52(In addi\ tion to the single-character shell options documented in the descriptio\ n of the)108 252 R F2(set)3.02 E F0 -.2(bu)3.02 G .52(iltin command,).2 F F2(bash)108 264 Q F0(interprets the follo)2.5 E (wing options when it is in)-.25 E -.2(vo)-.4 G -.1(ke).2 G(d:).1 E F2 108 280.8 Q F3(string)4.166 E F0 .796(If the)12.354 F F2 3.296 E F0 .796(option is present, then commands are read from)3.296 F F3(string)3.296 E F0 5.796(.I).22 G 3.297(ft)-5.796 G .797(here are ar) -3.297 F .797(guments after)-.18 F(the)158 292.8 Q F3(string)2.5 E F0 2.5(,t).22 G(he)-2.5 E 2.5(ya)-.15 G (re assigned to the positional parameters, starting with)-2.5 E F2($0) 2.5 E F0(.)A F2108 304.8 Q F0(If the)39.86 E F22.5 E F0 (option is present, the shell becomes)2.5 E F3 -.37(re)2.5 G(stricted) .37 E F0(\(see)2.5 E/F4 9/Times-Bold@0 SF(RESTRICTED SHELL)2.5 E F0 (belo)2.25 E(w\).)-.25 E F2108 316.8 Q F0(If the)41.52 E F2 2.5 E F0(option is present, the shell is)2.5 E F3(inter)2.5 E(active) -.15 E F0(.).18 E F2108 328.8 Q F0 .602(If the)40.41 F F2 3.102 E F0 .602(option is present, or if no ar)3.102 F .602 (guments remain after option processing, then commands)-.18 F .616 (are read from the standard input.)158 340.8 R .617(This option allo) 5.617 F .617(ws the positional parameters to be set when)-.25 F(in)158 352.8 Q -.2(vo)-.4 G(king an interacti).2 E .3 -.15(ve s)-.25 H(hell.) .15 E F2108 364.8 Q F0 3.358(Al)37.08 G .858 (ist of all double-quoted strings preceded by)-3.358 F F2($)3.358 E F0 .857(is printed on the standard ouput.)3.357 F .857(These are)5.857 F .458(the strings that are subject to language translation when the curr\ ent locale is not)158 376.8 R F2(C)2.958 E F0(or)2.959 E F2(POSIX)2.959 E F0(.)A(This implies the)158 388.8 Q F22.5 E F0 (option; no commands will be e)2.5 E -.15(xe)-.15 G(cuted.).15 E F2 ([\255+]O [)108 400.8 Q F3(shopt_option)A F2(])A F3(shopt_option)158 412.8 Q F0 1.097(is one of the shell options accepted by the)3.597 F F2 (shopt)3.597 E F0 -.2(bu)3.597 G 1.097(iltin \(see).2 F F4 1.096 (SHELL B)3.596 F(UIL)-.09 E(TIN)-.828 E(COMMANDS)158 424.8 Q F0(belo) 3.002 E 3.252(w\). If)-.25 F F3(shopt_option)3.253 E F0 .753 (is present,)3.253 F F23.253 E F0 .753(sets the v)3.253 F .753 (alue of that option;)-.25 F F2(+O)3.253 E F0(unsets)3.253 E 2.625 (it. If)158 436.8 R F3(shopt_option)2.625 E F0 .125 (is not supplied, the names and v)2.625 F .124 (alues of the shell options accepted by)-.25 F F2(shopt)2.624 E F0 .505 (are printed on the standard output.)158 448.8 R .505(If the in)5.505 F -.2(vo)-.4 G .505(cation option is).2 F F2(+O)3.005 E F0 3.005(,t)C .506 (he output is displayed in a)-3.005 F (format that may be reused as input.)158 460.8 Q F2108 472.8 Q F0 (A)38.6 E F23.364 E F0 .864 (signals the end of options and disables further option processing.) 3.364 F(An)5.863 E 3.363(ya)-.15 G -.18(rg)-3.363 G .863(uments after) .18 F(the)158 484.8 Q F22.5 E F0 (are treated as \214lenames and ar)2.5 E 2.5(guments. An)-.18 F(ar)2.5 E (gument of)-.18 E F22.5 E F0(is equi)2.5 E -.25(va)-.25 G(lent to) .25 E F22.5 E F0(.)A F2(Bash)108 501.6 Q F0 .303 (also interprets a number of multi-character options.)2.803 F .304 (These options must appear on the command line)5.303 F(before the singl\ e-character options in order for them to be recognized.)108 513.6 Q F2 (\255\255dump\255po\255strings)108 530.4 Q F0(Equi)144 542.4 Q -.25(va) -.25 G(lent to).25 E F22.5 E F0 2.5(,b)C (ut the output is in the GNU)-2.7 E F3 -.1(ge)2.5 G(tte).1 E(xt)-.2 E F2 (po)2.5 E F0(\(portable object\) \214le format.)2.5 E F2 (\255\255dump\255strings)108 554.4 Q F0(Equi)144 566.4 Q -.25(va)-.25 G (lent to).25 E F22.5 E F0(.)A F2(\255\255help)108 578.4 Q F0 (Display a usage message on standard output and e)6.26 E (xit successfully)-.15 E(.)-.65 E F2108 590.4 Q F3 (\214le)2.5 E F2108 602.4 Q(c\214le)-.18 E F3(\214le)2.5 E F0 (Ex)144 614.4 Q .093(ecute commands from)-.15 F F3(\214le)2.592 E F0 .092(instead of the standard personal initialization \214le)2.592 F F3 (~/.bashr)2.592 E(c)-.37 E F0 .092(if the shell)2.592 F(is interacti)144 626.4 Q .3 -.15(ve \()-.25 H(see).15 E F4(INV)2.5 E(OCA)-.405 E(TION) -.855 E F0(belo)2.25 E(w\).)-.25 E F2(\255\255login)108 643.2 Q F0(Mak) 144 655.2 Q(e)-.1 E F2(bash)2.5 E F0(act as if it had been in)2.5 E -.2 (vo)-.4 G -.1(ke).2 G 2.5(da).1 G 2.5(sal)-2.5 G(ogin shell \(see)-2.5 E F4(INV)2.5 E(OCA)-.405 E(TION)-.855 E F0(belo)2.25 E(w\).)-.25 E F2 (\255\255noediting)108 672 Q F0(Do not use the GNU)144 684 Q F2 -.18(re) 2.5 G(adline).18 E F0 (library to read command lines when the shell is interacti)2.5 E -.15 (ve)-.25 G(.).15 E F2(\255\255nopr)108 700.8 Q(o\214le)-.18 E F0 .017 (Do not read either the system-wide startup \214le)144 712.8 R F3 (/etc/pr)4.183 E(o\214le)-.45 E F0 .017(or an)4.183 F 2.517(yo)-.15 G 2.517(ft)-2.517 G .018(he personal initialization \214les)-2.517 F F3 (~/.bash_pr)144 724.8 Q(o\214le)-.45 E F0(,).18 E F3(~/.bash_lo)2.698 E (gin)-.1 E F0 2.698(,o).24 G(r)-2.698 E F3(~/.pr)2.698 E(o\214le)-.45 E F0 5.198(.B).18 G 2.698(yd)-5.198 G(ef)-2.698 E(ault,)-.1 E F2(bash) 2.698 E F0 .198(reads these \214les when it is in)2.698 F -.2(vo)-.4 G -.1(ke).2 G 2.697(da).1 G(s)-2.697 E(GNU Bash-2.05a)72 768 Q(2001 No) 126.115 E -.15(ve)-.15 G(mber 13).15 E(1)190.545 E EP %%Page: 2 2 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\)) -.35 E 2.5(al)144 84 S(ogin shell \(see)-2.5 E/F1 9/Times-Bold@0 SF(INV) 2.5 E(OCA)-.405 E(TION)-.855 E F0(belo)2.25 E(w\).)-.25 E/F2 10 /Times-Bold@0 SF108 100.8 Q(c)-.18 E F0 1.215 (Do not read and e)5.34 F -.15(xe)-.15 G 1.215 (cute the personal initialization \214le).15 F/F3 10/Times-Italic@0 SF (~/.bashr)3.715 E(c)-.37 E F0 1.216(if the shell is interacti)3.715 F -.15(ve)-.25 G 6.216(.T).15 G(his)-6.216 E(option is on by def)144 112.8 Q(ault if the shell is in)-.1 E -.2(vo)-.4 G -.1(ke).2 G 2.5(da).1 G(s) -2.5 E F2(sh)2.5 E F0(.)A F2(\255\255posix)108 129.6 Q F0 .374 (Change the beha)144 141.6 R .374(vior of)-.2 F F2(bash)2.874 E F0 .374 (where the def)2.874 F .374(ault operation dif)-.1 F .373 (fers from the POSIX 1003.2 standard)-.25 F(to match the standard \()144 153.6 Q F3(posix mode)A F0(\).)A F2108 170.4 Q(estricted)-.18 E F0(The shell becomes restricted \(see)144 182.4 Q F1(RESTRICTED SHELL) 2.5 E F0(belo)2.25 E(w\).)-.25 E F2108 199.2 Q(erbose)-.1 E F0 (Equi)144 211.2 Q -.25(va)-.25 G(lent to).25 E F25 E F0(.)A F2 108 228 Q(ersion)-.1 E F0(Sho)144 240 Q 2.5(wv)-.25 G (ersion information for this instance of)-2.65 E F2(bash)2.5 E F0 (on the standard output and e)2.5 E(xit successfully)-.15 E(.)-.65 E/F4 10.95/Times-Bold@0 SF(ARGUMENTS)72 256.8 Q F0 .016(If ar)108 268.8 R .016(guments remain after option processing, and neither the)-.18 F F2 2.516 E F0 .016(nor the)2.516 F F22.516 E F0 .016 (option has been supplied, the \214rst)2.516 F(ar)108 280.8 Q .041(gume\ nt is assumed to be the name of a \214le containing shell commands.)-.18 F(If)5.041 E F2(bash)2.541 E F0 .041(is in)2.541 F -.2(vo)-.4 G -.1(ke) .2 G 2.541(di).1 G 2.541(nt)-2.541 G .041(his f)-2.541 F(ashion,)-.1 E F2($0)108 292.8 Q F0 .936(is set to the name of the \214le, and the pos\ itional parameters are set to the remaining ar)3.435 F(guments.)-.18 E F2(Bash)5.936 E F0 .234(reads and e)108 304.8 R -.15(xe)-.15 G .234 (cutes commands from this \214le, then e).15 F(xits.)-.15 E F2(Bash) 5.234 E F0 1.334 -.55('s e)D .234(xit status is the e).4 F .233 (xit status of the last com-)-.15 F .348(mand e)108 316.8 R -.15(xe)-.15 G .348(cuted in the script.).15 F .348(If no commands are e)5.348 F -.15 (xe)-.15 G .348(cuted, the e).15 F .349(xit status is 0.)-.15 F .349 (An attempt is \214rst made to)5.349 F .254 (open the \214le in the current directory)108 328.8 R 2.754(,a)-.65 G .253 (nd, if no \214le is found, then the shell searches the directories in) -2.754 F F1 -.666(PA)2.753 G(TH)-.189 E F0(for the script.)108 340.8 Q F4(INV)72 357.6 Q(OCA)-.493 E(TION)-1.04 E F0(A)108 369.6 Q F3(lo)2.5 E (gin shell)-.1 E F0(is one whose \214rst character of ar)2.5 E (gument zero is a)-.18 E F22.5 E F0 2.5(,o)C 2.5(ro)-2.5 G (ne started with the)-2.5 E F2(\255\255login)2.5 E F0(option.)2.5 E(An) 108 386.4 Q F3(inter)2.814 E(active)-.15 E F0 .314 (shell is one started without non-option ar)2.814 F .315 (guments and without the)-.18 F F22.815 E F0 .315 (option whose standard)2.815 F 1.14 (input and output are both connected to terminals \(as determined by)108 398.4 R F3(isatty)3.639 E F0 1.139(\(3\)\), or one started with the).32 F F23.639 E F0(option.)108 410.4 Q F1(PS1)5.289 E F0 .289 (is set and)2.539 F F2<24ad>2.789 E F0(includes)2.789 E F2(i)2.789 E F0 (if)2.789 E F2(bash)2.789 E F0 .289(is interacti)2.789 F -.15(ve)-.25 G 2.789(,a).15 G(llo)-2.789 E .29 (wing a shell script or a startup \214le to test this)-.25 F(state.)108 422.4 Q .033(The follo)108 439.2 R .033(wing paragraphs describe ho)-.25 F(w)-.25 E F2(bash)2.532 E F0 -.15(exe)2.532 G .032 (cutes its startup \214les.).15 F .032(If an)5.032 F 2.532(yo)-.15 G 2.532(ft)-2.532 G .032(he \214les e)-2.532 F .032(xist b)-.15 F .032 (ut cannot be)-.2 F(read,)108 451.2 Q F2(bash)3.085 E F0 .585 (reports an error)3.085 F 5.585(.T)-.55 G .585(ildes are e)-5.935 F .586 (xpanded in \214le names as described belo)-.15 F 3.086(wu)-.25 G(nder) -3.086 E F2 -.18(Ti)3.086 G .586(lde Expansion).18 F F0(in the)108 463.2 Q F1(EXP)2.5 E(ANSION)-.666 E F0(section.)2.25 E(When)108 480 Q F2(bash) 2.896 E F0 .396(is in)2.896 F -.2(vo)-.4 G -.1(ke).2 G 2.896(da).1 G 2.896(sa)-2.896 G 2.896(ni)-2.896 G(nteracti)-2.896 E .696 -.15(ve l) -.25 H .396(ogin shell, or as a non-interacti).15 F .695 -.15(ve s)-.25 H .395(hell with the).15 F F2(\255\255login)2.895 E F0 .395(option, it) 2.895 F 1.333(\214rst reads and e)108 492 R -.15(xe)-.15 G 1.333 (cutes commands from the \214le).15 F F3(/etc/pr)3.833 E(o\214le)-.45 E F0 3.834(,i)C 3.834(ft)-3.834 G 1.334(hat \214le e)-3.834 F 3.834 (xists. After)-.15 F 1.334(reading that \214le, it)3.834 F .249 (looks for)108 504 R F3(~/.bash_pr)2.749 E(o\214le)-.45 E F0(,)A F3 (~/.bash_lo)2.749 E(gin)-.1 E F0 2.749(,a)C(nd)-2.749 E F3(~/.pr)2.749 E (o\214le)-.45 E F0 2.749(,i)C 2.749(nt)-2.749 G .249(hat order)-2.749 F 2.748(,a)-.4 G .248(nd reads and e)-2.748 F -.15(xe)-.15 G .248 (cutes commands from).15 F .796(the \214rst one that e)108 516 R .796 (xists and is readable.)-.15 F(The)5.796 E F2(\255\255nopr)3.296 E (o\214le)-.18 E F0 .797(option may be used when the shell is started to) 3.296 F(inhibit this beha)108 528 Q(vior)-.2 E(.)-.55 E (When a login shell e)108 544.8 Q(xits,)-.15 E F2(bash)2.5 E F0 (reads and e)2.5 E -.15(xe)-.15 G(cutes commands from the \214le).15 E F3(~/.bash_lo)2.5 E(gout)-.1 E F0 2.5(,i)C 2.5(fi)-2.5 G 2.5(te)-2.5 G (xists.)-2.65 E 1.698(When an interacti)108 561.6 R 1.998 -.15(ve s)-.25 H 1.698(hell that is not a login shell is started,).15 F F2(bash)4.197 E F0 1.697(reads and e)4.197 F -.15(xe)-.15 G 1.697(cutes commands from) .15 F F3(~/.bashr)108 573.6 Q(c)-.37 E F0 2.535(,i)C 2.535(ft)-2.535 G .035(hat \214le e)-2.535 F 2.535(xists. This)-.15 F .036 (may be inhibited by using the)2.535 F F22.536 E(c)-.18 E F0 2.536(option. The)2.536 F F22.536 E(c\214le)-.18 E F3(\214le) 2.536 E F0 .036(option will)2.536 F(force)108 585.6 Q F2(bash)2.5 E F0 (to read and e)2.5 E -.15(xe)-.15 G(cute commands from).15 E F3(\214le) 2.5 E F0(instead of)2.5 E F3(~/.bashr)2.5 E(c)-.37 E F0(.)A(When)108 602.4 Q F2(bash)5.306 E F0 2.806(is started non-interacti)5.306 F -.15 (ve)-.25 G(ly).15 E 5.306(,t)-.65 G 5.306(or)-5.306 G 2.806 (un a shell script, for e)-5.306 F 2.805(xample, it looks for the v)-.15 F(ariable)-.25 E F1 -.27(BA)108 614.4 S(SH_ENV).27 E F0 1.01(in the en) 3.26 F 1.01(vironment, e)-.4 F 1.01(xpands its v)-.15 F 1.01 (alue if it appears there, and uses the e)-.25 F 1.011(xpanded v)-.15 F 1.011(alue as the)-.25 F(name of a \214le to read and e)108 626.4 Q -.15 (xe)-.15 G(cute.).15 E F2(Bash)5 E F0(beha)2.5 E -.15(ve)-.2 G 2.5(sa) .15 G 2.5(si)-2.5 G 2.5(ft)-2.5 G(he follo)-2.5 E(wing command were e) -.25 E -.15(xe)-.15 G(cuted:).15 E/F5 10/Courier@0 SF (if [ \255n "$BASH_ENV" ]; then . "$BASH_ENV"; fi)144 644.4 Q F0 -.2(bu) 108 662.4 S 2.5(tt).2 G(he v)-2.5 E(alue of the)-.25 E F1 -.666(PA)2.5 G (TH)-.189 E F0 -.25(va)2.25 G (riable is not used to search for the \214le name.).25 E(If)108 679.2 Q F2(bash)3.417 E F0 .917(is in)3.417 F -.2(vo)-.4 G -.1(ke).2 G 3.417(dw) .1 G .917(ith the name)-3.417 F F2(sh)3.417 E F0 3.417(,i)C 3.417(tt) -3.417 G .917(ries to mimic the startup beha)-3.417 F .917 (vior of historical v)-.2 F .917(ersions of)-.15 F F2(sh)3.417 E F0(as) 3.417 E .145 (closely as possible, while conforming to the POSIX standard as well.) 108 691.2 R .145(When in)5.145 F -.2(vo)-.4 G -.1(ke).2 G 2.645(da).1 G 2.645(sa)-2.645 G 2.645(ni)-2.645 G(nteracti)-2.645 E .445 -.15(ve l) -.25 H(ogin).15 E 1.264(shell, or a non-interacti)108 703.2 R 1.564 -.15 (ve s)-.25 H 1.264(hell with the).15 F F2(\255\255login)3.764 E F0 1.264 (option, it \214rst attempts to read and e)3.764 F -.15(xe)-.15 G 1.263 (cute commands).15 F(from)108 715.2 Q F3(/etc/pr)3.075 E(o\214le)-.45 E F0(and)3.075 E F3(~/.pr)3.075 E(o\214le)-.45 E F0 3.075(,i).18 G 3.075 (nt)-3.075 G .575(hat order)-3.075 F 5.576(.T)-.55 G(he)-5.576 E F2 (\255\255nopr)3.076 E(o\214le)-.18 E F0 .576 (option may be used to inhibit this beha)3.076 F(vior)-.2 E(.)-.55 E .418(When in)108 727.2 R -.2(vo)-.4 G -.1(ke).2 G 2.918(da).1 G 2.918 (sa)-2.918 G 2.918(ni)-2.918 G(nteracti)-2.918 E .718 -.15(ve s)-.25 H .418(hell with the name).15 F F2(sh)2.918 E F0(,)A F2(bash)2.918 E F0 .418(looks for the v)2.918 F(ariable)-.25 E F1(ENV)2.918 E/F6 9 /Times-Roman@0 SF(,)A F0 -.15(ex)2.667 G .417(pands its v).15 F(alue) -.25 E(GNU Bash-2.05a)72 768 Q(2001 No)126.115 E -.15(ve)-.15 G(mber 13) .15 E(2)190.545 E EP %%Page: 3 3 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\)) -.35 E .171(if it is de\214ned, and uses the e)108 84 R .171(xpanded v) -.15 F .171(alue as the name of a \214le to read and e)-.25 F -.15(xe) -.15 G 2.671(cute. Since).15 F 2.671(as)2.671 G .171(hell in)-2.671 F -.2(vo)-.4 G -.1(ke).2 G(d).1 E(as)108 96 Q/F1 10/Times-Bold@0 SF(sh) 3.081 E F0 .581(does not attempt to read and e)3.081 F -.15(xe)-.15 G .581(cute commands from an).15 F 3.08(yo)-.15 G .58 (ther startup \214les, the)-3.08 F F13.08 E(c\214le)-.18 E F0 .58(option has)3.08 F .182(no ef)108 108 R 2.682(fect. A)-.25 F (non-interacti)2.682 E .482 -.15(ve s)-.25 H .182(hell in).15 F -.2(vo) -.4 G -.1(ke).2 G 2.682(dw).1 G .182(ith the name)-2.682 F F1(sh)2.682 E F0 .182(does not attempt to read an)2.682 F 2.683(yo)-.15 G .183 (ther startup \214les.)-2.683 F(When in)108 120 Q -.2(vo)-.4 G -.1(ke).2 G 2.5(da).1 G(s)-2.5 E F1(sh)2.5 E F0(,)A F1(bash)2.5 E F0(enters)2.5 E /F2 10/Times-Italic@0 SF(posix)2.5 E F0 (mode after the startup \214les are read.)2.5 E(When)108 136.8 Q F1 (bash)2.825 E F0 .325(is started in)2.825 F F2(posix)2.825 E F0 .325 (mode, as with the)2.825 F F1(\255\255posix)2.825 E F0 .325 (command line option, it follo)2.825 F .325(ws the POSIX stan-)-.25 F .341(dard for startup \214les.)108 148.8 R .341(In this mode, interacti) 5.341 F .641 -.15(ve s)-.25 H .341(hells e).15 F .341(xpand the)-.15 F /F3 9/Times-Bold@0 SF(ENV)2.841 E F0 -.25(va)2.591 G .342 (riable and commands are read and).25 F -.15(exe)108 160.8 S (cuted from the \214le whose name is the e).15 E(xpanded v)-.15 E 2.5 (alue. No)-.25 F(other startup \214les are read.)2.5 E F1(Bash)108 177.6 Q F0 .577(attempts to determine when it is being run by the remote shel\ l daemon, usually)3.077 F F2 -.1(rs)3.076 G(hd).1 E F0 5.576(.I)C(f) -5.576 E F1(bash)3.076 E F0(deter)3.076 E(-)-.2 E .301 (mines it is being run by)108 189.6 R F2 -.1(rs)2.801 G(hd).1 E F0 2.801 (,i)C 2.801(tr)-2.801 G .301(eads and e)-2.801 F -.15(xe)-.15 G .301 (cutes commands from).15 F F2(~/.bashr)2.801 E(c)-.37 E F0 2.801(,i)C 2.801(ft)-2.801 G .301(hat \214le e)-2.801 F .301(xists and is read-) -.15 F 2.97(able. It)108 201.6 R .47(will not do this if in)2.97 F -.2 (vo)-.4 G -.1(ke).2 G 2.97(da).1 G(s)-2.97 E F1(sh)2.97 E F0 5.47(.T)C (he)-5.47 E F12.97 E(c)-.18 E F0 .47 (option may be used to inhibit this beha)2.97 F(vior)-.2 E 2.97(,a)-.4 G .47(nd the)-2.97 F F1108 213.6 Q(c\214le)-.18 E F0 .886 (option may be used to force another \214le to be read, b)3.386 F(ut)-.2 E F2 -.1(rs)3.386 G(hd).1 E F0 .887(does not generally in)3.387 F -.2 (vo)-.4 G 1.087 -.1(ke t).2 H .887(he shell).1 F (with those options or allo)108 225.6 Q 2.5(wt)-.25 G (hem to be speci\214ed.)-2.5 E 1.208 (If the shell is started with the ef)108 242.4 R(fecti)-.25 E 1.508 -.15 (ve u)-.25 H 1.207 (ser \(group\) id not equal to the real user \(group\) id, and the).15 F F13.707 E F0 .536(option is not supplied, no startup \214les are \ read, shell functions are not inherited from the en)108 254.4 R .536 (vironment, the)-.4 F F3(SHELLOPTS)108 266.4 Q F0 -.25(va)2.46 G .21 (riable, if it appears in the en).25 F .21 (vironment, is ignored, and the ef)-.4 F(fecti)-.25 E .51 -.15(ve u)-.25 H .21(ser id is set to the real).15 F .261(user id.)108 278.4 R .261 (If the)5.261 F F12.761 E F0 .261(option is supplied at in)2.761 F -.2(vo)-.4 G .261(cation, the startup beha).2 F .261 (vior is the same, b)-.2 F .261(ut the ef)-.2 F(fecti)-.25 E .561 -.15 (ve u)-.25 H .261(ser id).15 F(is not reset.)108 290.4 Q/F4 10.95 /Times-Bold@0 SF(DEFINITIONS)72 307.2 Q F0(The follo)108 319.2 Q (wing de\214nitions are used throughout the rest of this document.)-.25 E F1(blank)108 331.2 Q F0 2.5(As)11.54 G(pace or tab)-2.5 E(.)-.4 E F1 -.1(wo)108 343.2 S(rd).1 E F0 2.5(As)13.88 G (equence of characters considered as a single unit by the shell.)-2.5 E (Also kno)5 E(wn as a)-.25 E F1(tok)2.5 E(en)-.1 E F0(.)A F1(name)108 355.2 Q F0(A)12.67 E F2(wor)2.751 E(d)-.37 E F0 .251 (consisting only of alphanumeric characters and underscores, and be) 2.751 F .25(ginning with an alpha-)-.15 F (betic character or an underscore.)144 367.2 Q(Also referred to as an)5 E F1(identi\214er)2.5 E F0(.)A F1(metacharacter)108 379.2 Q F0 2.5(Ac) 144 391.2 S(haracter that, when unquoted, separates w)-2.5 E 2.5 (ords. One)-.1 F(of the follo)2.5 E(wing:)-.25 E F1 5(|&;\(\)<>s)144 403.2 S 2.5(pace tab)-5 F(contr)108 415.2 Q(ol operator)-.18 E F0(A)144 427.2 Q F2(tok)2.5 E(en)-.1 E F0(that performs a control function.)2.5 E (It is one of the follo)5 E(wing symbols:)-.25 E/F5 10/Symbol SF 144 439.2 Q F1 5(&&)5 G 5(&;;)-5 G 5(;\(\)|<)-5 G(newline>)-5 E F4 (RESER)72 456 Q(VED W)-.602 E(ORDS)-.11 E F2 .306(Reserved wor)108 468 R (ds)-.37 E F0 .306(are w)2.806 F .306(ords that ha)-.1 F .606 -.15 (ve a s)-.2 H .306(pecial meaning to the shell.).15 F .307(The follo) 5.307 F .307(wing w)-.25 F .307(ords are recognized as)-.1 F(reserv)108 480 Q .227(ed when unquoted and either the \214rst w)-.15 F .227 (ord of a simple command \(see)-.1 F F3 .226(SHELL GRAMMAR)2.727 F F0 (belo)2.476 E .226(w\) or)-.25 F(the third w)108 492 Q(ord of a)-.1 E F1 (case)2.5 E F0(or)2.5 E F1 -.25(fo)2.5 G(r).25 E F0(command:)2.5 E F1 11.915(!c)144 508.8 S 9.416(ase do done elif else esac \214 f)-11.915 F 9.416(or function if in select then until)-.25 F 7.5 (while { } time [[ ]])144 520.8 R F4(SHELL GRAMMAR)72 537.6 Q F1 (Simple Commands)87 549.6 Q F0(A)108 561.6 Q F2 .389(simple command) 2.889 F F0 .389(is a sequence of optional v)2.889 F .388 (ariable assignments follo)-.25 F .388(wed by)-.25 F F1(blank)2.888 E F0 .388(-separated w)B .388(ords and)-.1 F .815 (redirections, and terminated by a)108 573.6 R F2(contr)3.315 E .815 (ol oper)-.45 F(ator)-.15 E F0 5.815(.T)C .815(he \214rst w)-5.815 F .816(ord speci\214es the command to be e)-.1 F -.15(xe)-.15 G(cuted,).15 E(and is passed as ar)108 585.6 Q(gument zero.)-.18 E(The remaining w)5 E(ords are passed as ar)-.1 E(guments to the in)-.18 E -.2(vo)-.4 G -.1 (ke).2 G 2.5(dc).1 G(ommand.)-2.5 E .176(The return v)108 602.4 R .176 (alue of a)-.25 F F2 .176(simple command)2.676 F F0 .175(is its e)2.676 F .175(xit status, or 128+)-.15 F F2(n)A F0 .175 (if the command is terminated by signal)3.508 F F2(n)2.675 E F0(.).24 E F1(Pipelines)87 619.2 Q F0(A)108 631.2 Q F2(pipeline)2.919 E F0 .419 (is a sequence of one or more commands separated by the character)2.919 F F1(|)2.92 E F0 5.42(.T)C .42(he format for a pipeline)-5.42 F(is:)108 643.2 Q([)144 660 Q F1(time)A F0([)2.5 E F1A F0(]] [ ! ])A F2 (command)2.5 E F0([)2.5 E F1(|)2.5 E F2(command2)2.5 E F0(... ])2.5 E .301(The standard output of)108 676.8 R F2(command)2.801 E F0 .301 (is connected via a pipe to the standard input of)2.801 F F2(command2) 2.8 E F0 5.3(.T).02 G .3(his connec-)-5.3 F(tion is performed before an) 108 688.8 Q 2.5(yr)-.15 G(edirections speci\214ed by the command \(see) -2.5 E F3(REDIRECTION)2.5 E F0(belo)2.25 E(w\).)-.25 E .237 (If the reserv)108 705.6 R .237(ed w)-.15 F(ord)-.1 E F1(!)2.737 E F0 .237(precedes a pipeline, the e)5.237 F .237 (xit status of that pipeline is the logical NO)-.15 F 2.737(To)-.4 G 2.738(ft)-2.737 G .238(he e)-2.738 F .238(xit sta-)-.15 F .613 (tus of the last command.)108 717.6 R .612 (Otherwise, the status of the pipeline is the e)5.612 F .612 (xit status of the last command.)-.15 F(The)5.612 E(shell w)108 729.6 Q (aits for all commands in the pipeline to terminate before returning a \ v)-.1 E(alue.)-.25 E(GNU Bash-2.05a)72 768 Q(2001 No)126.115 E -.15(ve) -.15 G(mber 13).15 E(3)190.545 E EP %%Page: 4 4 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\)) -.35 E .298(If the)108 84 R/F1 10/Times-Bold@0 SF(time)2.799 E F0 (reserv)2.799 E .299(ed w)-.15 F .299(ord precedes a pipeline, the elap\ sed as well as user and system time consumed by its)-.1 F -.15(exe)108 96 S .14(cution are reported when the pipeline terminates.).15 F(The) 5.139 E F12.639 E F0 .139 (option changes the output format to that spec-)2.639 F .779 (i\214ed by POSIX.)108 108 R(The)5.779 E/F2 9/Times-Bold@0 SF(TIMEFORMA) 3.279 E(T)-.855 E F0 -.25(va)3.029 G .779 (riable may be set to a format string that speci\214es ho).25 F 3.28(wt) -.25 G .78(he timing)-3.28 F (information should be displayed; see the description of)108 120 Q F2 (TIMEFORMA)2.5 E(T)-.855 E F0(under)2.25 E F1(Shell V)2.5 E(ariables) -.92 E F0(belo)2.5 E -.65(w.)-.25 G(Each command in a pipeline is e)108 136.8 Q -.15(xe)-.15 G (cuted as a separate process \(i.e., in a subshell\).).15 E F1(Lists)87 153.6 Q F0(A)108 165.6 Q/F3 10/Times-Italic@0 SF(list)2.601 E F0 .101(i\ s a sequence of one or more pipelines separated by one of the operators) 2.601 F F1(;)2.6 E F0(,)A F1(&)2.6 E F0(,)A F1(&&)2.6 E F0 2.6(,o)C(r) -2.6 E/F4 10/Symbol SF2.6 E F0 2.6(,a)C .1(nd option-)-2.6 F (ally terminated by one of)108 177.6 Q F1(;)2.5 E F0(,)A F1(&)2.5 E F0 2.5(,o)C(r)-2.5 E F1()2.5 E F0(.)A .656 (Of these list operators,)108 194.4 R F1(&&)3.156 E F0(and)3.156 E F4 3.156 E F0(ha)3.156 E .956 -.15(ve e)-.2 H .656 (qual precedence, follo).15 F .656(wed by)-.25 F F1(;)3.156 E F0(and) 3.156 E F1(&,)3.156 E F0 .656(which ha)3.156 F .957 -.15(ve e)-.2 H .657 (qual prece-).15 F(dence.)108 206.4 Q .029 (If a command is terminated by the control operator)108 223.2 R F1(&) 2.529 E F0 2.529(,t)C .029(he shell e)-2.529 F -.15(xe)-.15 G .029 (cutes the command in the).15 F F3(bac)2.528 E(kgr)-.2 E(ound)-.45 E F0 (in)2.528 E 2.875(as)108 235.2 S 2.875(ubshell. The)-2.875 F .375 (shell does not w)2.875 F .375 (ait for the command to \214nish, and the return status is 0.)-.1 F .376 (Commands sepa-)5.376 F .849(rated by a)108 247.2 R F1(;)3.349 E F0 .849 (are e)3.349 F -.15(xe)-.15 G .848(cuted sequentially; the shell w).15 F .848(aits for each command to terminate in turn.)-.1 F .848(The return) 5.848 F(status is the e)108 259.2 Q(xit status of the last command e) -.15 E -.15(xe)-.15 G(cuted.).15 E(The control operators)108 276 Q F1 (&&)2.5 E F0(and)2.5 E F42.5 E F0 (denote AND lists and OR lists, respecti)2.5 E -.15(ve)-.25 G(ly).15 E 5 (.A)-.65 G 2.5(nA)-5 G(ND list has the form)-2.5 E F3(command1)144 292.8 Q F1(&&)2.5 E F3(command2)2.5 E(command2)108 309.6 Q F0(is e)2.5 E -.15 (xe)-.15 G(cuted if, and only if,).15 E F3(command1)2.5 E F0 (returns an e)2.5 E(xit status of zero.)-.15 E(An OR list has the form) 108 326.4 Q F3(command1)144 343.2 Q F42.5 E F3(command2)2.5 E (command2)108 364.8 Q F0 .753(is e)3.253 F -.15(xe)-.15 G .753 (cuted if and only if).15 F F3(command1)3.253 E F0 .754 (returns a non-zero e)3.253 F .754(xit status.)-.15 F .754 (The return status of AND)5.754 F(and OR lists is the e)108 376.8 Q (xit status of the last command e)-.15 E -.15(xe)-.15 G (cuted in the list.).15 E F1(Compound Commands)87 393.6 Q F0(A)108 405.6 Q F3(compound command)2.5 E F0(is one of the follo)2.5 E(wing:)-.25 E (\()108 422.4 Q F3(list)A F0(\))A F3(list)17.11 E F0 1.12(is e)3.62 F -.15(xe)-.15 G 1.12(cuted in a subshell.).15 F -1.11(Va)6.119 G 1.119 (riable assignments and b)1.11 F 1.119(uiltin commands that af)-.2 F 1.119(fect the shell')-.25 F(s)-.55 E(en)144 434.4 Q 1.068 (vironment do not remain in ef)-.4 F 1.069 (fect after the command completes.)-.25 F 1.069 (The return status is the e)6.069 F(xit)-.15 E(status of)144 446.4 Q F3 (list)2.5 E F0(.)A({)108 463.2 Q F3(list)2.5 E F0 2.5(;})C F3(list)3.89 E F0 .402(is simply e)2.902 F -.15(xe)-.15 G .401 (cuted in the current shell en).15 F(vironment.)-.4 E F3(list)5.401 E F0 .401(must be terminated with a ne)2.901 F .401(wline or)-.25 F 3.214 (semicolon. This)144 475.2 R .714(is kno)3.214 F .714(wn as a)-.25 F F3 (gr)3.215 E .715(oup command)-.45 F F0 5.715(.T)C .715 (he return status is the e)-5.715 F .715(xit status of)-.15 F F3(list) 3.215 E F0 5.715(.N)C(ote)-5.715 E .405(that unlik)144 487.2 R 2.905(et) -.1 G .405(he metacharacters)-2.905 F F1(\()2.905 E F0 .405(and ,)2.905 F F1({)2.905 E F0(and)2.905 E F1(})2.904 E F0(are)2.904 E F3 -.37(re) 2.904 G .404(served wor).37 F(ds)-.37 E F0 .404 (and must occur where a reserv)2.904 F(ed)-.15 E -.1(wo)144 499.2 S .256 (rd is permitted to be recognized.).1 F .256(Since the)5.256 F 2.756(yd) -.15 G 2.756(on)-2.756 G .257(ot cause a w)-2.756 F .257(ord break, the) -.1 F 2.757(ym)-.15 G .257(ust be separated)-2.757 F(from)144 511.2 Q F3 (list)2.5 E F0(by whitespace.)2.5 E(\(\()108 528 Q F3 -.2(ex)C(pr).2 E (ession)-.37 E F0(\)\))A(The)144 540 Q F3 -.2(ex)2.552 G(pr).2 E(ession) -.37 E F0 .052(is e)2.552 F -.25(va)-.25 G .051 (luated according to the rules described belo).25 F 2.551(wu)-.25 G (nder)-2.551 E F2 .051(ARITHMETIC EV)2.551 F(ALU)-1.215 E(A-)-.54 E (TION)144 552 Q/F5 9/Times-Roman@0 SF(.)A F0 .411(If the v)4.91 F .411 (alue of the e)-.25 F .411(xpression is non-zero, the return status is \ 0; otherwise the return status)-.15 F(is 1.)144 564 Q(This is e)5 E (xactly equi)-.15 E -.25(va)-.25 G(lent to).25 E F1(let ")2.5 E F3 -.2 (ex)C(pr).2 E(ession)-.37 E F1(")A F0(.)A F1([[)108 580.8 Q F3 -.2(ex) 2.5 G(pr).2 E(ession)-.37 E F1(]])2.5 E F0 1.3 (Return a status of 0 or 1 depending on the e)144 592.8 R -.25(va)-.25 G 1.299(luation of the conditional e).25 F(xpression)-.15 E F3 -.2(ex) 3.799 G(pr).2 E(ession)-.37 E F0(.)A 2.273 (Expressions are composed of the primaries described belo)144 604.8 R 4.774(wu)-.25 G(nder)-4.774 E F2(CONDITION)4.774 E 2.274(AL EXPRES-)-.18 F(SIONS)144 616.8 Q F5(.)A F0 -.8(Wo)5.633 G 1.133 (rd splitting and pathname e).8 F 1.133 (xpansion are not performed on the w)-.15 F 1.133(ords between the)-.1 F F1([[)3.632 E F0(and)144 628.8 Q F1(]])2.963 E F0 2.963(;t)C .463 (ilde e)-2.963 F .464(xpansion, parameter and v)-.15 F .464(ariable e) -.25 F .464(xpansion, arithmetic e)-.15 F .464 (xpansion, command substi-)-.15 F (tution, process substitution, and quote remo)144 640.8 Q -.25(va)-.15 G 2.5(la).25 G(re performed.)-2.5 E .503(When the)144 658.8 R F1(==)3.003 E F0(and)3.002 E F1(!=)3.002 E F0 .502(operators are used, the string t\ o the right of the operator is considered a pat-)3.002 F 1.383 (tern and matched according to the rules described belo)144 670.8 R 3.883(wu)-.25 G(nder)-3.883 E F1 -.1(Pa)3.883 G(tter).1 E 3.883(nM)-.15 G(atching)-3.883 E F0 6.383(.T)C 1.384(he return)-6.383 F -.25(va)144 682.8 S .589 (lue is 0 if the string matches or does not match the pattern, respecti) .25 F -.15(ve)-.25 G(ly).15 E 3.089(,a)-.65 G .588(nd 1 otherwise.) -3.089 F(An)5.588 E(y)-.15 E(part of the pattern may be quoted to force\ it to be matched as a string.)144 694.8 Q .785 (Expressions may be combined using the follo)144 712.8 R .786 (wing operators, listed in decreasing order of prece-)-.25 F(dence:)144 724.8 Q(GNU Bash-2.05a)72 768 Q(2001 No)126.115 E -.15(ve)-.15 G (mber 13).15 E(4)190.545 E EP %%Page: 5 5 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\)) -.35 E/F1 10/Times-Bold@0 SF(\()144 84 Q/F2 10/Times-Italic@0 SF -.2(ex) 2.5 G(pr).2 E(ession)-.37 E F1(\))2.5 E F0 .523(Returns the v)180 96 R .522(alue of)-.25 F F2 -.2(ex)3.022 G(pr).2 E(ession)-.37 E F0 5.522(.T) C .522(his may be used to o)-5.522 F -.15(ve)-.15 G .522 (rride the normal precedence of).15 F(operators.)180 108 Q F1(!)144 120 Q F2 -.2(ex)2.5 G(pr).2 E(ession)-.37 E F0 -.35(Tr)180 132 S(ue if).35 E F2 -.2(ex)2.5 G(pr).2 E(ession)-.37 E F0(is f)2.5 E(alse.)-.1 E F2 -.2 (ex)144 144 S(pr).2 E(ession1)-.37 E F1(&&)2.5 E F2 -.2(ex)2.5 G(pr).2 E (ession2)-.37 E F0 -.35(Tr)180 156 S(ue if both).35 E F2 -.2(ex)2.5 G (pr).2 E(ession1)-.37 E F0(and)2.5 E F2 -.2(ex)2.5 G(pr).2 E(ession2) -.37 E F0(are true.)2.5 E F2 -.2(ex)144 168 S(pr).2 E(ession1)-.37 E/F3 10/Symbol SF2.5 E F2 -.2(ex)2.5 G(pr).2 E(ession2)-.37 E F0 -.35 (Tr)180 180 S(ue if either).35 E F2 -.2(ex)2.5 G(pr).2 E(ession1)-.37 E F0(or)2.5 E F2 -.2(ex)2.5 G(pr).2 E(ession2)-.37 E F0(is true.)2.5 E (The)144 196.8 Q F1(&&)3.459 E F0(and)3.459 E F33.459 E F0 .959 (operators do not e)3.459 F -.15(xe)-.15 G(cute).15 E F2 -.2(ex)3.459 G (pr).2 E(ession2)-.37 E F0 .959(if the v)3.459 F .96(alue of)-.25 F F2 -.2(ex)3.46 G(pr).2 E(ession1)-.37 E F0 .96(is suf)3.46 F .96 (\214cient to)-.25 F(determine the return v)144 208.8 Q (alue of the entire conditional e)-.25 E(xpression.)-.15 E F1 -.25(fo) 108 225.6 S(r).25 E F2(name)2.5 E F0([)2.5 E F1(in)2.5 E F2(wor)2.5 E(d) -.37 E F0 2.5(];)2.5 G F1(do)A F2(list)2.5 E F0(;)2.5 E F1(done)2.5 E F0 .424(The list of w)144 237.6 R .424(ords follo)-.1 F(wing)-.25 E F1(in) 2.924 E F0 .423(is e)2.924 F .423(xpanded, generating a list of items.) -.15 F .423(The v)5.423 F(ariable)-.25 E F2(name)2.923 E F0 .423 (is set to)2.923 F .653(each element of this list in turn, and)144 249.6 R F2(list)3.153 E F0 .653(is e)3.153 F -.15(xe)-.15 G .653 (cuted each time.).15 F .653(If the)5.653 F F1(in)3.153 E F2(wor)3.153 E (d)-.37 E F0 .653(is omitted, the)3.153 F F1 -.25(fo)3.153 G(r).25 E F0 .649(command e)144 261.6 R -.15(xe)-.15 G(cutes).15 E F2(list)3.149 E F0 .648(once for each positional parameter that is set \(see)3.148 F/F4 9 /Times-Bold@0 SF -.666(PA)3.148 G(RAMETERS).666 E F0(belo)2.898 E(w\).) -.25 E .153(The return status is the e)144 273.6 R .153 (xit status of the last command that e)-.15 F -.15(xe)-.15 G 2.654 (cutes. If).15 F .154(the e)2.654 F .154(xpansion of the items)-.15 F (follo)144 285.6 Q(wing)-.25 E F1(in)2.5 E F0 (results in an empty list, no commands are e)2.5 E -.15(xe)-.15 G (cuted, and the return status is 0.).15 E F1 -.25(fo)108 302.4 S(r).25 E F0(\(\()2.5 E F2 -.2(ex)2.5 G(pr1).2 E F0(;)2.5 E F2 -.2(ex)2.5 G(pr2).2 E F0(;)2.5 E F2 -.2(ex)2.5 G(pr3).2 E F0(\)\) ;)2.5 E F1(do)2.5 E F2 (list)2.5 E F0(;)2.5 E F1(done)2.5 E F0 1.236(First, the arithmetic e) 144 314.4 R(xpression)-.15 E F2 -.2(ex)3.736 G(pr1).2 E F0 1.235(is e) 3.736 F -.25(va)-.25 G 1.235 (luated according to the rules described belo).25 F 3.735(wu)-.25 G (nder)-3.735 E F4 .561(ARITHMETIC EV)144 326.4 R(ALU)-1.215 E -.855(AT) -.54 G(ION).855 E/F5 9/Times-Roman@0 SF(.)A F0 .561(The arithmetic e) 5.061 F(xpression)-.15 E F2 -.2(ex)3.061 G(pr2).2 E F0 .562(is then e) 3.062 F -.25(va)-.25 G .562(luated repeatedly until).25 F .592(it e)144 338.4 R -.25(va)-.25 G .592(luates to zero.).25 F .592(Each time)5.592 F F2 -.2(ex)3.092 G(pr2).2 E F0 -.25(eva)3.092 G .592 (luates to a non-zero v).25 F(alue,)-.25 E F2(list)3.092 E F0 .591(is e) 3.092 F -.15(xe)-.15 G .591(cuted and the arith-).15 F .228(metic e)144 350.4 R(xpression)-.15 E F2 -.2(ex)2.728 G(pr3).2 E F0 .229(is e)2.728 F -.25(va)-.25 G 2.729(luated. If).25 F(an)2.729 E 2.729(ye)-.15 G .229 (xpression is omitted, it beha)-2.879 F -.15(ve)-.2 G 2.729(sa).15 G 2.729(si)-2.729 G 2.729(fi)-2.729 G 2.729(te)-2.729 G -.25(va)-2.979 G .229(luates to 1.).25 F .228(The return v)144 362.4 R .228 (alue is the e)-.25 F .228(xit status of the last command in)-.15 F F2 (list)2.728 E F0 .227(that is e)2.728 F -.15(xe)-.15 G .227(cuted, or f) .15 F .227(alse if an)-.1 F 2.727(yo)-.15 G 2.727(ft)-2.727 G(he)-2.727 E -.15(ex)144 374.4 S(pressions is in).15 E -.25(va)-.4 G(lid.).25 E F1 (select)108 391.2 Q F2(name)2.5 E F0([)2.5 E F1(in)2.5 E F2(wor)2.5 E(d) -.37 E F0 2.5(];)2.5 G F1(do)A F2(list)2.5 E F0(;)2.5 E F1(done)2.5 E F0 .432(The list of w)144 403.2 R .432(ords follo)-.1 F(wing)-.25 E F1(in) 2.932 E F0 .432(is e)2.932 F .432(xpanded, generating a list of items.) -.15 F .433(The set of e)5.433 F .433(xpanded w)-.15 F(ords)-.1 E .843 (is printed on the standard error)144 415.2 R 3.342(,e)-.4 G .842 (ach preceded by a number)-3.342 F 5.842(.I)-.55 G 3.342(ft)-5.842 G(he) -3.342 E F1(in)3.342 E F2(wor)3.342 E(d)-.37 E F0 .842 (is omitted, the posi-)3.342 F .064(tional parameters are printed \(see) 144 427.2 R F4 -.666(PA)2.564 G(RAMETERS).666 E F0(belo)2.314 E 2.564 (w\). The)-.25 F F1(PS3)2.564 E F0 .064(prompt is then displayed and a) 2.564 F .214(line read from the standard input.)144 439.2 R .213 (If the line consists of a number corresponding to one of the dis-)5.214 F 1.565(played w)144 451.2 R 1.565(ords, then the v)-.1 F 1.566(alue of) -.25 F F2(name)4.066 E F0 1.566(is set to that w)4.066 F 4.066(ord. If) -.1 F 1.566(the line is empty)4.066 F 4.066(,t)-.65 G 1.566(he w)-4.066 F 1.566(ords and)-.1 F .066(prompt are displayed ag)144 463.2 R 2.566 (ain. If)-.05 F .065(EOF is read, the command completes.)2.566 F(An) 5.065 E 2.565(yo)-.15 G .065(ther v)-2.565 F .065(alue read causes)-.25 F F2(name)144 475.2 Q F0 .809(to be set to null.)3.309 F .809 (The line read is sa)5.809 F -.15(ve)-.2 G 3.31(di).15 G 3.31(nt)-3.31 G .81(he v)-3.31 F(ariable)-.25 E F1(REPL)3.31 E(Y)-.92 E F0 5.81(.T)C(he) -5.81 E F2(list)3.31 E F0 .81(is e)3.31 F -.15(xe)-.15 G .81 (cuted after).15 F .072(each selection until a)144 487.2 R F1(br)2.571 E (eak)-.18 E F0 .071(command is e)2.571 F -.15(xe)-.15 G 2.571 (cuted. The).15 F -.15(ex)2.571 G .071(it status of).15 F F1(select) 2.571 E F0 .071(is the e)2.571 F .071(xit status of the)-.15 F (last command e)144 499.2 Q -.15(xe)-.15 G(cuted in).15 E F2(list)2.5 E F0 2.5(,o).68 G 2.5(rz)-2.5 G(ero if no commands were e)-2.5 E -.15(xe) -.15 G(cuted.).15 E F1(case)108 516 Q F2(wor)2.5 E(d)-.37 E F1(in)2.5 E F0 2.5([[)2.5 G(\(])-2.5 E F2(pattern)2.5 E F0([)2.5 E F1(|)2.5 E F2 (pattern)2.5 E F0 2.5(].)2.5 G(.. \))-2.5 E F2(list)2.5 E F0(;; ] ...) 2.5 E F1(esac)2.5 E F0(A)144 528 Q F1(case)3.264 E F0 .764 (command \214rst e)3.264 F(xpands)-.15 E F2(wor)3.264 E(d)-.37 E F0 3.264(,a)C .764(nd tries to match it ag)-3.264 F .764(ainst each)-.05 F F2(pattern)3.264 E F0 .765(in turn, using the)3.264 F 2.028 (same matching rules as for pathname e)144 540 R 2.027(xpansion \(see) -.15 F F1 -.1(Pa)4.527 G 2.027(thname Expansion).1 F F0(belo)4.527 E 4.527(w\). When)-.25 F(a)4.527 E .89(match is found, the corresponding) 144 552 R F2(list)3.39 E F0 .89(is e)3.39 F -.15(xe)-.15 G 3.39 (cuted. After).15 F .89(the \214rst match, no subsequent matches)3.39 F .523(are attempted.)144 564 R .523(The e)5.523 F .523 (xit status is zero if no pattern matches.)-.15 F .523 (Otherwise, it is the e)5.523 F .522(xit status of the)-.15 F (last command e)144 576 Q -.15(xe)-.15 G(cuted in).15 E F2(list)2.5 E F0 (.)A F1(if)108 592.8 Q F2(list)2.5 E F0(;)A F1(then)2.5 E F2(list;)2.5 E F0([)2.5 E F1(elif)2.5 E F2(list)2.5 E F0(;)A F1(then)2.5 E F2(list)2.5 E F0 2.5(;].)C(.. [)-2.5 E F1(else)2.5 E F2(list)2.5 E F0 2.5(;])C F1 <8c>A F0(The)144 604.8 Q F1(if)2.534 E F2(list)2.534 E F0 .034(is e) 2.534 F -.15(xe)-.15 G 2.534(cuted. If).15 F .034(its e)2.534 F .034 (xit status is zero, the)-.15 F F1(then)2.534 E F2(list)2.534 E F0 .034 (is e)2.534 F -.15(xe)-.15 G 2.534(cuted. Otherwise,).15 F(each)2.534 E F1(elif)2.534 E F2(list)2.534 E F0(is)2.534 E -.15(exe)144 616.8 S .316 (cuted in turn, and if its e).15 F .316 (xit status is zero, the corresponding)-.15 F F1(then)2.816 E F2(list) 2.816 E F0 .316(is e)2.816 F -.15(xe)-.15 G .316(cuted and the com-).15 F .658(mand completes.)144 628.8 R .658(Otherwise, the)5.658 F F1(else) 3.158 E F2(list)3.158 E F0 .658(is e)3.158 F -.15(xe)-.15 G .658 (cuted, if present.).15 F .658(The e)5.658 F .658(xit status is the e) -.15 F .659(xit status)-.15 F(of the last command e)144 640.8 Q -.15(xe) -.15 G(cuted, or zero if no condition tested true.).15 E F1(while)108 657.6 Q F2(list)2.5 E F0(;)A F1(do)2.5 E F2(list)2.5 E F0(;)A F1(done) 2.5 E(until)108 669.6 Q F2(list)2.5 E F0(;)A F1(do)2.5 E F2(list)2.5 E F0(;)A F1(done)2.5 E F0(The)144 681.6 Q F1(while)3.104 E F0 .603 (command continuously e)3.104 F -.15(xe)-.15 G .603(cutes the).15 F F1 (do)3.103 E F2(list)3.103 E F0 .603(as long as the last command in)3.103 F F2(list)3.103 E F0(returns)3.103 E .47(an e)144 693.6 R .47 (xit status of zero.)-.15 F(The)5.47 E F1(until)2.97 E F0 .471 (command is identical to the)2.97 F F1(while)2.971 E F0 .471(command, e) 2.971 F .471(xcept that the test)-.15 F .177(is ne)144 705.6 R -.05(ga) -.15 G .177(ted; the).05 F F1(do)2.677 E F2(list)2.677 E F0 .177(is e) 2.677 F -.15(xe)-.15 G .176(cuted as long as the last command in).15 F F2(list)2.676 E F0 .176(returns a non-zero e)2.676 F .176(xit status.) -.15 F 1.306(The e)144 717.6 R 1.306(xit status of the)-.15 F F1(while) 3.806 E F0(and)3.806 E F1(until)3.807 E F0 1.307(commands is the e)3.807 F 1.307(xit status of the last)-.15 F F1(do)3.807 E F2(list)3.807 E F0 (command)3.807 E -.15(exe)144 729.6 S(cuted, or zero if none w).15 E (as e)-.1 E -.15(xe)-.15 G(cuted.).15 E(GNU Bash-2.05a)72 768 Q(2001 No) 126.115 E -.15(ve)-.15 G(mber 13).15 E(5)190.545 E EP %%Page: 6 6 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\)) -.35 E([)108 84 Q/F1 10/Times-Bold@0 SF(function)2.5 E F0(])2.5 E/F2 10 /Times-Italic@0 SF(name)2.5 E F0(\(\) {)2.5 E F2(list)2.5 E F0 2.5(;})C .385(This de\214nes a function named)144 96 R F2(name)2.884 E F0 5.384 (.T)C(he)-5.384 E F2(body)2.884 E F0 .384(of the function is the)2.884 F F2(list)2.884 E F0 .384(of commands between {)2.884 F .785(and }.)144 108 R .785(This list is e)5.785 F -.15(xe)-.15 G .785(cuted whene).15 F -.15(ve)-.25 G(r).15 E F2(name)3.285 E F0 .785 (is speci\214ed as the name of a simple command.)3.285 F(The)5.786 E -.15(ex)144 120 S .64(it status of a function is the e).15 F .64 (xit status of the last command e)-.15 F -.15(xe)-.15 G .64 (cuted in the body).15 F 5.64(.\()-.65 G(See)-5.64 E/F3 9/Times-Bold@0 SF(FUNC-)3.14 E(TIONS)144 132 Q F0(belo)2.25 E -.65(w.)-.25 G(\)).65 E /F4 10.95/Times-Bold@0 SF(COMMENTS)72 148.8 Q F0 .982 (In a non-interacti)108 160.8 R 1.282 -.15(ve s)-.25 H .982 (hell, or an interacti).15 F 1.282 -.15(ve s)-.25 H .982 (hell in which the).15 F F1(interacti)3.482 E -.1(ve)-.1 G(_comments).1 E F0 .982(option to the)3.482 F F1(shopt)3.482 E F0 -.2(bu)108 172.8 S .952(iltin is enabled \(see).2 F F3 .952(SHELL B)3.452 F(UIL)-.09 E .952 (TIN COMMANDS)-.828 F F0(belo)3.202 E .952(w\), a w)-.25 F .952(ord be) -.1 F .952(ginning with)-.15 F F1(#)3.451 E F0 .951(causes that w)3.451 F(ord)-.1 E .604 (and all remaining characters on that line to be ignored.)108 184.8 R .605(An interacti)5.605 F .905 -.15(ve s)-.25 H .605(hell without the) .15 F F1(interacti)3.105 E -.1(ve)-.1 G(_com-).1 E(ments)108 196.8 Q F0 1.337(option enabled does not allo)3.837 F 3.837(wc)-.25 G 3.836 (omments. The)-3.837 F F1(interacti)3.836 E -.1(ve)-.1 G(_comments).1 E F0 1.336(option is on by def)3.836 F 1.336(ault in)-.1 F(interacti)108 208.8 Q .3 -.15(ve s)-.25 H(hells.).15 E F4 -.11(QU)72 225.6 S -.438(OT) .11 G(ING).438 E F2(Quoting)108 237.6 Q F0 .477(is used to remo)2.977 F .777 -.15(ve t)-.15 H .477 (he special meaning of certain characters or w).15 F .477 (ords to the shell.)-.1 F .478(Quoting can be)5.478 F .185 (used to disable special treatment for special characters, to pre)108 249.6 R -.15(ve)-.25 G .185(nt reserv).15 F .184(ed w)-.15 F .184 (ords from being recognized as)-.1 F(such, and to pre)108 261.6 Q -.15 (ve)-.25 G(nt parameter e).15 E(xpansion.)-.15 E .288(Each of the)108 278.4 R F2(metac)2.788 E(har)-.15 E(acter)-.15 E(s)-.1 E F0 .288 (listed abo)2.788 F .588 -.15(ve u)-.15 H(nder).15 E F3(DEFINITIONS) 2.788 E F0 .288(has special meaning to the shell and must be)2.538 F (quoted if it is to represent itself.)108 290.4 Q .705 (When the command history e)108 307.2 R .705(xpansion f)-.15 F .705 (acilities are being used, the)-.1 F F2 .705(history e)3.205 F(xpansion) -.2 E F0(character)3.205 E 3.205(,u)-.4 G(sually)-3.205 E F1(!)3.205 E F0(,)A(must be quoted to pre)108 319.2 Q -.15(ve)-.25 G(nt history e).15 E(xpansion.)-.15 E(There are three quoting mechanisms: the)108 336 Q F2 (escape c)2.5 E(har)-.15 E(acter)-.15 E F0 2.5(,s).73 G (ingle quotes, and double quotes.)-2.5 E 2.974(An)108 352.8 S .474 (on-quoted backslash \()-2.974 F F1(\\)A F0 2.974(\)i)C 2.974(st)-2.974 G(he)-2.974 E F2 .474(escape c)2.974 F(har)-.15 E(acter)-.15 E F0 5.474 (.I).73 G 2.974(tp)-5.474 G(reserv)-2.974 E .474(es the literal v)-.15 F .474(alue of the ne)-.25 F .475(xt character that)-.15 F(follo)108 364.8 Q 1.554(ws, with the e)-.25 F 1.553(xception of . If)-.25 F(a)4.053 E F1(\\)4.053 E F0( pair appears, and the backslash is not itself)-.25 F 1.122 (quoted, the)108 376.8 R F1(\\)3.622 E F0( is treated as a line continuation \(that is, it is remo)-.25 F -.15(ve)-.15 G 3.622(df).15 G 1.123(rom the input stream and)-3.622 F (ef)108 388.8 Q(fecti)-.25 E -.15(ve)-.25 G(ly ignored\).).15 E .295 (Enclosing characters in single quotes preserv)108 405.6 R .295 (es the literal v)-.15 F .295(alue of each character within the quotes.) -.25 F 2.795(As)5.295 G(in-)-2.795 E (gle quote may not occur between single quotes, e)108 417.6 Q -.15(ve) -.25 G 2.5(nw).15 G(hen preceded by a backslash.)-2.5 E .033 (Enclosing characters in double quotes preserv)108 434.4 R .034 (es the literal v)-.15 F .034 (alue of all characters within the quotes, with the)-.25 F -.15(ex)108 446.4 S 1.267(ception of).15 F F1($)3.767 E F0(,)A F1(`)3.766 E F0 3.766 (,a)C(nd)-3.766 E F1(\\)3.766 E F0 6.266(.T)C 1.266(he characters)-6.266 F F1($)3.766 E F0(and)3.766 E F1(`)3.766 E F0 1.266 (retain their special meaning within double quotes.)3.766 F(The)6.266 E .637(backslash retains its special meaning only when follo)108 458.4 R .637(wed by one of the follo)-.25 F .637(wing characters:)-.25 F F1($) 3.137 E F0(,)A F1(`)3.137 E F0(,)A F1(")3.97 E F0(,).833 E F1(\\)3.137 E F0 3.137(,o)C(r)-3.137 E F1()108 470.4 Q F0 5(.A)C(double quot\ e may be quoted within double quotes by preceding it with a backslash.) -2.5 E(The special parameters)108 487.2 Q F1(*)2.5 E F0(and)2.5 E F1(@) 2.5 E F0(ha)2.5 E .3 -.15(ve s)-.2 H (pecial meaning when in double quotes \(see).15 E F3 -.666(PA)2.5 G (RAMETERS).666 E F0(belo)2.25 E(w\).)-.25 E -.8(Wo)108 504 S .008 (rds of the form).8 F F1($)2.508 E F0(')A F2(string)A F0 2.508('a)C .007 (re treated specially)-2.508 F 5.007(.T)-.65 G .007(he w)-5.007 F .007 (ord e)-.1 F .007(xpands to)-.15 F F2(string)2.507 E F0 2.507(,w)C .007 (ith backslash-escaped char)-2.507 F(-)-.2 E .029 (acters replaced as specifed by the ANSI C standard.)108 516 R .03 (Backslash escape sequences, if present, are decoded as)5.029 F(follo) 108 528 Q(ws:)-.25 E F1(\\a)144 540 Q F0(alert \(bell\))28.22 E F1(\\b) 144 552 Q F0(backspace)27.66 E F1(\\e)144 564 Q F0(an escape character) 28.78 E F1(\\f)144 576 Q F0(form feed)29.89 E F1(\\n)144 588 Q F0(ne) 27.66 E 2.5(wl)-.25 G(ine)-2.5 E F1(\\r)144 600 Q F0(carriage return) 28.78 E F1(\\t)144 612 Q F0(horizontal tab)29.89 E F1(\\v)144 624 Q F0 -.15(ve)28.22 G(rtical tab).15 E F1(\\\\)144 636 Q F0(backslash)30.44 E F1(\\')144 648 Q F0(single quote)29.89 E F1(\\)144 660 Q F2(nnn)A F0 (the eight-bit character whose v)18.22 E(alue is the octal v)-.25 E (alue)-.25 E F2(nnn)2.5 E F0(\(one to three digits\))2.5 E F1(\\x)144 672 Q F2(HH)A F0(the eight-bit character whose v)13.78 E(alue is the he) -.25 E(xadecimal v)-.15 E(alue)-.25 E F2(HH)2.5 E F0(\(one or tw)2.5 E 2.5(oh)-.1 G .3 -.15(ex d)-2.5 H(igits\)).15 E(The e)108 688.8 Q(xpande\ d result is single-quoted, as if the dollar sign had not been present.) -.15 E 2.986(Ad)108 705.6 S .486 (ouble-quoted string preceded by a dollar sign \()-2.986 F F1($)A F0 2.986(\)w)C .485(ill cause the string to be translated according to the) -2.986 F .117(current locale.)108 717.6 R .117(If the current locale is) 5.117 F F1(C)2.617 E F0(or)2.617 E F1(POSIX)2.617 E F0 2.617(,t)C .118 (he dollar sign is ignored.)-2.617 F .118 (If the string is translated and)5.118 F (replaced, the replacement is double-quoted.)108 729.6 Q(GNU Bash-2.05a) 72 768 Q(2001 No)126.115 E -.15(ve)-.15 G(mber 13).15 E(6)190.545 E EP %%Page: 7 7 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\)) -.35 E/F1 10.95/Times-Bold@0 SF -.81(PA)72 84 S(RAMETERS).81 E F0(A)108 96 Q/F2 10/Times-Italic@0 SF(par)3.442 E(ameter)-.15 E F0 .942 (is an entity that stores v)3.442 F 3.442(alues. It)-.25 F .942 (can be a)3.442 F F2(name)3.441 E F0 3.441(,an).18 G(umber)-3.441 E 3.441(,o)-.4 G 3.441(ro)-3.441 G .941(ne of the special characters) -3.441 F .872(listed belo)108 108 R 3.372(wu)-.25 G(nder)-3.372 E/F3 10 /Times-Bold@0 SF .872(Special P)3.372 F(arameters)-.1 E F0 5.872(.F)C .872(or the shell')-6.022 F 3.372(sp)-.55 G .873(urposes, a)-3.372 F F2 (variable)3.373 E F0 .873(is a parameter denoted by a)3.373 F F2(name) 108 120 Q F0 5.189(.A).18 G -.25(va)-2.5 G .189(riable has a).25 F F2 (value)2.688 E F0 .188(and zero or more)2.688 F F2(attrib)2.688 E(utes) -.2 E F0 5.188(.A)C(ttrib)-5.188 E .188(utes are assigned using the)-.2 F F3(declar)2.688 E(e)-.18 E F0 -.2(bu)2.688 G(iltin).2 E(command \(see) 108 132 Q F3(declar)2.5 E(e)-.18 E F0(belo)2.5 E 2.5(wi)-.25 G(n)-2.5 E /F4 9/Times-Bold@0 SF(SHELL B)2.5 E(UIL)-.09 E(TIN COMMANDS)-.828 E/F5 9 /Times-Roman@0 SF(\).)A F0 2.754(Ap)108 148.8 S .254 (arameter is set if it has been assigned a v)-2.754 F 2.754(alue. The) -.25 F .254(null string is a v)2.754 F .255(alid v)-.25 F 2.755 (alue. Once)-.25 F 2.755(av)2.755 G .255(ariable is set, it)-3.005 F (may be unset only by using the)108 160.8 Q F3(unset)2.5 E F0 -.2(bu)2.5 G(iltin command \(see).2 E F4(SHELL B)2.5 E(UIL)-.09 E(TIN COMMANDS) -.828 E F0(belo)2.25 E(w\).)-.25 E(A)108 177.6 Q F2(variable)2.5 E F0 (may be assigned to by a statement of the form)2.5 E F2(name)144 194.4 Q F0(=[)A F2(value)A F0(])A(If)108 211.2 Q F2(value)2.793 E F0 .293 (is not gi)2.793 F -.15(ve)-.25 G .293(n, the v).15 F .293 (ariable is assigned the null string.)-.25 F(All)5.293 E F2(values)2.793 E F0(under)2.793 E .293(go tilde e)-.18 F .292(xpansion, parameter)-.15 F .515(and v)108 223.2 R .515(ariable e)-.25 F .515 (xpansion, command substitution, arithmetic e)-.15 F .515 (xpansion, and quote remo)-.15 F -.25(va)-.15 G 3.015(l\().25 G(see) -3.015 E F4(EXP)3.015 E(ANSION)-.666 E F0(belo)108 235.2 Q 2.762 (w\). If)-.25 F .262(the v)2.762 F .262(ariable has its)-.25 F F3 (integer)2.762 E F0(attrib)2.762 E .262(ute set, then)-.2 F F2(value) 2.762 E F0 .261(is subject to arithmetic e)2.762 F .261(xpansion e)-.15 F -.15(ve)-.25 G 2.761(ni).15 G 2.761(ft)-2.761 G(he)-2.761 E .123 ($\(\(...\)\) e)108 247.2 R .123(xpansion is not used \(see)-.15 F F3 .123(Arithmetic Expansion)2.623 F F0(belo)2.623 E 2.623(w\). W)-.25 F .124(ord splitting is not performed, with the)-.8 F -.15(ex)108 259.2 S .374(ception of).15 F F3("$@")2.873 E F0 .373(as e)2.873 F .373 (xplained belo)-.15 F 2.873(wu)-.25 G(nder)-2.873 E F3 .373(Special P) 2.873 F(arameters)-.1 E F0 5.373(.P)C .373(athname e)-5.523 F .373 (xpansion is not performed.)-.15 F .463 (Assignment statements may also appear as ar)108 271.2 R .464 (guments to the)-.18 F F3(declar)2.964 E(e)-.18 E F0(,)A F3(typeset) 2.964 E F0(,)A F3(export)2.964 E F0(,)A F3 -.18(re)2.964 G(adonly).18 E F0 2.964(,a)C(nd)-2.964 E F3(local)2.964 E F0 -.2(bu)108 283.2 S (iltin commands.).2 E F3 -.2(Po)87 300 S(sitional P).2 E(arameters)-.1 E F0(A)108 312 Q F2 .816(positional par)3.316 F(ameter)-.15 E F0 .816(is \ a parameter denoted by one or more digits, other than the single digit \ 0.)3.316 F(Posi-)5.815 E .444 (tional parameters are assigned from the shell')108 324 R 2.944(sa)-.55 G -.18(rg)-2.944 G .444(uments when it is in).18 F -.2(vo)-.4 G -.1(ke) .2 G .445(d, and may be reassigned using).1 F(the)108 336 Q F3(set)3.334 E F0 -.2(bu)3.334 G .834(iltin command.).2 F .833(Positional parameters\ may not be assigned to with assignment statements.)5.834 F(The)5.833 E .334(positional parameters are temporarily replaced when a shell functi\ on is e)108 348 R -.15(xe)-.15 G .334(cuted \(see).15 F F4(FUNCTIONS) 2.834 E F0(belo)2.584 E(w\).)-.25 E 1.404(When a positional parameter c\ onsisting of more than a single digit is e)108 364.8 R 1.403 (xpanded, it must be enclosed in)-.15 F(braces \(see)108 376.8 Q F4(EXP) 2.5 E(ANSION)-.666 E F0(belo)2.25 E(w\).)-.25 E F3(Special P)87 393.6 Q (arameters)-.1 E F0 1.674(The shell treats se)108 405.6 R -.15(ve)-.25 G 1.674(ral parameters specially).15 F 6.675(.T)-.65 G 1.675 (hese parameters may only be referenced; assignment to)-6.675 F (them is not allo)108 417.6 Q(wed.)-.25 E F3(*)108 429.6 Q F0 .606 (Expands to the positional parameters, starting from one.)31 F .605 (When the e)5.605 F .605(xpansion occurs within dou-)-.15 F .083 (ble quotes, it e)144 441.6 R .084(xpands to a single w)-.15 F .084 (ord with the v)-.1 F .084 (alue of each parameter separated by the \214rst char)-.25 F(-)-.2 E .032(acter of the)144 453.6 R F4(IFS)2.532 E F0 .032(special v)2.282 F 2.532(ariable. That)-.25 F .032(is, ")2.532 F F3($*)A F0 2.531("i)C 2.531(se)-2.531 G(qui)-2.531 E -.25(va)-.25 G .031(lent to ").25 F F3 ($1)A F2(c)A F3($2)A F2(c)A F3(...)A F0 .031(", where)B F2(c)2.531 E F0 .031(is the \214rst char)2.531 F(-)-.2 E .768(acter of the v)144 465.6 R .768(alue of the)-.25 F F4(IFS)3.268 E F0 -.25(va)3.018 G 3.268 (riable. If).25 F F4(IFS)3.268 E F0 .769 (is unset, the parameters are separated by spaces.)3.018 F(If)5.769 E F4 (IFS)144 477.6 Q F0(is null, the parameters are joined without interv) 2.25 E(ening separators.)-.15 E F3(@)108 489.6 Q F0 .606 (Expands to the positional parameters, starting from one.)26.7 F .605 (When the e)5.605 F .605(xpansion occurs within dou-)-.15 F .113 (ble quotes, each parameter e)144 501.6 R .113(xpands to a separate w) -.15 F 2.614(ord. That)-.1 F .114(is, ")2.614 F F3($@)A F0 2.614("i)C 2.614(se)-2.614 G(qui)-2.614 E -.25(va)-.25 G .114(lent to ").25 F F3 ($1)A F0 2.614("")C F3($2)-2.614 E F0 2.614(".)C(..)-2.614 E .032 (When there are no positional parameters, ")144 513.6 R F3($@)A F0 2.532 ("a)C(nd)-2.532 E F3($@)2.532 E F0 -.15(ex)2.532 G .032 (pand to nothing \(i.e., the).15 F 2.532(ya)-.15 G .032(re remo)-2.532 F -.15(ve)-.15 G(d\).).15 E F3(#)108 525.6 Q F0 (Expands to the number of positional parameters in decimal.)31 E F3(?) 108 537.6 Q F0(Expands to the status of the most recently e)31 E -.15 (xe)-.15 G(cuted fore).15 E(ground pipeline.)-.15 E F3108 549.6 Q F0 .881(Expands to the current option \215ags as speci\214ed upon in)30.3 F -.2(vo)-.4 G .881(cation, by the).2 F F3(set)3.382 E F0 -.2(bu)3.382 G .882(iltin command, or).2 F(those set by the shell itself \(such as the) 144 561.6 Q F32.5 E F0(option\).)2.5 E F3($)108 573.6 Q F0 .214 (Expands to the process ID of the shell.)31 F .214 (In a \(\) subshell, it e)5.214 F .214 (xpands to the process ID of the current)-.15 F (shell, not the subshell.)144 585.6 Q F3(!)108 597.6 Q F0 (Expands to the process ID of the most recently e)32.67 E -.15(xe)-.15 G (cuted background \(asynchronous\) command.).15 E F3(0)108 609.6 Q F0 1.691(Expands to the name of the shell or shell script.)31 F 1.692 (This is set at shell initialization.)6.692 F(If)6.692 E F3(bash)4.192 E F0(is)4.192 E(in)144 621.6 Q -.2(vo)-.4 G -.1(ke).2 G 3.078(dw).1 G .578 (ith a \214le of commands,)-3.078 F F3($0)3.078 E F0 .578 (is set to the name of that \214le.)3.078 F(If)5.577 E F3(bash)3.077 E F0 .577(is started with the)3.077 F F33.077 E F0 .368 (option, then)144 633.6 R F3($0)2.869 E F0 .369 (is set to the \214rst ar)2.869 F .369(gument after the string to be e) -.18 F -.15(xe)-.15 G .369(cuted, if one is present.).15 F(Other)5.369 E (-)-.2 E(wise, it is set to the \214le name used to in)144 645.6 Q -.2 (vo)-.4 G -.1(ke).2 G F3(bash)2.6 E F0 2.5(,a)C 2.5(sg)-2.5 G -2.15 -.25 (iv e)-2.5 H 2.5(nb).25 G 2.5(ya)-2.5 G -.18(rg)-2.5 G(ument zero.).18 E F3(_)108 657.6 Q F0 .1(At shell startup, set to the absolute \214le nam\ e of the shell or shell script being e)31 F -.15(xe)-.15 G .1 (cuted as passed in).15 F 1.705(the ar)144 669.6 R 1.705(gument list.) -.18 F(Subsequently)6.705 E 4.205(,e)-.65 G 1.705(xpands to the last ar) -4.355 F 1.706(gument to the pre)-.18 F 1.706(vious command, after)-.25 F -.15(ex)144 681.6 S 2.516(pansion. Also).15 F .016 (set to the full \214le name of each command e)2.516 F -.15(xe)-.15 G .015(cuted and placed in the en).15 F(vironment)-.4 E -.15(ex)144 693.6 S 1.006(ported to that command.).15 F 1.006 (When checking mail, this parameter holds the name of the mail \214le) 6.006 F(currently being check)144 705.6 Q(ed.)-.1 E(GNU Bash-2.05a)72 768 Q(2001 No)126.115 E -.15(ve)-.15 G(mber 13).15 E(7)190.545 E EP %%Page: 8 8 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\)) -.35 E/F1 10/Times-Bold@0 SF(Shell V)87 84 Q(ariables)-.92 E F0 (The follo)108 96 Q(wing v)-.25 E(ariables are set by the shell:)-.25 E F1 -.3(BA)108 112.8 S(SH).3 E F0 (Expands to the full \214le name used to in)9.07 E -.2(vo)-.4 G .2 -.1 (ke t).2 H(his instance of).1 E F1(bash)2.5 E F0(.)A F1 -.3(BA)108 124.8 S(SH_VERSINFO).3 E F0 2.645(Ar)144 136.8 S .145(eadonly array v)-2.645 F .144(ariable whose members hold v)-.25 F .144 (ersion information for this instance of)-.15 F F1(bash)2.644 E F0 5.144 (.T)C(he)-5.144 E -.25(va)144 148.8 S (lues assigned to the array members are as follo).25 E(ws:)-.25 E F1 -.3 (BA)144 166.8 S(SH_VERSINFO[).3 E F0(0)A F1(])A F0(The major v)24.74 E (ersion number \(the)-.15 E/F2 10/Times-Italic@0 SF -.37(re)2.5 G(lease) .37 E F0(\).)A F1 -.3(BA)144 178.8 S(SH_VERSINFO[).3 E F0(1)A F1(])A F0 (The minor v)24.74 E(ersion number \(the)-.15 E F2(ver)2.5 E(sion)-.1 E F0(\).)A F1 -.3(BA)144 190.8 S(SH_VERSINFO[).3 E F0(2)A F1(])A F0 (The patch le)24.74 E -.15(ve)-.25 G(l.).15 E F1 -.3(BA)144 202.8 S (SH_VERSINFO[).3 E F0(3)A F1(])A F0(The b)24.74 E(uild v)-.2 E(ersion.) -.15 E F1 -.3(BA)144 214.8 S(SH_VERSINFO[).3 E F0(4)A F1(])A F0 (The release status \(e.g.,)24.74 E F2(beta1)2.5 E F0(\).)A F1 -.3(BA) 144 226.8 S(SH_VERSINFO[).3 E F0(5)A F1(])A F0(The v)24.74 E(alue of) -.25 E F1(MA)2.5 E(CHTYPE)-.55 E F0(.)A F1 -.3(BA)108 243.6 S (SH_VERSION).3 E F0(Expands to a string describing the v)144 255.6 Q (ersion of this instance of)-.15 E F1(bash)2.5 E F0(.)A F1(COMP_CW)108 272.4 Q(ORD)-.1 E F0 .396(An inde)144 284.4 R 2.896(xi)-.15 G(nto)-2.896 E F1(${COMP_W)2.896 E(ORDS})-.1 E F0 .396(of the w)2.896 F .396 (ord containing the current cursor position.)-.1 F .397(This v)5.397 F (ari-)-.25 E 1.181(able is a)144 296.4 R -.25(va)-.2 G 1.181 (ilable only in shell functions in).25 F -.2(vo)-.4 G -.1(ke).2 G 3.681 (db).1 G 3.681(yt)-3.681 G 1.18(he programmable completion f)-3.681 F 1.18(acilities \(see)-.1 F F1(Pr)144 308.4 Q(ogrammable Completion)-.18 E F0(belo)2.5 E(w\).)-.25 E F1(COMP_LINE)108 325.2 Q F0 1.207 (The current command line.)144 337.2 R 1.208(This v)6.208 F 1.208 (ariable is a)-.25 F -.25(va)-.2 G 1.208 (ilable only in shell functions and e).25 F 1.208(xternal com-)-.15 F 2.849(mands in)144 349.2 R -.2(vo)-.4 G -.1(ke).2 G 5.349(db).1 G 5.349 (yt)-5.349 G 2.849(he programmable completion f)-5.349 F 2.849 (acilities \(see)-.1 F F1(Pr)5.349 E 2.848(ogrammable Completion)-.18 F F0(belo)144 361.2 Q(w\).)-.25 E F1(COMP_POINT)108 378 Q F0 .666 (The inde)144 390 R 3.166(xo)-.15 G 3.166(ft)-3.166 G .666 (he current cursor position relati)-3.166 F .966 -.15(ve t)-.25 H 3.166 (ot).15 G .666(he be)-3.166 F .666(ginning of the current command.)-.15 F .667(If the)5.667 F .535 (current cursor position is at the end of the current command, the v)144 402 R .534(alue of this v)-.25 F .534(ariable is equal to)-.25 F F1 (${#COMP_LINE})144 414 Q F0 7.005(.T)C 2.005(his v)-7.005 F 2.005 (ariable is a)-.25 F -.25(va)-.2 G 2.006 (ilable only in shell functions and e).25 F 2.006(xternal commands)-.15 F(in)144 426 Q -.2(vo)-.4 G -.1(ke).2 G 2.5(db).1 G 2.5(yt)-2.5 G (he programmable completion f)-2.5 E(acilities \(see)-.1 E F1(Pr)2.5 E (ogrammable Completion)-.18 E F0(belo)2.5 E(w\).)-.25 E F1(COMP_W)108 442.8 Q(ORDS)-.1 E F0 .654(An array v)144 454.8 R .654(ariable \(see) -.25 F F1(Arrays)3.154 E F0(belo)3.154 E .654 (w\) consisting of the indi)-.25 F .653(vidual w)-.25 F .653 (ords in the current command)-.1 F 3.477(line. This)144 466.8 R -.25(va) 3.477 G .977(riable is a).25 F -.25(va)-.2 G .978 (ilable only in shell functions in).25 F -.2(vo)-.4 G -.1(ke).2 G 3.478 (db).1 G 3.478(yt)-3.478 G .978(he programmable completion)-3.478 F -.1 (fa)144 478.8 S(cilities \(see).1 E F1(Pr)2.5 E(ogrammable Completion) -.18 E F0(belo)2.5 E(w\).)-.25 E F1(DIRST)108 495.6 Q -.55(AC)-.9 G(K) .55 E F0 2.26(An array v)144 507.6 R 2.26(ariable \(see)-.25 F F1 (Arrays)4.76 E F0(belo)4.76 E 2.26 (w\) containing the current contents of the directory stack.)-.25 F 1.094(Directories appear in the stack in the order the)144 519.6 R 3.594 (ya)-.15 G 1.095(re displayed by the)-3.594 F F1(dirs)3.595 E F0 -.2(bu) 3.595 G 3.595(iltin. Assigning).2 F(to)3.595 E 1.432 (members of this array v)144 531.6 R 1.432 (ariable may be used to modify directories already in the stack, b)-.25 F 1.431(ut the)-.2 F F1(pushd)144 543.6 Q F0(and)2.746 E F1(popd)2.746 E F0 -.2(bu)2.746 G .246(iltins must be used to add and remo).2 F .546 -.15(ve d)-.15 H 2.746(irectories. Assignment).15 F .246(to this v)2.746 F(ariable)-.25 E .351(will not change the current directory)144 555.6 R 5.35(.I)-.65 G(f)-5.35 E/F3 9/Times-Bold@0 SF(DIRST)2.85 E -.495(AC)-.81 G(K).495 E F0 .35(is unset, it loses its special properties, e)2.6 F -.15(ve)-.25 G 2.85(ni).15 G(f)-2.85 E(it is subsequently reset.)144 567.6 Q F1(EUID)108 584.4 Q F0 1.103(Expands to the ef)11 F(fecti)-.25 E 1.403 -.15(ve u)-.25 H 1.103(ser ID of the current user).15 F 3.603(,i) -.4 G 1.103(nitialized at shell startup.)-3.603 F 1.104(This v)6.103 F 1.104(ariable is)-.25 F(readonly)144 596.4 Q(.)-.65 E F1(FUNCN)108 613.2 Q(AME)-.2 E F0 .693(The name of an)144 625.2 R 3.193(yc)-.15 G (urrently-e)-3.193 E -.15(xe)-.15 G .693(cuting shell function.).15 F .693(This v)5.693 F .693(ariable e)-.25 F .693 (xists only when a shell func-)-.15 F .034(tion is e)144 637.2 R -.15 (xe)-.15 G 2.534(cuting. Assignments).15 F(to)2.535 E F3(FUNCN)2.535 E (AME)-.18 E F0(ha)2.285 E .335 -.15(ve n)-.2 H 2.535(oe).15 G -.25(ff) -2.535 G .035(ect and return an error status.).25 F(If)5.035 E F3(FUNC-) 2.535 E -.18(NA)144 649.2 S(ME).18 E F0 (is unset, it loses its special properties, e)2.25 E -.15(ve)-.25 G 2.5 (ni).15 G 2.5(fi)-2.5 G 2.5(ti)-2.5 G 2.5(ss)-2.5 G(ubsequently reset.) -2.5 E F1(GR)108 666 Q(OUPS)-.3 E F0 1.229(An array v)144 678 R 1.228(a\ riable containing the list of groups of which the current user is a mem\ ber)-.25 F 6.228(.A)-.55 G(ssign-)-6.228 E .596(ments to)144 690 R F3 (GR)3.096 E(OUPS)-.27 E F0(ha)2.847 E .897 -.15(ve n)-.2 H 3.097(oe).15 G -.25(ff)-3.097 G .597(ect and return an error status.).25 F(If)5.597 E F3(GR)3.097 E(OUPS)-.27 E F0 .597(is unset, it loses its spe-)2.847 F (cial properties, e)144 702 Q -.15(ve)-.25 G 2.5(ni).15 G 2.5(fi)-2.5 G 2.5(ti)-2.5 G 2.5(ss)-2.5 G(ubsequently reset.)-2.5 E(GNU Bash-2.05a)72 768 Q(2001 No)126.115 E -.15(ve)-.15 G(mber 13).15 E(8)190.545 E EP %%Page: 9 9 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\)) -.35 E/F1 10/Times-Bold@0 SF(HISTCMD)108 84 Q F0 .356 (The history number)144 96 R 2.856(,o)-.4 G 2.856(ri)-2.856 G(nde)-2.856 E 2.856(xi)-.15 G 2.856(nt)-2.856 G .356 (he history list, of the current command.)-2.856 F(If)5.356 E/F2 9 /Times-Bold@0 SF(HISTCMD)2.855 E F0 .355(is unset, it)2.605 F (loses its special properties, e)144 108 Q -.15(ve)-.25 G 2.5(ni).15 G 2.5(fi)-2.5 G 2.5(ti)-2.5 G 2.5(ss)-2.5 G(ubsequently reset.)-2.5 E F1 (HOSTN)108 124.8 Q(AME)-.2 E F0 (Automatically set to the name of the current host.)144 136.8 Q F1 (HOSTTYPE)108 153.6 Q F0 .222(Automatically set to a string that unique\ ly describes the type of machine on which)144 165.6 R F1(bash)2.723 E F0 .223(is e)2.723 F -.15(xe)-.15 G(cut-).15 E 2.5(ing. The)144 177.6 R (def)2.5 E(ault is system-dependent.)-.1 E F1(LINENO)108 194.4 Q F0 1.408(Each time this parameter is referenced, the shell substitutes a d\ ecimal number representing the)144 206.4 R .078(current sequential line\ number \(starting with 1\) within a script or function.)144 218.4 R .079(When not in a script or)5.078 F .307(function, the v)144 230.4 R .307(alue substituted is not guaranteed to be meaningful.)-.25 F(If) 5.306 E F2(LINENO)2.806 E F0 .306(is unset, it loses its)2.556 F (special properties, e)144 242.4 Q -.15(ve)-.25 G 2.5(ni).15 G 2.5(fi) -2.5 G 2.5(ti)-2.5 G 2.5(ss)-2.5 G(ubsequently reset.)-2.5 E F1(MA)108 259.2 Q(CHTYPE)-.55 E F0 .898(Automatically set to a string that fully \ describes the system type on which)144 271.2 R F1(bash)3.398 E F0 .899 (is e)3.398 F -.15(xe)-.15 G .899(cuting, in).15 F(the standard GNU)144 283.2 Q/F3 10/Times-Italic@0 SF(cpu-company-system)2.5 E F0 2.5 (format. The)2.5 F(def)2.5 E(ault is system-dependent.)-.1 E F1(OLDPWD) 108 300 Q F0(The pre)144 312 Q(vious w)-.25 E (orking directory as set by the)-.1 E F1(cd)2.5 E F0(command.)2.5 E F1 (OPT)108 328.8 Q(ARG)-.9 E F0 1.627(The v)144 340.8 R 1.627 (alue of the last option ar)-.25 F 1.627(gument processed by the)-.18 F F1(getopts)4.127 E F0 -.2(bu)4.127 G 1.626(iltin command \(see).2 F F2 (SHELL)4.126 E -.09(BU)144 352.8 S(IL).09 E(TIN COMMANDS)-.828 E F0 (belo)2.25 E(w\).)-.25 E F1(OPTIND)108 369.6 Q F0 1.651(The inde)144 381.6 R 4.151(xo)-.15 G 4.151(ft)-4.151 G 1.651(he ne)-4.151 F 1.651 (xt ar)-.15 F 1.652(gument to be processed by the)-.18 F F1(getopts) 4.152 E F0 -.2(bu)4.152 G 1.652(iltin command \(see).2 F F2(SHELL)4.152 E -.09(BU)144 393.6 S(IL).09 E(TIN COMMANDS)-.828 E F0(belo)2.25 E(w\).) -.25 E F1(OSTYPE)108 410.4 Q F0 .329(Automatically set to a string that\ describes the operating system on which)144 422.4 R F1(bash)2.829 E F0 .329(is e)2.829 F -.15(xe)-.15 G 2.829(cuting. The).15 F(def)144 434.4 Q (ault is system-dependent.)-.1 E F1(PIPEST)108 451.2 Q -.95(AT)-.9 G(US) .95 E F0 .61(An array v)144 463.2 R .61(ariable \(see)-.25 F F1(Arrays) 3.11 E F0(belo)3.11 E .61(w\) containing a list of e)-.25 F .61 (xit status v)-.15 F .61(alues from the processes in)-.25 F (the most-recently-e)144 475.2 Q -.15(xe)-.15 G(cuted fore).15 E (ground pipeline \(which may contain only a single command\).)-.15 E F1 (PPID)108 492 Q F0(The process ID of the shell')12.67 E 2.5(sp)-.55 G 2.5(arent. This)-2.5 F -.25(va)2.5 G(riable is readonly).25 E(.)-.65 E F1(PWD)108 508.8 Q F0(The current w)12.67 E (orking directory as set by the)-.1 E F1(cd)2.5 E F0(command.)2.5 E F1 (RANDOM)108 525.6 Q F0 .566 (Each time this parameter is referenced, a random inte)144 537.6 R .565 (ger between 0 and 32767 is generated.)-.15 F(The)5.565 E .01 (sequence of random numbers may be initialized by assigning a v)144 549.6 R .01(alue to)-.25 F F2(RANDOM)2.51 E/F4 9/Times-Roman@0 SF(.)A F0 (If)4.51 E F2(RANDOM)2.51 E F0(is)2.26 E (unset, it loses its special properties, e)144 561.6 Q -.15(ve)-.25 G 2.5(ni).15 G 2.5(fi)-2.5 G 2.5(ti)-2.5 G 2.5(ss)-2.5 G (ubsequently reset.)-2.5 E F1(REPL)108 578.4 Q(Y)-.92 E F0 (Set to the line of input read by the)144 590.4 Q F1 -.18(re)2.5 G(ad) .18 E F0 -.2(bu)2.5 G(iltin command when no ar).2 E (guments are supplied.)-.18 E F1(SECONDS)108 607.2 Q F0 .795(Each time \ this parameter is referenced, the number of seconds since shell in)144 619.2 R -.2(vo)-.4 G .795(cation is returned.).2 F .712(If a v)144 631.2 R .712(alue is assigned to)-.25 F F2(SECONDS)3.212 E F4(,)A F0 .712 (the v)2.962 F .712 (alue returned upon subsequent references is the number)-.25 F .408 (of seconds since the assignment plus the v)144 643.2 R .408 (alue assigned.)-.25 F(If)5.408 E F2(SECONDS)2.908 E F0 .407 (is unset, it loses its special)2.658 F(properties, e)144 655.2 Q -.15 (ve)-.25 G 2.5(ni).15 G 2.5(fi)-2.5 G 2.5(ti)-2.5 G 2.5(ss)-2.5 G (ubsequently reset.)-2.5 E F1(SHELLOPTS)108 672 Q F0 3.262(Ac)144 684 S .763(olon-separated list of enabled shell options.)-3.262 F .763(Each w) 5.763 F .763(ord in the list is a v)-.1 F .763(alid ar)-.25 F .763 (gument for the)-.18 F F1144 696 Q F0 1.174(option to the)3.674 F F1(set)3.674 E F0 -.2(bu)3.674 G 1.174(iltin command \(see).2 F F2 1.173 (SHELL B)3.673 F(UIL)-.09 E 1.173(TIN COMMANDS)-.828 F F0(belo)3.423 E 3.673(w\). The)-.25 F(options)3.673 E .046(appearing in)144 708 R F2 (SHELLOPTS)2.546 E F0 .047(are those reported as)2.297 F F3(on)2.547 E F0(by)2.547 E F1 .047(set \255o)2.547 F F0 5.047(.I)C 2.547(ft)-5.047 G .047(his v)-2.547 F .047(ariable is in the en)-.25 F(vironment)-.4 E (when)144 720 Q F1(bash)3.142 E F0 .642(starts up, each shell option in\ the list will be enabled before reading an)3.142 F 3.141(ys)-.15 G .641 (tartup \214les.)-3.141 F(GNU Bash-2.05a)72 768 Q(2001 No)126.115 E -.15 (ve)-.15 G(mber 13).15 E(9)190.545 E EP %%Page: 10 10 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\)) -.35 E(This v)144 84 Q(ariable is read-only)-.25 E(.)-.65 E/F1 10 /Times-Bold@0 SF(SHL)108 100.8 Q(VL)-.92 E F0 (Incremented by one each time an instance of)144 112.8 Q F1(bash)2.5 E F0(is started.)2.5 E F1(UID)108 129.6 Q F0 (Expands to the user ID of the current user)17.67 E 2.5(,i)-.4 G (nitialized at shell startup.)-2.5 E(This v)5 E(ariable is readonly)-.25 E(.)-.65 E .993(The follo)108 146.4 R .993(wing v)-.25 F .994 (ariables are used by the shell.)-.25 F .994(In some cases,)5.994 F F1 (bash)3.494 E F0 .994(assigns a def)3.494 F .994(ault v)-.1 F .994 (alue to a v)-.25 F(ariable;)-.25 E(these cases are noted belo)108 158.4 Q -.65(w.)-.25 G F1 -.3(BA)108 175.2 S(SH_ENV).3 E F0 .506 (If this parameter is set when)144 187.2 R F1(bash)3.006 E F0 .506(is e) 3.006 F -.15(xe)-.15 G .505(cuting a shell script, its v).15 F .505 (alue is interpreted as a \214lename)-.25 F .354 (containing commands to initialize the shell, as in)144 199.2 R/F2 10 /Times-Italic@0 SF(~/.bashr)2.855 E(c)-.37 E F0 5.355(.T).31 G .355 (he v)-5.355 F .355(alue of)-.25 F/F3 9/Times-Bold@0 SF -.27(BA)2.855 G (SH_ENV).27 E F0 .355(is subjected)2.605 F .525(to parameter e)144 211.2 R .525(xpansion, command substitution, and arithmetic e)-.15 F .525 (xpansion before being interpreted)-.15 F(as a \214le name.)144 223.2 Q F3 -.666(PA)5 G(TH)-.189 E F0 (is not used to search for the resultant \214le name.)2.25 E F1(CDP)108 235.2 Q -.95(AT)-.74 G(H).95 E F0 1.247(The search path for the)144 247.2 R F1(cd)3.747 E F0 3.747(command. This)3.747 F 1.248 (is a colon-separated list of directories in which the)3.747 F (shell looks for destination directories speci\214ed by the)144 259.2 Q F1(cd)2.5 E F0 2.5(command. A)2.5 F(sample v)2.5 E(alue is `)-.25 E (`.:~:/usr')-.74 E('.)-.74 E F1(COLUMNS)108 271.2 Q F0 .425(Used by the) 144 283.2 R F1(select)2.925 E F0 -.2(bu)2.925 G .425(iltin command to d\ etermine the terminal width when printing selection lists.).2 F (Automatically set upon receipt of a SIGWINCH.)144 295.2 Q F1(COMPREPL) 108 307.2 Q(Y)-.92 E F0 .847(An array v)144 319.2 R .848 (ariable from which)-.25 F F1(bash)3.348 E F0 .848 (reads the possible completions generated by a shell function)3.348 F (in)144 331.2 Q -.2(vo)-.4 G -.1(ke).2 G 2.5(db).1 G 2.5(yt)-2.5 G (he programmable completion f)-2.5 E(acility \(see)-.1 E F1(Pr)2.5 E (ogrammable Completion)-.18 E F0(belo)2.5 E(w\).)-.25 E F1(FCEDIT)108 343.2 Q F0(The def)144 355.2 Q(ault editor for the)-.1 E F1(fc)2.5 E F0 -.2(bu)2.5 G(iltin command.).2 E F1(FIGNORE)108 367.2 Q F0 2.599(Ac)144 379.2 S .098(olon-separated list of suf)-2.599 F<8c78>-.25 E .098 (es to ignore when performing \214lename completion \(see)-.15 F F3 (READLINE)2.598 E F0(belo)144 391.2 Q 2.704(w\). A)-.25 F .204 (\214lename whose suf)2.704 F .205(\214x matches one of the entries in) -.25 F F3(FIGNORE)2.705 E F0 .205(is e)2.455 F .205 (xcluded from the list)-.15 F(of matched \214lenames.)144 403.2 Q 2.5 (As)5 G(ample v)-2.5 E(alue is `)-.25 E(`.o:~')-.74 E('.)-.74 E F1 (GLOBIGNORE)108 415.2 Q F0 3.118(Ac)144 427.2 S .618(olon-separated lis\ t of patterns de\214ning the set of \214lenames to be ignored by pathna\ me e)-3.118 F(xpan-)-.15 E 3.131(sion. If)144 439.2 R 3.132<618c>3.131 G .632(lename matched by a pathname e)-3.132 F .632 (xpansion pattern also matches one of the patterns in)-.15 F F3 (GLOBIGNORE)144 451.2 Q/F4 9/Times-Roman@0 SF(,)A F0(it is remo)2.25 E -.15(ve)-.15 G 2.5(df).15 G(rom the list of matches.)-2.5 E F1 (HISTCONTR)108 463.2 Q(OL)-.3 E F0 .881(If set to a v)144 475.2 R .881 (alue of)-.25 F F2(ignor)3.381 E(espace)-.37 E F0 3.381(,l).18 G .881 (ines which be)-3.381 F .881(gin with a)-.15 F F1(space)3.38 E F0 .88 (character are not entered on the)3.38 F .401(history list.)144 487.2 R .401(If set to a v)5.401 F .401(alue of)-.25 F F2(ignor)2.901 E(edups) -.37 E F0 2.901(,l).27 G .401 (ines matching the last history line are not entered.)-2.901 F(A)5.402 E -.25(va)144 499.2 S 1.304(lue of).25 F F2(ignor)3.804 E(eboth)-.37 E F0 1.304(combines the tw)3.804 F 3.804(oo)-.1 G 3.804(ptions. If)-3.804 F 1.303(unset, or if set to an)3.804 F 3.803(yo)-.15 G 1.303(ther v)-3.803 F 1.303(alue than those)-.25 F(abo)144 511.2 Q -.15(ve)-.15 G 3.38(,a) .15 G .88(ll lines read by the parser are sa)-3.38 F -.15(ve)-.2 G 3.38 (do).15 G 3.38(nt)-3.38 G .88(he history list, subject to the v)-3.38 F .88(alue of)-.25 F F1(HISTIG-)3.38 E(NORE)144 523.2 Q F0 6.101(.T)C 1.101(his v)-6.101 F(ariable')-.25 E 3.601(sf)-.55 G 1.101 (unction is superseded by)-3.601 F F1(HISTIGNORE)3.601 E F0 6.101(.T)C 1.101(he second and subsequent)-6.101 F .339(lines of a multi-line comp\ ound command are not tested, and are added to the history re)144 535.2 R -.05(ga)-.15 G .34(rdless of).05 F(the v)144 547.2 Q(alue of)-.25 E F1 (HISTCONTR)2.5 E(OL)-.3 E F0(.)A F1(HISTFILE)108 559.2 Q F0 .181 (The name of the \214le in which command history is sa)144 571.2 R -.15 (ve)-.2 G 2.681(d\().15 G(see)-2.681 E F3(HIST)2.681 E(OR)-.162 E(Y) -.315 E F0(belo)2.431 E 2.681(w\). The)-.25 F(def)2.681 E .181(ault v) -.1 F(alue)-.25 E(is)144 583.2 Q F2(~/.bash_history)2.5 E F0 5(.I)C 2.5 (fu)-5 G(nset, the command history is not sa)-2.5 E -.15(ve)-.2 G 2.5 (dw).15 G(hen an interacti)-2.5 E .3 -.15(ve s)-.25 H(hell e).15 E (xits.)-.15 E F1(HISTFILESIZE)108 595.2 Q F0 1.622 (The maximum number of lines contained in the history \214le.)144 607.2 R 1.623(When this v)6.623 F 1.623(ariable is assigned a)-.25 F -.25(va) 144 619.2 S .311(lue, the history \214le is truncated, if necessary).25 F 2.811(,t)-.65 G 2.811(oc)-2.811 G .311 (ontain no more than that number of lines.)-2.811 F(The)5.311 E(def)144 631.2 Q .386(ault v)-.1 F .386(alue is 500.)-.25 F .387(The history \ \214le is also truncated to this size after writing it when an interac-) 5.386 F(ti)144 643.2 Q .3 -.15(ve s)-.25 H(hell e).15 E(xits.)-.15 E F1 (HISTIGNORE)108 655.2 Q F0 2.658(Ac)144 667.2 S .158(olon-separated lis\ t of patterns used to decide which command lines should be sa)-2.658 F -.15(ve)-.2 G 2.657(do).15 G 2.657(nt)-2.657 G .157(he his-)-2.657 F .707(tory list.)144 679.2 R .707(Each pattern is anchored at the be) 5.707 F .708(ginning of the line and must match the complete line)-.15 F .626(\(no implicit `)144 691.2 R F1(*)A F0 3.126('i)C 3.126(sa)-3.126 G 3.126(ppended\). Each)-3.126 F .626(pattern is tested ag)3.126 F .625 (ainst the line after the checks speci\214ed by)-.05 F F1(HISTCONTR)144 703.2 Q(OL)-.3 E F0 1.154(are applied.)3.654 F 1.154 (In addition to the normal shell pattern matching characters, `)6.154 F F1(&)A F0(')A 2.515(matches the pre)144 715.2 R 2.515 (vious history line.)-.25 F(`)7.514 E F1(&)A F0 5.014('m)C 2.514 (ay be escaped using a backslash; the backslash is)-5.014 F(remo)144 727.2 Q -.15(ve)-.15 G 3.352(db).15 G .852(efore attempting a match.) -3.352 F .852(The second and subsequent lines of a multi-line compound) 5.852 F(GNU Bash-2.05a)72 768 Q(2001 No)126.115 E -.15(ve)-.15 G (mber 13).15 E(10)185.545 E EP %%Page: 11 11 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\)) -.35 E(command are not tested, and are added to the history re)144 84 Q -.05(ga)-.15 G(rdless of the v).05 E(alue of)-.25 E/F1 10/Times-Bold@0 SF(HISTIGNORE)2.5 E F0(.)A F1(HISTSIZE)108 96 Q F0 1.942 (The number of commands to remember in the command history \(see)144 108 R/F2 9/Times-Bold@0 SF(HIST)4.442 E(OR)-.162 E(Y)-.315 E F0(belo)4.192 E 4.442(w\). The)-.25 F(def)144 120 Q(ault v)-.1 E(alue is 500.)-.25 E F1 (HOME)108 132 Q F0 1.27(The home directory of the current user; the def) 144 144 R 1.27(ault ar)-.1 F 1.27(gument for the)-.18 F F1(cd)3.77 E F0 -.2(bu)3.77 G 1.27(iltin command.).2 F(The)6.27 E -.25(va)144 156 S (lue of this v).25 E(ariable is also used when performing tilde e)-.25 E (xpansion.)-.15 E F1(HOSTFILE)108 168 Q F0 1.015 (Contains the name of a \214le in the same format as)144 180 R/F3 10 /Times-Italic@0 SF(/etc/hosts)5.181 E F0 1.015 (that should be read when the shell)5.181 F .55 (needs to complete a hostname.)144 192 R .551 (The list of possible hostname completions may be changed while)5.551 F 1.059(the shell is running; the ne)144 204 R 1.059 (xt time hostname completion is attempted after the v)-.15 F 1.058 (alue is changed,)-.25 F F1(bash)144 216 Q F0 .715 (adds the contents of the ne)3.215 F 3.215<778c>-.25 G .715(le to the e) -3.215 F .715(xisting list.)-.15 F(If)5.716 E F2(HOSTFILE)3.216 E F0 .716(is set, b)2.966 F .716(ut has no v)-.2 F(alue,)-.25 E F1(bash)144 228 Q F0 2.236(attempts to read)4.736 F F3(/etc/hosts)6.401 E F0 2.235 (to obtain the list of possible hostname completions.)6.401 F(When)7.235 E F2(HOSTFILE)144 240 Q F0(is unset, the hostname list is cleared.)2.25 E F1(IFS)108 252 Q F0(The)20.44 E F3 .637(Internal F)3.137 F .637 (ield Separ)-.45 F(ator)-.15 E F0 .637(that is used for w)3.137 F .638 (ord splitting after e)-.1 F .638(xpansion and to split lines into)-.15 F -.1(wo)144 264 S(rds with the).1 E F1 -.18(re)2.5 G(ad).18 E F0 -.2 (bu)2.5 G(iltin command.).2 E(The def)5 E(ault v)-.1 E(alue is `)-.25 E (`')-.25 E('.)-.74 E F1(IGNOREEOF)108 276 Q F0 .503(Controls the action of an interacti)144 288 R .803 -.15(ve s) -.25 H .503(hell on receipt of an).15 F F2(EOF)3.003 E F0 .503 (character as the sole input.)2.753 F .503(If set,)5.503 F .426(the v) 144 300 R .426(alue is the number of consecuti)-.25 F -.15(ve)-.25 G F2 (EOF)3.076 E F0 .426 (characters which must be typed as the \214rst characters)2.676 F .303 (on an input line before)144 312 R F1(bash)2.802 E F0 -.15(ex)2.802 G 2.802(its. If).15 F .302(the v)2.802 F .302(ariable e)-.25 F .302 (xists b)-.15 F .302(ut does not ha)-.2 F .602 -.15(ve a n)-.2 H .302 (umeric v).15 F .302(alue, or has)-.25 F(no v)144 324 Q(alue, the def) -.25 E(ault v)-.1 E(alue is 10.)-.25 E(If it does not e)5 E(xist,)-.15 E F2(EOF)2.5 E F0(signi\214es the end of input to the shell.)2.25 E F1 (INPUTRC)108 336 Q F0 1.435(The \214lename for the)144 348 R F1 -.18(re) 3.936 G(adline).18 E F0 1.436(startup \214le, o)3.936 F -.15(ve)-.15 G 1.436(rriding the def).15 F 1.436(ault of)-.1 F F3(~/.inputr)5.602 E(c) -.37 E F0(\(see)5.602 E F2(READLINE)3.936 E F0(belo)144 360 Q(w\).)-.25 E F1(LANG)108 372 Q F0 1.24(Used to determine the locale cate)7.11 F 1.239(gory for an)-.15 F 3.739(yc)-.15 G(ate)-3.739 E 1.239 (gory not speci\214cally selected with a v)-.15 F(ariable)-.25 E (starting with)144 384 Q F1(LC_)2.5 E F0(.)A F1(LC_ALL)108 396 Q F0 .764 (This v)144 408 R .764(ariable o)-.25 F -.15(ve)-.15 G .764 (rrides the v).15 F .764(alue of)-.25 F F1(LANG)3.264 E F0 .764(and an) 3.264 F 3.264(yo)-.15 G(ther)-3.264 E F1(LC_)3.264 E F0 -.25(va)3.264 G .764(riable specifying a locale cate-).25 F(gory)144 420 Q(.)-.65 E F1 (LC_COLLA)108 432 Q(TE)-.95 E F0 .412(This v)144 444 R .412(ariable det\ ermines the collation order used when sorting the results of pathname e) -.25 F(xpansion,)-.15 E 1.464(and determines the beha)144 456 R 1.464 (vior of range e)-.2 F 1.465(xpressions, equi)-.15 F -.25(va)-.25 G 1.465(lence classes, and collating sequences).25 F(within pathname e)144 468 Q(xpansion and pattern matching.)-.15 E F1(LC_CTYPE)108 480 Q F0 1.936(This v)144 492 R 1.936 (ariable determines the interpretation of characters and the beha)-.25 F 1.935(vior of character classes)-.2 F(within pathname e)144 504 Q (xpansion and pattern matching.)-.15 E F1(LC_MESSA)108 516 Q(GES)-.55 E F0(This v)144 528 Q(ariable determines the locale used to translate dou\ ble-quoted strings preceded by a)-.25 E F1($)2.5 E F0(.)A F1(LC_NUMERIC) 108 540 Q F0(This v)144 552 Q(ariable determines the locale cate)-.25 E (gory used for number formatting.)-.15 E F1(LINES)108 564 Q F0 1.218 (Used by the)5.99 F F1(select)3.718 E F0 -.2(bu)3.718 G 1.219(iltin com\ mand to determine the column length for printing selection lists.).2 F (Automatically set upon receipt of a SIGWINCH.)144 576 Q F1(MAIL)108 588 Q F0 .188(If this parameter is set to a \214le name and the)8.78 F F2 (MAILP)2.687 E -.855(AT)-.666 G(H).855 E F0 -.25(va)2.437 G .187 (riable is not set,).25 F F1(bash)2.687 E F0 .187(informs the user)2.687 F(of the arri)144 600 Q -.25(va)-.25 G 2.5(lo).25 G 2.5(fm)-2.5 G (ail in the speci\214ed \214le.)-2.5 E F1(MAILCHECK)108 612 Q F0 .098 (Speci\214es ho)144 624 R 2.598(wo)-.25 G .098(ften \(in seconds\)) -2.598 F F1(bash)2.598 E F0 .098(checks for mail.)2.598 F .098(The def) 5.098 F .098(ault is 60 seconds.)-.1 F .099(When it is time)5.099 F .224 (to check for mail, the shell does so before displaying the primary pro\ mpt.)144 636 R .223(If this v)5.223 F .223(ariable is unset,)-.25 F .066 (or set to a v)144 648 R .066(alue that is not a number greater than or\ equal to zero, the shell disables mail checking.)-.25 F F1(MAILP)108 660 Q -.95(AT)-.74 G(H).95 E F0 2.815(Ac)144 672 S .314 (olon-separated list of \214le names to be check)-2.815 F .314 (ed for mail.)-.1 F .314(The message to be printed when mail)5.314 F (arri)144 684 Q -.15(ve)-.25 G 3.42(si).15 G 3.42(nap)-3.42 G .92(artic\ ular \214le may be speci\214ed by separating the \214le name from the m\ essage with a)-3.42 F 2.808(`?'. When)144 696 R .308(used in the te) 2.808 F .308(xt of the message,)-.15 F F1($_)2.808 E F0 -.15(ex)2.808 G .308(pands to the name of the current mail\214le.).15 F(Exam-)5.307 E (ple:)144 708 Q F1(MAILP)144 720 Q -.95(AT)-.74 G(H).95 E F0(='/v)A (ar/mail/bfox?"Y)-.25 E(ou ha)-1.1 E .3 -.15(ve m)-.2 H (ail":~/shell\255mail?"$_ has mail!"').15 E(GNU Bash-2.05a)72 768 Q (2001 No)126.115 E -.15(ve)-.15 G(mber 13).15 E(11)185.545 E EP %%Page: 12 12 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\)) -.35 E/F1 10/Times-Bold@0 SF(Bash)144 84 Q F0 .388(supplies a def)2.888 F .388(ault v)-.1 F .388(alue for this v)-.25 F .388(ariable, b)-.25 F .389(ut the location of the user mail \214les that it uses is)-.2 F (system dependent \(e.g., /v)144 96 Q(ar/mail/)-.25 E F1($USER)A F0(\).) A F1(OPTERR)108 108 Q F0 .39(If set to the v)144 120 R .39(alue 1,)-.25 F F1(bash)2.89 E F0 .389(displays error messages generated by the)2.889 F F1(getopts)2.889 E F0 -.2(bu)2.889 G .389(iltin command \(see).2 F/F2 9/Times-Bold@0 SF .359(SHELL B)144 132 R(UIL)-.09 E .359(TIN COMMANDS) -.828 F F0(belo)2.609 E(w\).)-.25 E F2(OPTERR)5.359 E F0 .36 (is initialized to 1 each time the shell is in)2.609 F -.2(vo)-.4 G -.1 (ke).2 G(d).1 E(or a shell script is e)144 144 Q -.15(xe)-.15 G(cuted.) .15 E F1 -.74(PA)108 156 S(TH)-.21 E F0 .588 (The search path for commands.)9.91 F .587 (It is a colon-separated list of directories in which the shell looks) 5.588 F .421(for commands \(see)144 168 R F2 .422(COMMAND EXECUTION) 2.922 F F0(belo)2.672 E 2.922(w\). The)-.25 F(def)2.922 E .422 (ault path is system-dependent, and)-.1 F 12.209 (is set by the administrator who installs)144 180 R F1(bash)14.709 E F0 17.209(.A)C 12.209(common v)-2.5 F 12.209(alue is)-.25 F/F3 10/Courier@0 SF(/usr/gnu/bin:/usr/local/bin:/usr/ucb:/bin:/usr/bin:.)144 192 Q F0(.)A F1(POSIXL)108 204 Q(Y_CORRECT)-.92 E F0 .471(If this v)144 216 R .471 (ariable is in the en)-.25 F .471(vironment when)-.4 F F1(bash)2.971 E F0 .471(starts, the shell enters)2.971 F/F4 10/Times-Italic@0 SF .472 (posix mode)2.972 F F0 .472(before reading)2.972 F .011 (the startup \214les, as if the)144 228 R F1(\255\255posix)2.511 E F0 (in)2.511 E -.2(vo)-.4 G .011(cation option had been supplied.).2 F .011 (If it is set while the shell is)5.011 F(running,)144 240 Q F1(bash)2.5 E F0(enables)2.5 E F4(posix mode)2.5 E F0 2.5(,a)C 2.5(si)-2.5 G 2.5(ft) -2.5 G(he command)-2.5 E F3(set -o posix)2.5 E F0(had been e)2.5 E -.15 (xe)-.15 G(cuted.).15 E F1(PR)108 252 Q(OMPT_COMMAND)-.3 E F0 (If set, the v)144 264 Q(alue is e)-.25 E -.15(xe)-.15 G (cuted as a command prior to issuing each primary prompt.).15 E F1(PS1) 108 276 Q F0 .064(The v)19.33 F .065(alue of this parameter is e)-.25 F .065(xpanded \(see)-.15 F F2(PR)2.565 E(OMPTING)-.27 E F0(belo)2.315 E .065(w\) and used as the primary prompt)-.25 F 2.5(string. The)144 288 R (def)2.5 E(ault v)-.1 E(alue is `)-.25 E(`)-.74 E F1(\\s\255\\v\\$)A F0 -.74('')2.5 G(.).74 E F1(PS2)108 300 Q F0 .005(The v)19.33 F .005 (alue of this parameter is e)-.25 F .005(xpanded as with)-.15 F F1(PS1) 2.505 E F0 .004(and used as the secondary prompt string.)2.505 F(The) 5.004 E(def)144 312 Q(ault is `)-.1 E(`)-.74 E F1(>)A F0 -.74('')2.5 G (.).74 E F1(PS3)108 324 Q F0 1.115(The v)19.33 F 1.115 (alue of this parameter is used as the prompt for the)-.25 F F1(select) 3.615 E F0 1.116(command \(see)3.616 F F2 1.116(SHELL GRAM-)3.616 F(MAR) 144 336 Q F0(abo)2.25 E -.15(ve)-.15 G(\).).15 E F1(PS4)108 348 Q F0 1.099(The v)19.33 F 1.099(alue of this parameter is e)-.25 F 1.099 (xpanded as with)-.15 F F1(PS1)3.599 E F0 1.099(and the v)3.599 F 1.098 (alue is printed before each com-)-.25 F(mand)144 360 Q F1(bash)3.725 E F0 1.225(displays during an e)3.725 F -.15(xe)-.15 G 1.225 (cution trace.).15 F 1.226(The \214rst character of)6.225 F F2(PS4)3.726 E F0 1.226(is replicated multiple)3.476 F(times, as necessary)144 372 Q 2.5(,t)-.65 G 2.5(oi)-2.5 G(ndicate multiple le)-2.5 E -.15(ve)-.25 G (ls of indirection.).15 E(The def)5 E(ault is `)-.1 E(`)-.74 E F1(+)A F0 -.74('')2.5 G(.).74 E F1(TIMEFORMA)108 384 Q(T)-.95 E F0 .827(The v)144 396 R .826 (alue of this parameter is used as a format string specifying ho)-.25 F 3.326(wt)-.25 G .826(he timing information for)-3.326 F .648 (pipelines pre\214x)144 408 R .648(ed with the)-.15 F F1(time)3.148 E F0 (reserv)3.148 E .648(ed w)-.15 F .649(ord should be displayed.)-.1 F (The)5.649 E F1(%)3.149 E F0 .649(character introduces)3.149 F .712 (an escape sequence that is e)144 420 R .711(xpanded to a time v)-.15 F .711(alue or other information.)-.25 F .711(The escape sequences)5.711 F (and their meanings are as follo)144 432 Q (ws; the braces denote optional portions.)-.25 E F1(%%)144 450 Q F0 2.5 (Al)30 G(iteral)-2.5 E F1(%)2.5 E F0(.)A F1(%[)144 462 Q F4(p)A F1 (][l]R)A F0(The elapsed time in seconds.)11.68 E F1(%[)144 474 Q F4(p)A F1(][l]U)A F0(The number of CPU seconds spent in user mode.)11.68 E F1 (%[)144 486 Q F4(p)A F1(][l]S)A F0 (The number of CPU seconds spent in system mode.)13.34 E F1(%P)144 498 Q F0(The CPU percentage, computed as \(%U + %S\) / %R.)33.89 E .87 (The optional)144 514.8 R F4(p)3.37 E F0 .87(is a digit specifying the) 3.37 F F4(pr)3.37 E(ecision)-.37 E F0 3.37(,t)C .87 (he number of fractional digits after a decimal)-3.37 F 2.526(point. A) 144 526.8 R -.25(va)2.526 G .025 (lue of 0 causes no decimal point or fraction to be output.).25 F .025 (At most three places after the)5.025 F .537 (decimal point may be speci\214ed; v)144 538.8 R .537(alues of)-.25 F F4 (p)3.037 E F0 .537(greater than 3 are changed to 3.)3.037 F(If)5.538 E F4(p)3.038 E F0 .538(is not speci\214ed,)3.038 F(the v)144 550.8 Q (alue 3 is used.)-.25 E .668(The optional)144 567.6 R F1(l)3.168 E F0 .668(speci\214es a longer format, including minutes, of the form)3.168 F F4(MM)3.168 E F0(m)A F4(SS)A F0(.)A F4(FF)A F0 3.167(s. The)B -.25(va) 3.167 G(lue).25 E(of)144 579.6 Q F4(p)2.5 E F0 (determines whether or not the fraction is included.)2.5 E 13.364 (If this v)144 596.4 R 13.364(ariable is not set,)-.25 F F1(bash)15.865 E F0 13.365(acts as if it had the v)15.865 F(alue)-.25 E F1($'\\nr)144 608.4 Q(eal\\t%3lR\\nuser\\t%3lU\\nsys%3lS')-.18 E F0 5.031(.I)C 2.531 (ft)-5.031 G .031(he v)-2.531 F .031 (alue is null, no timing information is displayed.)-.25 F 2.5(At)144 620.4 S(railing ne)-2.5 E (wline is added when the format string is displayed.)-.25 E F1(TMOUT)108 637.2 Q F0 1.112(If set to a v)144 649.2 R 1.112 (alue greater than zero, the v)-.25 F 1.113 (alue is interpreted as the number of seconds to w)-.25 F 1.113(ait for) -.1 F .558(input after issuing the primary prompt.)144 661.2 R F1(Bash) 5.558 E F0 .558(terminates after w)3.058 F .558 (aiting for that number of seconds)-.1 F(if input does not arri)144 673.2 Q -.15(ve)-.25 G(.).15 E F1(auto_r)108 690 Q(esume)-.18 E F0 .53 (This v)144 702 R .53(ariable controls ho)-.25 F 3.03(wt)-.25 G .531 (he shell interacts with the user and job control.)-3.03 F .531 (If this v)5.531 F .531(ariable is set,)-.25 F .539(single w)144 714 R .538(ord simple commands without redirections are treated as candidates\ for resumption of an)-.1 F -.15(ex)144 726 S .366(isting stopped job) .15 F 5.366(.T)-.4 G .366(here is no ambiguity allo)-5.366 F .366 (wed; if there is more than one job be)-.25 F .367(ginning with)-.15 F (GNU Bash-2.05a)72 768 Q(2001 No)126.115 E -.15(ve)-.15 G(mber 13).15 E (12)185.545 E EP %%Page: 13 13 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\)) -.35 E 1.157 (the string typed, the job most recently accessed is selected.)144 84 R (The)6.156 E/F1 10/Times-Italic@0 SF(name)3.656 E F0 1.156 (of a stopped job, in this)3.656 F(conte)144 96 Q 1.132 (xt, is the command line used to start it.)-.15 F 1.133(If set to the v) 6.133 F(alue)-.25 E F1 -.2(ex)3.633 G(act).2 E F0 3.633(,t).68 G 1.133 (he string supplied must)-3.633 F .625 (match the name of a stopped job e)144 108 R .624(xactly; if set to)-.15 F F1(substring)3.124 E F0 3.124(,t).22 G .624 (he string supplied needs to match a)-3.124 F .924 (substring of the name of a stopped job)144 120 R 5.924(.T)-.4 G(he) -5.924 E F1(substring)3.424 E F0 -.25(va)3.424 G .925(lue pro).25 F .925 (vides functionality analogous to)-.15 F(the)144 132 Q/F2 10 /Times-Bold@0 SF(%?)3.334 E F0 .834(job identi\214er \(see)5.834 F/F3 9 /Times-Bold@0 SF .834(JOB CONTR)3.334 F(OL)-.27 E F0(belo)3.084 E 3.334 (w\). If)-.25 F .834(set to an)3.334 F 3.334(yo)-.15 G .834(ther v) -3.334 F .833(alue, the supplied string)-.25 F .314 (must be a pre\214x of a stopped job')144 144 R 2.814(sn)-.55 G .314 (ame; this pro)-2.814 F .314(vides functionality analogous to the)-.15 F F2(%)2.814 E F0 .315(job iden-)2.815 F(ti\214er)144 156 Q(.)-.55 E F2 (histchars)108 172.8 Q F0 2.07(The tw)144 184.8 R 4.57(oo)-.1 G 4.57(rt) -4.57 G 2.07(hree characters which control history e)-4.57 F 2.07 (xpansion and tok)-.15 F 2.07(enization \(see)-.1 F F3(HIST)4.569 E(OR) -.162 E(Y)-.315 E(EXP)144 196.8 Q(ANSION)-.666 E F0(belo)3.465 E 3.715 (w\). The)-.25 F 1.215(\214rst character is the)3.715 F F1 1.216 (history e)3.715 F(xpansion)-.2 E F0(character)3.716 E 3.716(,t)-.4 G 1.216(he character which)-3.716 F .798(signals the start of a history e) 144 208.8 R .798(xpansion, normally `)-.15 F F2(!)A F0 3.298('. The)B .798(second character is the)3.298 F F1(quic)3.298 E 3.298(ks)-.2 G (ubstitu-)-3.298 E(tion)144 220.8 Q F0(character)2.739 E 2.739(,w)-.4 G .239(hich is used as shorthand for re-running the pre)-2.739 F .24 (vious command entered, substitut-)-.25 F .576 (ing one string for another in the command.)144 232.8 R .575(The def) 5.575 F .575(ault is `)-.1 F F2(^)A F0 3.075('. The)B .575 (optional third character is the)3.075 F .223(character which indicates\ that the remainder of the line is a comment when found as the \214rst \ char)144 244.8 R(-)-.2 E 1.294(acter of a w)144 256.8 R 1.294 (ord, normally `)-.1 F F2(#)A F0 3.794('. The)B 1.293 (history comment character causes history substitution to be)3.794 F .379(skipped for the remaining w)144 268.8 R .379(ords on the line.)-.1 F .38(It does not necessarily cause the shell parser to treat)5.379 F (the rest of the line as a comment.)144 280.8 Q F2(Arrays)87 297.6 Q (Bash)108 309.6 Q F0(pro)2.958 E .458(vides one-dimensional array v)-.15 F 2.958(ariables. An)-.25 F 2.958(yv)-.15 G .458 (ariable may be used as an array; the)-3.208 F F2(declar)2.958 E(e)-.18 E F0 -.2(bu)2.958 G(iltin).2 E .96(will e)108 321.6 R .96 (xplicitly declare an array)-.15 F 5.96(.T)-.65 G .961 (here is no maximum limit on the size of an array)-5.96 F 3.461(,n)-.65 G .961(or an)-3.461 F 3.461(yr)-.15 G(equirement)-3.461 E (that members be inde)108 333.6 Q -.15(xe)-.15 G 2.5(do).15 G 2.5(ra) -2.5 G(ssigned contiguously)-2.5 E 5(.A)-.65 G(rrays are inde)-5 E -.15 (xe)-.15 G 2.5(du).15 G(sing inte)-2.5 E(gers and are zero-based.)-.15 E 1.302(An array is created automatically if an)108 350.4 R 3.801(yv)-.15 G 1.301(ariable is assigned to using the syntax)-4.051 F F1(name)3.801 E F0([)A F1(subscript)A F0(]=)A F1(value)A F0(.)A(The)108 362.4 Q F1 (subscript)2.898 E F0 .398(is treated as an arithmetic e)2.898 F .398 (xpression that must e)-.15 F -.25(va)-.25 G .399 (luate to a number greater than or equal to).25 F 4.077(zero. T)108 374.4 R 4.077(oe)-.8 G 1.577(xplicitly declare an array)-4.227 F 4.077 (,u)-.65 G(se)-4.077 E F2(declar)4.077 E 4.077<65ad>-.18 G(a)-4.077 E F1 (name)4.077 E F0(\(see)4.077 E F3 1.577(SHELL B)4.077 F(UIL)-.09 E 1.576 (TIN COMMANDS)-.828 F F0(belo)3.826 E(w\).)-.25 E F2(declar)108 386.4 Q 3.375<65ad>-.18 G(a)-3.375 E F1(name)3.375 E F2([)A F1(subscript)A F2(]) A F0 .875(is also accepted; the)3.375 F F1(subscript)3.375 E F0 .875 (is ignored.)3.375 F(Attrib)5.875 E .876(utes may be speci\214ed for an) -.2 F(array v)108 398.4 Q(ariable using the)-.25 E F2(declar)2.5 E(e) -.18 E F0(and)2.5 E F2 -.18(re)2.5 G(adonly).18 E F0 -.2(bu)2.5 G 2.5 (iltins. Each).2 F(attrib)2.5 E(ute applies to all members of an array) -.2 E(.)-.65 E 1.647 (Arrays are assigned to using compound assignments of the form)108 415.2 R F1(name)4.147 E F0(=)A F2(\()A F0 -.25(va)C(lue).25 E F1(1)A F0 1.647 (... v)4.147 F(alue)-.25 E F1(n)A F2(\))A F0 4.147(,w)C 1.647(here each) -4.147 F F1(value)108 427.2 Q F0 .65(is of the form [)3.15 F F1 (subscript)A F0(]=)A F1(string)A F0 5.65(.O)C(nly)-5.65 E F1(string)3.15 E F0 .65(is required.)3.15 F .65(If the optional brack)5.65 F .65 (ets and subscript are)-.1 F .277(supplied, that inde)108 439.2 R 2.777 (xi)-.15 G 2.777(sa)-2.777 G .277(ssigned to; otherwise the inde)-2.777 F 2.777(xo)-.15 G 2.777(ft)-2.777 G .276 (he element assigned is the last inde)-2.777 F 2.776(xa)-.15 G .276 (ssigned to)-2.776 F 1.393(by the statement plus one.)108 451.2 R(Inde) 6.393 E 1.393(xing starts at zero.)-.15 F 1.394 (This syntax is also accepted by the)6.394 F F2(declar)3.894 E(e)-.18 E F0 -.2(bu)3.894 G(iltin.).2 E(Indi)108 463.2 Q (vidual array elements may be assigned to using the)-.25 E F1(name)2.5 E F0([)A F1(subscript)A F0(]=)A F1(value)A F0(syntax introduced abo)2.5 E -.15(ve)-.15 G(.).15 E(An)108 480 Q 3.576(ye)-.15 G 1.076 (lement of an array may be referenced using ${)-3.576 F F1(name)A F0([)A F1(subscript)A F0 3.575(]}. The)B 1.075(braces are required to a)3.575 F -.2(vo)-.2 G(id).2 E 1.541(con\215icts with pathname e)108 492 R 4.041 (xpansion. If)-.15 F F1(subscript)4.041 E F0(is)4.041 E F2(@)4.041 E F0 (or)4.041 E F2(*)4.041 E F0 4.041(,t)C 1.541(he w)-4.041 F 1.541(ord e) -.1 F 1.541(xpands to all members of)-.15 F F1(name)4.042 E F0(.)A 1.057 (These subscripts dif)108 504 R 1.057(fer only when the w)-.25 F 1.057 (ord appears within double quotes.)-.1 F 1.056(If the w)6.056 F 1.056 (ord is double-quoted,)-.1 F(${)108 516 Q F1(name)A F0 .52([*]} e)B .52 (xpands to a single w)-.15 F .52(ord with the v)-.1 F .521 (alue of each array member separated by the \214rst character)-.25 F 1.375(of the)108 528 R F3(IFS)3.875 E F0 1.375(special v)3.625 F 1.375 (ariable, and ${)-.25 F F1(name)A F0 1.375([@]} e)B 1.375 (xpands each element of)-.15 F F1(name)3.875 E F0 1.374(to a separate w) 3.875 F 3.874(ord. When)-.1 F 1.003(there are no array members, ${)108 540 R F1(name)A F0 1.004([@]} e)B 1.004(xpands to nothing.)-.15 F 1.004 (This is analogous to the e)6.004 F 1.004(xpansion of the)-.15 F .694 (special parameters)108 552 R F2(*)3.194 E F0(and)3.194 E F2(@)3.194 E F0(\(see)3.194 E F2 .694(Special P)3.194 F(arameters)-.1 E F0(abo)3.194 E -.15(ve)-.15 G 3.194(\). ${#).15 F F1(name)A F0([)A F1(subscript)A F0 .694(]} e)B .693(xpands to the length)-.15 F .154(of ${)108 564 R F1 (name)A F0([)A F1(subscript)A F0 2.654(]}. If)B F1(subscript)2.654 E F0 (is)2.654 E F2(*)2.654 E F0(or)2.654 E F2(@)2.654 E F0 2.654(,t)C .154 (he e)-2.654 F .155(xpansion is the number of elements in the array)-.15 F 5.155(.R)-.65 G(efer)-5.155 E(-)-.2 E(encing an array v)108 576 Q (ariable without a subscript is equi)-.25 E -.25(va)-.25 G (lent to referencing element zero.).25 E(The)108 592.8 Q F2(unset)2.767 E F0 -.2(bu)2.767 G .267(iltin is used to destro).2 F 2.767(ya)-.1 G (rrays.)-2.767 E F2(unset)5.267 E F1(name)2.767 E F0([)A F1(subscript)A F0 2.767(]d)C(estro)-2.767 E .267(ys the array element at inde)-.1 F(x) -.15 E F1(sub-)2.766 E(script)108 604.8 Q F0(.)A F2(unset)5.3 E F1(name) 2.8 E F0 2.8(,w)C(here)-2.8 E F1(name)2.8 E F0 .3(is an array)2.8 F 2.801(,o)-.65 G(r)-2.801 E F2(unset)2.801 E F1(name)2.801 E F0([)A F1 (subscript)A F0 .301(], where)B F1(subscript)2.801 E F0(is)2.801 E F2(*) 2.801 E F0(or)2.801 E F2(@)2.801 E F0 2.801(,r)C(emo)-2.801 E -.15(ve) -.15 G(s).15 E(the entire array)108 616.8 Q(.)-.65 E(The)108 633.6 Q F2 (declar)3.671 E(e)-.18 E F0(,)A F2(local)3.671 E F0 3.671(,a)C(nd)-3.671 E F2 -.18(re)3.671 G(adonly).18 E F0 -.2(bu)3.671 G 1.171 (iltins each accept a).2 F F23.671 E F0 1.17 (option to specify an array)3.671 F 6.17(.T)-.65 G(he)-6.17 E F2 -.18 (re)3.67 G(ad).18 E F0 -.2(bu)3.67 G(iltin).2 E .44(accepts a)108 645.6 R F22.941 E F0 .441(option to assign a list of w)2.941 F .441 (ords read from the standard input to an array)-.1 F 5.441(.T)-.65 G(he) -5.441 E F2(set)2.941 E F0(and)2.941 E F2(declar)2.941 E(e)-.18 E F0 -.2 (bu)108 657.6 S(iltins display array v).2 E(alues in a w)-.25 E (ay that allo)-.1 E(ws them to be reused as assignments.)-.25 E/F4 10.95 /Times-Bold@0 SF(EXP)72 674.4 Q(ANSION)-.81 E F0 .76(Expansion is perfo\ rmed on the command line after it has been split into w)108 686.4 R 3.26 (ords. There)-.1 F .76(are se)3.26 F -.15(ve)-.25 G 3.26(nk).15 G .76 (inds of)-3.26 F -.15(ex)108 698.4 S .369(pansion performed:).15 F F1 (br)2.869 E .369(ace e)-.15 F(xpansion)-.2 E F0(,).24 E F1 .369(tilde e) 2.869 F(xpansion)-.2 E F0(,).24 E F1(par)2.869 E .369 (ameter and variable e)-.15 F(xpansion)-.2 E F0(,).24 E F1 .37 (command sub-)2.869 F(stitution)108 710.4 Q F0(,).24 E F1(arithmetic e) 2.5 E(xpansion)-.2 E F0(,).24 E F1(wor)2.5 E 2.5(ds)-.37 G(plitting)-2.5 E F0 2.5(,a).22 G(nd)-2.5 E F1(pathname e)2.5 E(xpansion)-.2 E F0(.).24 E .471(The order of e)108 727.2 R .471(xpansions is: brace e)-.15 F .471 (xpansion, tilde e)-.15 F .471(xpansion, parameter)-.15 F 2.971(,v)-.4 G .47(ariable and arithmetic e)-3.221 F(xpansion)-.15 E(GNU Bash-2.05a)72 768 Q(2001 No)126.115 E -.15(ve)-.15 G(mber 13).15 E(13)185.545 E EP %%Page: 14 14 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\)) -.35 E(and command substitution \(done in a left-to-right f)108 84 Q (ashion\), w)-.1 E(ord splitting, and pathname e)-.1 E(xpansion.)-.15 E (On systems that can support it, there is an additional e)108 100.8 Q (xpansion a)-.15 E -.25(va)-.2 G(ilable:).25 E/F1 10/Times-Italic@0 SF (pr)2.5 E(ocess substitution)-.45 E F0(.)A 1.486(Only brace e)108 117.6 R 1.486(xpansion, w)-.15 F 1.486(ord splitting, and pathname e)-.1 F 1.487(xpansion can change the number of w)-.15 F 1.487(ords of the)-.1 F -.15(ex)108 129.6 S 1.165(pansion; other e).15 F 1.165(xpansions e)-.15 F 1.165(xpand a single w)-.15 F 1.165(ord to a single w)-.1 F 3.665 (ord. The)-.1 F 1.164(only e)3.665 F 1.164(xceptions to this are the) -.15 F -.15(ex)108 141.6 S(pansions of ").15 E/F2 10/Times-Bold@0 SF($@) A F0 2.5("a)C(nd ")-2.5 E F2(${)A F1(name)A F2([@]})A F0 2.5("a)C 2.5 (se)-2.5 G(xplained abo)-2.65 E .3 -.15(ve \()-.15 H(see).15 E/F3 9 /Times-Bold@0 SF -.666(PA)2.5 G(RAMETERS).666 E/F4 9/Times-Roman@0 SF (\).)A F2(Brace Expansion)87 158.4 Q F1(Br)108 170.4 Q .66(ace e)-.15 F (xpansion)-.2 E F0 .661 (is a mechanism by which arbitrary strings may be generated.)3.16 F .661 (This mechanism is similar)5.661 F(to)108 182.4 Q F1 .415(pathname e) 2.915 F(xpansion)-.2 E F0 2.915(,b)C .415 (ut the \214lenames generated need not e)-3.115 F 2.915(xist. P)-.15 F .415(atterns to be brace e)-.15 F .415(xpanded tak)-.15 F 2.915(et)-.1 G (he)-2.915 E .888(form of an optional)108 194.4 R F1(pr)3.388 E(eamble) -.37 E F0 3.388(,f).18 G(ollo)-3.388 E .888 (wed by a series of comma-separated strings between a pair of braces,) -.25 F(follo)108 206.4 Q 1.082(wed by an optional)-.25 F F1(postscript) 3.582 E F0 6.082(.T).68 G 1.081(he preamble is pre\214x)-6.082 F 1.081 (ed to each string contained within the braces,)-.15 F (and the postscript is then appended to each resulting string, e)108 218.4 Q(xpanding left to right.)-.15 E .718(Brace e)108 235.2 R .719 (xpansions may be nested.)-.15 F .719(The results of each e)5.719 F .719 (xpanded string are not sorted; left to right order is)-.15 F(preserv) 108 247.2 Q 2.5(ed. F)-.15 F(or e)-.15 E(xample, a)-.15 E F2({)A F0 (d,c,b)A F2(})A F0 2.5(ee)C(xpands into `ade ace abe'.)-2.65 E .582 (Brace e)108 264 R .582(xpansion is performed before an)-.15 F 3.082(yo) -.15 G .581(ther e)-3.082 F .581(xpansions, and an)-.15 F 3.081(yc)-.15 G .581(haracters special to other e)-3.081 F(xpansions)-.15 E .015 (are preserv)108 276 R .015(ed in the result.)-.15 F .015 (It is strictly te)5.015 F(xtual.)-.15 E F2(Bash)5.016 E F0 .016 (does not apply an)2.516 F 2.516(ys)-.15 G .016 (yntactic interpretation to the con-)-2.516 F(te)108 288 Q(xt of the e) -.15 E(xpansion or the te)-.15 E(xt between the braces.)-.15 E 3.633(Ac) 108 304.8 S 1.133(orrectly-formed brace e)-3.633 F 1.132(xpansion must \ contain unquoted opening and closing braces, and at least one)-.15 F .267(unquoted comma.)108 316.8 R(An)5.267 E 2.767(yi)-.15 G .267 (ncorrectly formed brace e)-2.767 F .268(xpansion is left unchanged.) -.15 F(A)5.268 E F2({)2.768 E F0(or)2.768 E F2(,)2.768 E F0 .268 (may be quoted with)2.768 F 3.435(ab)108 328.8 S .935(ackslash to pre) -3.435 F -.15(ve)-.25 G .934(nt its being considered part of a brace e) .15 F 3.434(xpression. T)-.15 F 3.434(oa)-.8 G -.2(vo)-3.634 G .934 (id con\215icts with parameter).2 F -.15(ex)108 340.8 S (pansion, the string).15 E F2(${)2.5 E F0 (is not considered eligible for brace e)2.5 E(xpansion.)-.15 E 1.476(Th\ is construct is typically used as shorthand when the common pre\214x of\ the strings to be generated is)108 357.6 R(longer than in the abo)108 369.6 Q .3 -.15(ve ex)-.15 H(ample:).15 E (mkdir /usr/local/src/bash/{old,ne)144 386.4 Q -.65(w,)-.25 G(dist,b).65 E(ugs})-.2 E(or)108 398.4 Q(cho)144 410.4 Q(wn root /usr/{ucb/{e)-.25 E (x,edit},lib/{e)-.15 E(x?.?*,ho)-.15 E(w_e)-.25 E(x}})-.15 E .618 (Brace e)108 427.2 R .618 (xpansion introduces a slight incompatibility with historical v)-.15 F .618(ersions of)-.15 F F2(sh)3.118 E F0(.)A F2(sh)5.618 E F0 .618 (does not treat open-)3.118 F .247 (ing or closing braces specially when the)108 439.2 R 2.747(ya)-.15 G .247(ppear as part of a w)-2.747 F .248(ord, and preserv)-.1 F .248 (es them in the output.)-.15 F F2(Bash)5.248 E F0(remo)108 451.2 Q -.15 (ve)-.15 G 3.53(sb).15 G 1.03(races from w)-3.53 F 1.03 (ords as a consequence of brace e)-.1 F 3.53(xpansion. F)-.15 F 1.03 (or e)-.15 F 1.03(xample, a w)-.15 F 1.03(ord entered to)-.1 F F2(sh) 3.53 E F0(as)3.53 E F1(\214le{1,2})108 463.2 Q F0 .628 (appears identically in the output.)3.128 F .628(The same w)5.628 F .628 (ord is output as)-.1 F F1 .628(\214le1 \214le2)3.128 F F0 .629(after e) 3.129 F .629(xpansion by)-.15 F F2(bash)3.129 E F0(.)A .437 (If strict compatibility with)108 475.2 R F2(sh)2.936 E F0 .436 (is desired, start)2.936 F F2(bash)2.936 E F0 .436(with the)2.936 F F2 (+B)2.936 E F0 .436(option or disable brace e)2.936 F .436 (xpansion with the)-.15 F F2(+B)108 487.2 Q F0(option to the)2.5 E F2 (set)2.5 E F0(command \(see)2.5 E F3(SHELL B)2.5 E(UIL)-.09 E (TIN COMMANDS)-.828 E F0(belo)2.25 E(w\).)-.25 E F2 -.18(Ti)87 504 S (lde Expansion).18 E F0 1.086(If a w)108 516 R 1.086(ord be)-.1 F 1.086 (gins with an unquoted tilde character \(`)-.15 F F2(~)A F0 1.087 ('\), all of the characters preceding the \214rst unquoted)B .185(slash\ \(or all characters, if there is no unquoted slash\) are considered a) 108 528 R F1(tilde-pr)2.685 E(e\214x)-.37 E F0 5.185(.I)C 2.685(fn) -5.185 G .185(one of the characters)-2.685 F .725(in the tilde-pre\214x\ are quoted, the characters in the tilde-pre\214x follo)108 540 R .726 (wing the tilde are treated as a possible)-.25 F F1(lo)108 552 Q .523 (gin name)-.1 F F0 5.523(.I)C 3.023(ft)-5.523 G .523 (his login name is the null string, the tilde is replaced with the v) -3.023 F .522(alue of the shell parameter)-.25 F F3(HOME)108 564 Q F4(.) A F0(If)4.786 E F3(HOME)2.786 E F0 .287 (is unset, the home directory of the user e)2.536 F -.15(xe)-.15 G .287 (cuting the shell is substituted instead.).15 F(Other)5.287 E(-)-.2 E(w\ ise, the tilde-pre\214x is replaced with the home directory associated \ with the speci\214ed login name.)108 576 Q .093 (If the tilde-pre\214x is a `~+', the v)108 592.8 R .092 (alue of the shell v)-.25 F(ariable)-.25 E F3(PWD)2.592 E F0 .092 (replaces the tilde-pre\214x.)2.342 F .092(If the tilde-pre\214x is) 5.092 F 3.403(a`)108 604.8 S .903(~\255', the v)-3.403 F .903 (alue of the shell v)-.25 F(ariable)-.25 E F3(OLDPWD)3.404 E F4(,)A F0 .904(if it is set, is substituted.)3.154 F .904(If the characters follo) 5.904 F .904(wing the)-.25 F 1.642 (tilde in the tilde-pre\214x consist of a number)108 616.8 R F1(N)4.142 E F0 4.142(,o)C 1.642(ptionally pre\214x)-4.142 F 1.641 (ed by a `+' or a `\255', the tilde-pre\214x is)-.15 F 1.437(replaced w\ ith the corresponding element from the directory stack, as it w)108 628.8 R 1.438(ould be displayed by the)-.1 F F2(dirs)3.938 E F0 -.2(bu) 108 640.8 S .455(iltin in).2 F -.2(vo)-.4 G -.1(ke).2 G 2.955(dw).1 G .455(ith the tilde-pre\214x as an ar)-2.955 F 2.954(gument. If)-.18 F .454(the characters follo)2.954 F .454 (wing the tilde in the tilde-pre\214x)-.25 F (consist of a number without a leading `+' or `\255', `+' is assumed.) 108 652.8 Q(If the login name is in)108 669.6 Q -.25(va)-.4 G (lid, or the tilde e).25 E(xpansion f)-.15 E(ails, the w)-.1 E (ord is unchanged.)-.1 E .826(Each v)108 686.4 R .826 (ariable assignment is check)-.25 F .827(ed for unquoted tilde-pre\214x) -.1 F .827(es immediately follo)-.15 F .827(wing a)-.25 F F2(:)3.327 E F0(or)3.327 E F2(=)3.327 E F0 5.827(.I)C 3.327(nt)-5.827 G(hese)-3.327 E .467(cases, tilde e)108 698.4 R .467(xpansion is also performed.)-.15 F (Consequently)5.467 E 2.967(,o)-.65 G .466 (ne may use \214le names with tildes in assignments)-2.967 F(to)108 710.4 Q F3 -.666(PA)2.5 G(TH)-.189 E F4(,)A F3(MAILP)2.25 E -.855(AT) -.666 G(H).855 E F4(,)A F0(and)2.25 E F3(CDP)2.5 E -.855(AT)-.666 G(H) .855 E F4(,)A F0(and the shell assigns the e)2.25 E(xpanded v)-.15 E (alue.)-.25 E(GNU Bash-2.05a)72 768 Q(2001 No)126.115 E -.15(ve)-.15 G (mber 13).15 E(14)185.545 E EP %%Page: 15 15 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\)) -.35 E/F1 10/Times-Bold@0 SF -.1(Pa)87 84 S(rameter Expansion).1 E F0 1.605(The `)108 96 R F1($)A F0 4.105('c)C 1.605 (haracter introduces parameter e)-4.105 F 1.606 (xpansion, command substitution, or arithmetic e)-.15 F 4.106 (xpansion. The)-.15 F .407(parameter name or symbol to be e)108 108 R .407(xpanded may be enclosed in braces, which are optional b)-.15 F .406 (ut serv)-.2 F 2.906(et)-.15 G 2.906(op)-2.906 G(ro-)-2.906 E .032 (tect the v)108 120 R .032(ariable to be e)-.25 F .032 (xpanded from characters immediately follo)-.15 F .033 (wing it which could be interpreted as part)-.25 F(of the name.)108 132 Q 1.19(When braces are used, the matching ending brace is the \214rst `) 108 148.8 R F1(})A F0 3.689('n)C 1.189 (ot escaped by a backslash or within a)-3.689 F .052 (quoted string, and not within an embedded arithmetic e)108 160.8 R .053 (xpansion, command substitution, or paramter e)-.15 F(xpan-)-.15 E (sion.)108 172.8 Q(${)108 189.6 Q/F2 10/Times-Italic@0 SF(par)A(ameter) -.15 E F0(})A 1.346(The v)144 201.6 R 1.346(alue of)-.25 F F2(par)3.846 E(ameter)-.15 E F0 1.346(is substituted.)3.846 F 1.346 (The braces are required when)6.346 F F2(par)3.845 E(ameter)-.15 E F0 1.345(is a positional)3.845 F .38 (parameter with more than one digit, or when)144 213.6 R F2(par)2.881 E (ameter)-.15 E F0 .381(is follo)2.881 F .381 (wed by a character which is not to)-.25 F (be interpreted as part of its name.)144 225.6 Q 1.509 (If the \214rst character of)108 242.4 R F2(par)4.009 E(ameter)-.15 E F0 1.509(is an e)4.009 F 1.509(xclamation point, a le)-.15 F -.15(ve)-.25 G 4.009(lo).15 G 4.008(fv)-4.009 G 1.508 (ariable indirection is introduced.)-4.258 F F1(Bash)108 254.4 Q F0 .106 (uses the v)2.606 F .106(alue of the v)-.25 F .106 (ariable formed from the rest of)-.25 F F2(par)2.606 E(ameter)-.15 E F0 .106(as the name of the v)2.606 F .106(ariable; this v)-.25 F(ari-)-.25 E .352(able is then e)108 266.4 R .352(xpanded and that v)-.15 F .351 (alue is used in the rest of the substitution, rather than the v)-.25 F .351(alue of)-.25 F F2(par)2.851 E(ame-)-.15 E(ter)108 278.4 Q F0 4.411 (itself. This)4.411 F 1.912(is kno)4.412 F 1.912(wn as)-.25 F F2(indir) 4.412 E 1.912(ect e)-.37 F(xpansion)-.2 E F0 6.912(.T)C 1.912(he e) -6.912 F 1.912(xception to this is the e)-.15 F 1.912(xpansion of ${!) -.15 F F2(pr)A(e\214x)-.37 E F0(*})A(described belo)108 290.4 Q -.65(w.) -.25 G .334(In each of the cases belo)108 307.2 R -.65(w,)-.25 G F2(wor) 3.484 E(d)-.37 E F0 .334(is subject to tilde e)2.834 F .334 (xpansion, parameter e)-.15 F .334(xpansion, command substitution,)-.15 F 1.417(and arithmetic e)108 319.2 R 3.918(xpansion. When)-.15 F 1.418 (not performing substring e)3.918 F(xpansion,)-.15 E F1(bash)3.918 E F0 1.418(tests for a parameter that is)3.918 F(unset or null; omitting the\ colon results in a test only for a parameter that is unset.)108 331.2 Q (${)108 348 Q F2(par)A(ameter)-.15 E F1<3aad>A F2(wor)A(d)-.37 E F0(})A F1 .929(Use Default V)144 360 R(alues)-.92 E F0 5.929(.I)C(f)-5.929 E F2 (par)3.429 E(ameter)-.15 E F0 .929(is unset or null, the e)3.429 F .928 (xpansion of)-.15 F F2(wor)3.428 E(d)-.37 E F0 .928(is substituted.) 3.428 F(Other)5.928 E(-)-.2 E(wise, the v)144 372 Q(alue of)-.25 E F2 (par)2.5 E(ameter)-.15 E F0(is substituted.)2.5 E(${)108 384 Q F2(par)A (ameter)-.15 E F1(:=)A F2(wor)A(d)-.37 E F0(})A F1 .085 (Assign Default V)144 396 R(alues)-.92 E F0 5.085(.I)C(f)-5.085 E F2 (par)2.585 E(ameter)-.15 E F0 .086(is unset or null, the e)2.585 F .086 (xpansion of)-.15 F F2(wor)2.586 E(d)-.37 E F0 .086(is assigned to)2.586 F F2(par)2.586 E(am-)-.15 E(eter)144 408 Q F0 6.311(.T).73 G 1.311(he v) -6.311 F 1.311(alue of)-.25 F F2(par)3.811 E(ameter)-.15 E F0 1.311 (is then substituted.)3.811 F 1.311 (Positional parameters and special parameters)6.311 F (may not be assigned to in this w)144 420 Q(ay)-.1 E(.)-.65 E(${)108 432 Q F2(par)A(ameter)-.15 E F1(:?)A F2(wor)A(d)-.37 E F0(})A F1 .645 (Display Err)144 444 R .645(or if Null or Unset)-.18 F F0 5.645(.I)C(f) -5.645 E F2(par)3.145 E(ameter)-.15 E F0 .645(is null or unset, the e) 3.145 F .645(xpansion of)-.15 F F2(wor)3.145 E(d)-.37 E F0 .645 (\(or a mes-)3.145 F .715(sage to that ef)144 456 R .715(fect if)-.25 F F2(wor)3.215 E(d)-.37 E F0 .714(is not present\) is written to the stan\ dard error and the shell, if it is not)3.215 F(interacti)144 468 Q -.15 (ve)-.25 G 2.5(,e).15 G 2.5(xits. Otherwise,)-2.65 F(the v)2.5 E (alue of)-.25 E F2(par)2.5 E(ameter)-.15 E F0(is substituted.)2.5 E(${) 108 480 Q F2(par)A(ameter)-.15 E F1(:+)A F2(wor)A(d)-.37 E F0(})A F1 .886(Use Alter)144 492 R .886(nate V)-.15 F(alue)-.92 E F0 5.886(.I)C(f) -5.886 E F2(par)3.386 E(ameter)-.15 E F0 .887 (is null or unset, nothing is substituted, otherwise the e)3.386 F (xpan-)-.15 E(sion of)144 504 Q F2(wor)2.5 E(d)-.37 E F0 (is substituted.)2.5 E(${)108 516 Q F2(par)A(ameter)-.15 E F1(:)A F2(of) A(fset)-.18 E F0(})A(${)108 528 Q F2(par)A(ameter)-.15 E F1(:)A F2(of)A (fset)-.18 E F1(:)A F2(length)A F0(})A F1 .797(Substring Expansion.)144 540 R F0 .796(Expands to up to)5.797 F F2(length)3.296 E F0 .796 (characters of)3.296 F F2(par)3.296 E(ameter)-.15 E F0 .796 (starting at the character)3.296 F .228(speci\214ed by)144 552 R F2(of) 2.728 E(fset)-.18 E F0 5.228(.I)C(f)-5.228 E F2(length)2.728 E F0 .229 (is omitted, e)2.729 F .229(xpands to the substring of)-.15 F F2(par) 2.729 E(ameter)-.15 E F0 .229(starting at the char)2.729 F(-)-.2 E .433 (acter speci\214ed by)144 564 R F2(of)2.933 E(fset)-.18 E F0(.)A F2 (length)5.433 E F0(and)2.933 E F2(of)2.933 E(fset)-.18 E F0 .433 (are arithmetic e)2.933 F .433(xpressions \(see)-.15 F/F3 9/Times-Bold@0 SF .432(ARITHMETIC EV)2.933 F(ALU-)-1.215 E -.855(AT)144 576 S(ION).855 E F0(belo)2.576 E(w\).)-.25 E F2(length)5.326 E F0 .326(must e)2.826 F -.25(va)-.25 G .326(luate to a number greater than or equal to zero.).25 F(If)5.327 E F2(of)2.827 E(fset)-.18 E F0 -.25(eva)2.827 G(luates).25 E .016(to a number less than zero, the v)144 588 R .015 (alue is used as an of)-.25 F .015(fset from the end of the v)-.25 F .015(alue of)-.25 F F2(par)2.515 E(ameter)-.15 E F0 5.015(.I)C(f)-5.015 E F2(par)144 600 Q(ameter)-.15 E F0(is)3.25 E F1(@)3.25 E F0 3.25(,t)C .75(he result is)-3.25 F F2(length)3.25 E F0 .75 (positional parameters be)3.25 F .75(ginning at)-.15 F F2(of)3.25 E (fset)-.18 E F0 5.75(.I)C(f)-5.75 E F2(par)3.25 E(ameter)-.15 E F0 .75 (is an)3.25 F 1.835(array name inde)144 612 R -.15(xe)-.15 G 4.335(db) .15 G 4.335(y@o)-4.335 G 4.335(r*)-4.335 G 4.335(,t)-4.335 G 1.835 (he result is the)-4.335 F F2(length)4.335 E F0 1.834 (members of the array be)4.335 F 1.834(ginning with)-.15 F(${)144 624 Q F2(par)A(ameter)-.15 E F0([)A F2(of)A(fset)-.18 E F0 2.999 (]}. Substring)B(inde)2.999 E .499 (xing is zero-based unless the positional parameters are used,)-.15 F (in which case the inde)144 636 Q(xing starts at 1.)-.15 E(${)108 652.8 Q F1(!)A F2(pr)A(e\214x)-.37 E F1(*)A F0(})A .42 (Expands to the names of v)144 664.8 R .42(ariables whose names be)-.25 F .42(gin with)-.15 F F2(pr)2.92 E(e\214x)-.37 E F0 2.92(,s)C .42 (eparated by the \214rst character)-2.92 F(of the)144 676.8 Q F3(IFS)2.5 E F0(special v)2.25 E(ariable.)-.25 E(${)108 693.6 Q F1(#)A F2(par)A (ameter)-.15 E F0(})A .096(The length in characters of the v)144 705.6 R .096(alue of)-.25 F F2(par)2.596 E(ameter)-.15 E F0 .096 (is substituted.)2.596 F(If)5.096 E F2(par)2.596 E(ameter)-.15 E F0(is) 2.596 E F1(*)2.596 E F0(or)2.596 E F1(@)2.596 E F0 2.597(,t)C .097(he v) -2.597 F(alue)-.25 E .136 (substituted is the number of positional parameters.)144 717.6 R(If) 5.136 E F2(par)2.636 E(ameter)-.15 E F0 .136 (is an array name subscripted by)2.636 F F1(*)2.636 E F0(or)144 729.6 Q F1(@)2.5 E F0 2.5(,t)C(he v)-2.5 E (alue substituted is the number of elements in the array)-.25 E(.)-.65 E (GNU Bash-2.05a)72 768 Q(2001 No)126.115 E -.15(ve)-.15 G(mber 13).15 E (15)185.545 E EP %%Page: 16 16 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\)) -.35 E(${)108 84 Q/F1 10/Times-Italic@0 SF(par)A(ameter)-.15 E/F2 10 /Times-Bold@0 SF(#)A F1(wor)A(d)-.37 E F0(})A(${)108 96 Q F1(par)A (ameter)-.15 E F2(##)A F1(wor)A(d)-.37 E F0(})A(The)144 108 Q F1(wor) 3.06 E(d)-.37 E F0 .56(is e)3.06 F .56 (xpanded to produce a pattern just as in pathname e)-.15 F 3.06 (xpansion. If)-.15 F .56(the pattern matches)3.06 F .412(the be)144 120 R .412(ginning of the v)-.15 F .411(alue of)-.25 F F1(par)2.911 E (ameter)-.15 E F0 2.911(,t).73 G .411(hen the result of the e)-2.911 F .411(xpansion is the e)-.15 F .411(xpanded v)-.15 F .411(alue of)-.25 F F1(par)144 132 Q(ameter)-.15 E F0 .748 (with the shortest matching pattern \(the `)3.248 F(`)-.74 E F2(#)A F0 2.229 -.74('' c)D .749(ase\) or the longest matching pattern \(the).74 F -.74(``)144 144 S F2(##).74 E F0 1.77 -.74('' c)D .29(ase\) deleted.).74 F(If)5.29 E F1(par)2.79 E(ameter)-.15 E F0(is)2.79 E F2(@)2.79 E F0(or) 2.79 E F2(*)2.79 E F0 2.79(,t)C .29(he pattern remo)-2.79 F -.25(va)-.15 G 2.79(lo).25 G .29(peration is applied to each posi-)-2.79 F .778 (tional parameter in turn, and the e)144 156 R .778 (xpansion is the resultant list.)-.15 F(If)5.778 E F1(par)3.278 E (ameter)-.15 E F0 .779(is an array v)3.278 F(ariable)-.25 E .651 (subscripted with)144 168 R F2(@)3.151 E F0(or)3.151 E F2(*)3.151 E F0 3.151(,t)C .651(he pattern remo)-3.151 F -.25(va)-.15 G 3.151(lo).25 G .65(peration is applied to each member of the array in)-3.151 F (turn, and the e)144 180 Q(xpansion is the resultant list.)-.15 E(${)108 196.8 Q F1(par)A(ameter)-.15 E F2(%)A F1(wor)A(d)-.37 E F0(})A(${)108 208.8 Q F1(par)A(ameter)-.15 E F2(%%)A F1(wor)A(d)-.37 E F0(})A(The)144 220.8 Q F1(wor)2.618 E(d)-.37 E F0 .118(is e)2.618 F .119 (xpanded to produce a pattern just as in pathname e)-.15 F 2.619 (xpansion. If)-.15 F .119(the pattern matches a)2.619 F 2.402 (trailing portion of the e)144 232.8 R 2.402(xpanded v)-.15 F 2.401 (alue of)-.25 F F1(par)4.901 E(ameter)-.15 E F0 4.901(,t).73 G 2.401 (hen the result of the e)-4.901 F 2.401(xpansion is the)-.15 F -.15(ex) 144 244.8 S 1.293(panded v).15 F 1.293(alue of)-.25 F F1(par)3.793 E (ameter)-.15 E F0 1.294(with the shortest matching pattern \(the `)3.793 F(`)-.74 E F2(%)A F0 2.774 -.74('' c)D 1.294(ase\) or the longest).74 F .107(matching pattern \(the `)144 256.8 R(`)-.74 E F2(%%)A F0 1.587 -.74 ('' c)D .107(ase\) deleted.).74 F(If)5.107 E F1(par)2.607 E(ameter)-.15 E F0(is)2.607 E F2(@)2.607 E F0(or)2.607 E F2(*)2.606 E F0 2.606(,t)C .106(he pattern remo)-2.606 F -.25(va)-.15 G 2.606(lo).25 G(peration) -2.606 E .136 (is applied to each positional parameter in turn, and the e)144 268.8 R .136(xpansion is the resultant list.)-.15 F(If)5.137 E F1(par)2.637 E (ameter)-.15 E F0 .045(is an array v)144 280.8 R .045 (ariable subscripted with)-.25 F F2(@)2.545 E F0(or)2.545 E F2(*)2.545 E F0 2.545(,t)C .045(he pattern remo)-2.545 F -.25(va)-.15 G 2.545(lo).25 G .044(peration is applied to each mem-)-2.545 F (ber of the array in turn, and the e)144 292.8 Q (xpansion is the resultant list.)-.15 E(${)108 309.6 Q F1(par)A(ameter) -.15 E F2(/)A F1(pattern)A F2(/)A F1(string)A F0(})A(${)108 321.6 Q F1 (par)A(ameter)-.15 E F2(//)A F1(pattern)A F2(/)A F1(string)A F0(})A(The) 144 333.6 Q F1(pattern)5.085 E F0 2.585(is e)5.085 F 2.585 (xpanded to produce a pattern just as in pathname e)-.15 F(xpansion.) -.15 E F1 -.8(Pa)7.585 G -.15(ra).8 G(meter).15 E F0(is)5.085 E -.15(ex) 144 345.6 S 1.17(panded and the longest match of).15 F F1(pattern)3.67 E F0(ag)3.669 E 1.169(ainst its v)-.05 F 1.169(alue is replaced with)-.25 F F1(string)3.669 E F0 6.169(.I)C 3.669(nt)-6.169 G 1.169(he \214rst) -3.669 F 2.028(form, only the \214rst match is replaced.)144 357.6 R 2.028(The second form causes all matches of)7.028 F F1(pattern)4.528 E F0 2.029(to be)4.529 F 1.36(replaced with)144 369.6 R F1(string)3.86 E F0 6.36(.I)C(f)-6.36 E F1(pattern)3.86 E F0(be)3.86 E 1.36(gins with) -.15 F F2(#)3.86 E F0 3.86(,i)C 3.86(tm)-3.86 G 1.36 (ust match at the be)-3.86 F 1.36(ginning of the e)-.15 F(xpanded)-.15 E -.25(va)144 381.6 S .62(lue of).25 F F1(par)3.12 E(ameter)-.15 E F0 5.62 (.I)C(f)-5.62 E F1(pattern)3.12 E F0(be)3.12 E .62(gins with)-.15 F F2 (%)3.12 E F0 3.12(,i)C 3.121(tm)-3.12 G .621 (ust match at the end of the e)-3.121 F .621(xpanded v)-.15 F .621 (alue of)-.25 F F1(par)144 393.6 Q(ameter)-.15 E F0 6.254(.I)C(f)-6.254 E F1(string)3.754 E F0 1.253(is null, matches of)3.753 F F1(pattern) 3.753 E F0 1.253(are deleted and the)3.753 F F2(/)3.753 E F0(follo)3.753 E(wing)-.25 E F1(pattern)3.753 E F0 1.253(may be)3.753 F 2.81 (omitted. If)144 405.6 R F1(par)2.81 E(ameter)-.15 E F0(is)2.81 E F2(@) 2.81 E F0(or)2.81 E F2(*)2.811 E F0 2.811(,t)C .311 (he substitution operation is applied to each positional parameter) -2.811 F .005(in turn, and the e)144 417.6 R .005 (xpansion is the resultant list.)-.15 F(If)5.005 E F1(par)2.505 E (ameter)-.15 E F0 .004(is an array v)2.505 F .004 (ariable subscripted with)-.25 F F2(@)2.504 E F0(or)144 429.6 Q F2(*) 2.628 E F0 2.628(,t)C .128(he substitution operation is applied to each\ member of the array in turn, and the e)-2.628 F .129(xpansion is)-.15 F (the resultant list.)144 441.6 Q F2(Command Substitution)87 458.4 Q F1 1.698(Command substitution)108 470.4 R F0(allo)4.198 E 1.697 (ws the output of a command to replace the command name.)-.25 F 1.697 (There are tw)6.697 F(o)-.1 E(forms:)108 482.4 Q F2($\()144 504 Q F1 (command)A F2(\))1.666 E F0(or)108 516 Q F2(`)144 528 Q F1(command)A F2 (`)A(Bash)108 544.8 Q F0 .019(performs the e)2.519 F .019(xpansion by e) -.15 F -.15(xe)-.15 G(cuting).15 E F1(command)2.519 E F0 .02 (and replacing the command substitution with the stan-)2.519 F .768 (dard output of the command, with an)108 556.8 R 3.268(yt)-.15 G .768 (railing ne)-3.268 F .768(wlines deleted.)-.25 F .768(Embedded ne)5.768 F .768(wlines are not deleted, b)-.25 F(ut)-.2 E(the)108 568.8 Q 3.218 (ym)-.15 G .718(ay be remo)-3.218 F -.15(ve)-.15 G 3.218(dd).15 G .719 (uring w)-3.218 F .719(ord splitting.)-.1 F .719 (The command substitution)5.719 F F2($\(cat)3.219 E F1(\214le)3.219 E F2 (\))A F0 .719(can be replaced by the)3.219 F(equi)108 580.8 Q -.25(va) -.25 G(lent b).25 E(ut f)-.2 E(aster)-.1 E F2($\(<)2.5 E F1(\214le)2.5 E F2(\))A F0(.)A 1.724(When the old-style backquote form of substitution \ is used, backslash retains its literal meaning e)108 597.6 R(xcept)-.15 E .314(when follo)108 609.6 R .314(wed by)-.25 F F2($)2.814 E F0(,)A F2 (`)2.814 E F0 2.814(,o)C(r)-2.814 E F2(\\)2.814 E F0 5.314(.T)C .315(he\ \214rst backquote not preceded by a backslash terminates the command s\ ub-)-5.314 F 3.887(stitution. When)108 621.6 R 1.387(using the $\()3.887 F F1(command).833 E F0 3.887(\)f)1.666 G 1.386 (orm, all characters between the parentheses mak)-3.887 F 3.886(eu)-.1 G 3.886(pt)-3.886 G 1.386(he com-)-3.886 F (mand; none are treated specially)108 633.6 Q(.)-.65 E .894 (Command substitutions may be nested.)108 650.4 R 2.494 -.8(To n)5.894 H .894(est when using the backquoted form, escape the inner back-).8 F (quotes with backslashes.)108 662.4 Q .422 (If the substitution appears within double quotes, w)108 679.2 R .422 (ord splitting and pathname e)-.1 F .422(xpansion are not performed)-.15 F(on the results.)108 691.2 Q(GNU Bash-2.05a)72 768 Q(2001 No)126.115 E -.15(ve)-.15 G(mber 13).15 E(16)185.545 E EP %%Page: 17 17 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\)) -.35 E/F1 10/Times-Bold@0 SF(Arithmetic Expansion)87 84 Q F0 1.034 (Arithmetic e)108 96 R 1.034(xpansion allo)-.15 F 1.034(ws the e)-.25 F -.25(va)-.25 G 1.034(luation of an arithmetic e).25 F 1.035 (xpression and the substitution of the result.)-.15 F (The format for arithmetic e)108 108 Q(xpansion is:)-.15 E F1($\(\()144 124.8 Q/F2 10/Times-Italic@0 SF -.2(ex)C(pr).2 E(ession)-.37 E F1(\)\))A F0(The)108 141.6 Q F2 -.2(ex)2.678 G(pr).2 E(ession)-.37 E F0 .178 (is treated as if it were within double quotes, b)2.678 F .178 (ut a double quote inside the parentheses is not)-.2 F 1.074 (treated specially)108 153.6 R 6.074(.A)-.65 G 1.074(ll tok)-6.074 F 1.074(ens in the e)-.1 F 1.074(xpression under)-.15 F 1.074 (go parameter e)-.18 F 1.074(xpansion, string e)-.15 F 1.075 (xpansion, command)-.15 F(substitution, and quote remo)108 165.6 Q -.25 (va)-.15 G 2.5(l. Arithmetic).25 F(substitutions may be nested.)2.5 E 1.379(The e)108 182.4 R -.25(va)-.25 G 1.378 (luation is performed according to the rules listed belo).25 F 3.878(wu) -.25 G(nder)-3.878 E/F3 9/Times-Bold@0 SF 1.378(ARITHMETIC EV)3.878 F (ALU)-1.215 E -.855(AT)-.54 G(ION).855 E/F4 9/Times-Roman@0 SF(.)A F0 (If)5.878 E F2 -.2(ex)108 194.4 S(pr).2 E(ession)-.37 E F0(is in)2.5 E -.25(va)-.4 G(lid,).25 E F1(bash)2.5 E F0(prints a message indicating f) 2.5 E(ailure and no substitution occurs.)-.1 E F1(Pr)87 211.2 Q (ocess Substitution)-.18 E F2(Pr)108 223.2 Q .97(ocess substitution)-.45 F F0 .971(is supported on systems that support named pipes \()3.47 F F2 (FIFOs)A F0 3.471(\)o)C 3.471(rt)-3.471 G(he)-3.471 E F1(/de)3.471 E (v/fd)-.15 E F0 .971(method of)3.471 F .022(naming open \214les.)108 235.2 R .021(It tak)5.022 F .021(es the form of)-.1 F F1(<\()2.521 E F2 (list)A F1(\)).833 E F0(or)2.521 E F1(>\()2.521 E F2(list)A F1(\)).833 E F0 5.021(.T)C .021(he process)-5.021 F F2(list)2.521 E F0 .021 (is run with its input or output con-)2.521 F .058(nected to a)108 247.2 R F2(FIFO)2.558 E F0 .058(or some \214le in)2.558 F F1(/de)2.558 E(v/fd) -.15 E F0 5.058(.T)C .058(he name of this \214le is passed as an ar) -5.058 F .059(gument to the current com-)-.18 F .131 (mand as the result of the e)108 259.2 R 2.631(xpansion. If)-.15 F(the) 2.63 E F1(>\()2.63 E F2(list)A F1(\)).833 E F0 .13 (form is used, writing to the \214le will pro)2.63 F .13(vide input for) -.15 F F2(list)2.63 E F0(.)A(If the)108 271.2 Q F1(<\()2.5 E F2(list)A F1(\)).833 E F0(form is used, the \214le passed as an ar)2.5 E (gument should be read to obtain the output of)-.18 E F2(list)2.5 E F0 (.)A .896(When a)108 288 R -.25(va)-.2 G .896(ilable, process substitut\ ion is performed simultaneously with parameter and v).25 F .897 (ariable e)-.25 F(xpansion,)-.15 E (command substitution, and arithmetic e)108 300 Q(xpansion.)-.15 E F1 -.75(Wo)87 316.8 S(rd Splitting).75 E F0 1.143 (The shell scans the results of parameter e)108 328.8 R 1.142 (xpansion, command substitution, and arithmetic e)-.15 F 1.142 (xpansion that)-.15 F(did not occur within double quotes for)108 340.8 Q F2(wor)2.5 E 2.5(ds)-.37 G(plitting)-2.5 E F0(.).22 E .063 (The shell treats each character of)108 357.6 R F3(IFS)2.563 E F0 .063 (as a delimiter)2.313 F 2.563(,a)-.4 G .063 (nd splits the results of the other e)-2.563 F .063(xpansions into w) -.15 F(ords)-.1 E .628(on these characters.)108 369.6 R(If)5.628 E F3 (IFS)3.128 E F0 .627(is unset, or its v)2.877 F .627(alue is e)-.25 F (xactly)-.15 E F1()3.127 E F0 3.127(,t)C .627 (he def)-3.127 F .627(ault, then an)-.1 F(y)-.15 E 2.527(sequence of)108 381.6 R F3(IFS)5.027 E F0 2.527(characters serv)4.777 F 2.527 (es to delimit w)-.15 F 5.027(ords. If)-.1 F F3(IFS)5.027 E F0 2.527 (has a v)4.777 F 2.527(alue other than the def)-.25 F 2.528(ault, then) -.1 F .363(sequences of the whitespace characters)108 393.6 R F1(space) 2.863 E F0(and)2.863 E F1(tab)2.863 E F0 .363(are ignored at the be) 2.863 F .362(ginning and end of the w)-.15 F .362(ord, as)-.1 F .334 (long as the whitespace character is in the v)108 405.6 R .334(alue of) -.25 F F3(IFS)2.834 E F0(\(an)2.584 E F3(IFS)2.834 E F0 .335 (whitespace character\).)2.585 F(An)5.335 E 2.835(yc)-.15 G .335 (haracter in)-2.835 F F3(IFS)2.835 E F0 .296(that is not)108 417.6 R F3 (IFS)2.795 E F0 .295(whitespace, along with an)2.545 F 2.795(ya)-.15 G (djacent)-2.795 E F3(IFS)2.795 E F0 .295 (whitespace characters, delimits a \214eld.)2.545 F 2.795(As)5.295 G (equence)-2.795 E(of)108 429.6 Q F3(IFS)3.752 E F0 1.252 (whitespace characters is also treated as a delimiter)3.502 F 6.252(.I) -.55 G 3.752(ft)-6.252 G 1.252(he v)-3.752 F 1.252(alue of)-.25 F F3 (IFS)3.752 E F0 1.253(is null, no w)3.502 F 1.253(ord splitting)-.1 F (occurs.)108 441.6 Q 1.8(Explicit null ar)108 458.4 R 1.8(guments \() -.18 F F1 .833("").833 G F0(or)3.467 E F1 .833('')5.133 G F0 4.3(\)a)C 1.8(re retained.)-4.3 F 1.799(Unquoted implicit null ar)6.8 F 1.799 (guments, resulting from the)-.18 F -.15(ex)108 470.4 S .176 (pansion of parameters that ha).15 F .476 -.15(ve n)-.2 H 2.676(ov).15 G .176(alues, are remo)-2.926 F -.15(ve)-.15 G 2.676(d. If).15 F 2.677(ap) 2.677 G .177(arameter with no v)-2.677 F .177(alue is e)-.25 F .177 (xpanded within)-.15 F(double quotes, a null ar)108 482.4 Q (gument results and is retained.)-.18 E(Note that if no e)108 499.2 Q (xpansion occurs, no splitting is performed.)-.15 E F1 -.1(Pa)87 516 S (thname Expansion).1 E F0 .371(After w)108 528 R .371 (ord splitting, unless the)-.1 F F12.871 E F0 .371 (option has been set,)2.871 F F1(bash)2.871 E F0 .37(scans each w)2.87 F .37(ord for the characters)-.1 F F1(*)2.87 E F0(,)A F1(?)2.87 E F0 2.87 (,a)C(nd)-2.87 E F1([)2.87 E F0(.)A .677 (If one of these characters appears, then the w)108 540 R .677 (ord is re)-.1 F -.05(ga)-.15 G .677(rded as a).05 F F2(pattern)3.177 E F0 3.177(,a).24 G .678(nd replaced with an alphabeti-)-3.177 F 1.457 (cally sorted list of \214le names matching the pattern.)108 552 R 1.456 (If no matching \214le names are found, and the shell)6.457 F(option)108 564 Q F1(nullglob)3.265 E F0 .765(is disabled, the w)3.265 F .765 (ord is left unchanged.)-.1 F .765(If the)5.765 F F1(nullglob)3.265 E F0 .765(option is set, and no matches are)3.265 F 1.334(found, the w)108 576 R 1.333(ord is remo)-.1 F -.15(ve)-.15 G 3.833(d. If).15 F 1.333 (the shell option)3.833 F F1(nocaseglob)3.833 E F0 1.333 (is enabled, the match is performed without)3.833 F(re)108 588 Q -.05 (ga)-.15 G .693(rd to the case of alphabetic characters.).05 F .694 (When a pattern is used for pathname e)5.694 F .694 (xpansion, the character)-.15 F F1 -.63(``)108 600 S -.55(.').63 G(') -.08 E F0 1.091(at the start of a name or immediately follo)6.091 F 1.09 (wing a slash must be matched e)-.25 F(xplicitly)-.15 E 3.59(,u)-.65 G 1.09(nless the shell)-3.59 F(option)108 612 Q F1(dotglob)3.055 E F0 .555 (is set.)3.055 F .555 (When matching a pathname, the slash character must al)5.555 F -.1(wa) -.1 G .556(ys be matched e).1 F(xplicitly)-.15 E(.)-.65 E .315 (In other cases, the)108 624 R F1 -.63(``)2.815 G -.55(.').63 G(')-.08 E F0 .315(character is not treated specially)5.315 F 5.314(.S)-.65 G .314 (ee the description of)-5.314 F F1(shopt)2.814 E F0(belo)2.814 E 2.814 (wu)-.25 G(nder)-2.814 E F3(SHELL)2.814 E -.09(BU)108 636 S(IL).09 E (TIN COMMANDS)-.828 E F0(for a description of the)2.25 E F1(nocaseglob) 2.5 E F0(,)A F1(nullglob)2.5 E F0 2.5(,a)C(nd)-2.5 E F1(dotglob)2.5 E F0 (shell options.)2.5 E(The)108 652.8 Q F3(GLOBIGNORE)2.63 E F0 .13 (shell v)2.38 F .131 (ariable may be used to restrict the set of \214le names matching a)-.25 F F2(pattern)2.631 E F0 5.131(.I).24 G(f)-5.131 E F3(GLO-)2.631 E (BIGNORE)108 664.8 Q F0 2.015(is set, each matching \214le name that al\ so matches one of the patterns in)4.265 F F3(GLOBIGNORE)4.515 E F0(is) 4.264 E(remo)108 676.8 Q -.15(ve)-.15 G 3(df).15 G .5 (rom the list of matches.)-3 F .5(The \214le names)5.5 F F1 -.63(``)3 G -.55(.').63 G(')-.08 E F0(and)5.5 E F1 -.63(``)3 G(..).63 E -.63('')-.55 G F0 .5(are al)6.13 F -.1(wa)-.1 G .5(ys ignored, e).1 F -.15(ve)-.25 G 3(nw).15 G(hen)-3 E F3(GLOBIG-)3 E(NORE)108 688.8 Q F0 .958(is set.) 3.208 F(Ho)5.958 E(we)-.25 E -.15(ve)-.25 G 1.757 -.4(r, s).15 H(etting) .4 E F3(GLOBIGNORE)3.457 E F0 .957(has the ef)3.207 F .957 (fect of enabling the)-.25 F F1(dotglob)3.457 E F0 .957 (shell option, so all)3.457 F .101(other \214le names be)108 700.8 R .101(ginning with a)-.15 F F1 -.63(``)2.601 G -.55(.').63 G(')-.08 E F0 .101(will match.)5.101 F 1.701 -.8(To g)5.101 H .101(et the old beha).8 F .101(vior of ignoring \214le names be)-.2 F(ginning)-.15 E .468 (with a)108 712.8 R F1 -.63(``)2.968 G -.55(.').63 G(')-.08 E F0 2.968 (,m)C(ak)-2.968 E(e)-.1 E F1 -.63(``)2.968 G(.*').63 E(')-.63 E F0 .468 (one of the patterns in)5.468 F F3(GLOBIGNORE)2.968 E F4(.)A F0(The) 4.968 E F1(dotglob)2.968 E F0 .467(option is disabled when)2.968 F F3 (GLO-)2.967 E(BIGNORE)108 724.8 Q F0(is unset.)2.25 E(GNU Bash-2.05a)72 768 Q(2001 No)126.115 E -.15(ve)-.15 G(mber 13).15 E(17)185.545 E EP %%Page: 18 18 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\)) -.35 E/F1 10/Times-Bold@0 SF -.1(Pa)108 84 S(tter).1 E 2.5(nM)-.15 G (atching)-2.5 E F0(An)108 100.8 Q 3.138(yc)-.15 G .638(haracter that ap\ pears in a pattern, other than the special pattern characters described\ belo)-3.138 F 1.938 -.65(w, m)-.25 H(atches).65 E 2.564(itself. The)108 112.8 R .064(NUL character may not occur in a pattern.)2.564 F .064 (The special pattern characters must be quoted if the)5.064 F(y)-.15 E (are to be matched literally)108 124.8 Q(.)-.65 E (The special pattern characters ha)108 141.6 Q .3 -.15(ve t)-.2 H (he follo).15 E(wing meanings:)-.25 E F1(*)108 158.4 Q F0(Matches an)31 E 2.5(ys)-.15 G(tring, including the null string.)-2.5 E F1(?)108 170.4 Q F0(Matches an)31 E 2.5(ys)-.15 G(ingle character)-2.5 E(.)-.55 E F1 ([...])108 182.4 Q F0 .256(Matches an)21.84 F 2.756(yo)-.15 G .257 (ne of the enclosed characters.)-2.756 F 2.757(Ap)5.257 G .257 (air of characters separated by a h)-2.757 F .257(yphen denotes a)-.05 F /F2 10/Times-Italic@0 SF -.15(ra)144 194.4 S(ng).15 E 3.29(ee)-.1 G(xpr) -3.49 E(ession)-.37 E F0 3.29(;a)C 1.09 -.15(ny c)-3.29 H .789 (haracter that sorts between those tw).15 F 3.289(oc)-.1 G .789 (haracters, inclusi)-3.289 F -.15(ve)-.25 G 3.289(,u).15 G .789 (sing the cur)-3.289 F(-)-.2 E .349(rent locale')144 206.4 R 2.849(sc) -.55 G .349(ollating sequence and character set, is matched.)-2.849 F .35(If the \214rst character follo)5.349 F .35(wing the)-.25 F F1([)2.85 E F0 .564(is a)144 218.4 R F1(!)3.064 E F0 .564(or a)5.564 F F1(^)3.064 E F0 .564(then an)3.064 F 3.064(yc)-.15 G .564 (haracter not enclosed is matched.)-3.064 F .563 (The sorting order of characters in range)5.564 F -.15(ex)144 230.4 S 1.102(pressions is determined by the current locale and the v).15 F 1.102(alue of the)-.25 F F1(LC_COLLA)3.602 E(TE)-.95 E F0 1.103(shell v) 3.603 F(ari-)-.25 E .089(able, if set.)144 242.4 R(A)5.089 E F12.589 E F0 .088(may be matched by including it as the \214rst or last charact\ er in the set.)2.589 F(A)5.088 E F1(])2.588 E F0 .088(may be)2.588 F (matched by including it as the \214rst character in the set.)144 254.4 Q -.4(Wi)144 272.4 S(thin).4 E F1([)2.914 E F0(and)2.914 E F1(])2.914 E F0(,)A F2 -.15(ch)2.914 G(ar).15 E .414(acter classes)-.15 F F0 .415 (can be speci\214ed using the syntax)2.915 F F1([:)2.915 E F2(class)A F1 (:])A F0 2.915(,w)C(here)-2.915 E F2(class)2.915 E F0 .415(is one of) 2.915 F(the follo)144 284.4 Q (wing classes de\214ned in the POSIX.2 standard:)-.25 E F1 5 (alnum alpha ascii blank cntrl digit graph lo)144 296.4 R 5 (wer print punct space upper xdigit)-.1 F F0 2.5(Ac)144 308.4 S (haracter class matches an)-2.5 E 2.5(yc)-.15 G (haracter belonging to that class.)-2.5 E -.4(Wi)144 326.4 S(thin).4 E F1([)3.547 E F0(and)3.547 E F1(])3.547 E F0 3.547(,a)C(n)-3.547 E F2 1.046(equivalence class)3.546 F F0 1.046 (can be speci\214ed using the syntax)3.546 F F1([=)3.546 E F2(c)A F1(=]) A F0 3.546(,w)C 1.046(hich matches all)-3.546 F(characters with the sam\ e collation weight \(as de\214ned by the current locale\) as the charac\ ter)144 338.4 Q F2(c)2.5 E F0(.)A -.4(Wi)144 356.4 S(thin).4 E F1([)2.5 E F0(and)2.5 E F1(])2.5 E F0 2.5(,t)C(he syntax)-2.5 E F1([.)2.5 E F2 (symbol)A F1(.])A F0(matches the collating symbol)2.5 E F2(symbol)2.5 E F0(.)A .704(If the)108 373.2 R F1(extglob)3.204 E F0 .705 (shell option is enabled using the)3.204 F F1(shopt)3.205 E F0 -.2(bu) 3.205 G .705(iltin, se).2 F -.15(ve)-.25 G .705(ral e).15 F .705 (xtended pattern matching operators)-.15 F .256(are recognized.)108 385.2 R .256(In the follo)5.256 F .256(wing description, a)-.25 F F2 (pattern-list)2.755 E F0 .255 (is a list of one or more patterns separated by a)2.755 F F1(|)2.755 E F0(.)A(Composite patterns may be formed using one or more of the follo) 108 397.2 Q(wing sub-patterns:)-.25 E F1(?\()144 421.2 Q F2 (pattern-list).833 E F1(\)).833 E F0 (Matches zero or one occurrence of the gi)180 433.2 Q -.15(ve)-.25 G 2.5 (np).15 G(atterns)-2.5 E F1(*\()144 445.2 Q F2(pattern-list).833 E F1 (\)).833 E F0(Matches zero or more occurrences of the gi)180 457.2 Q -.15(ve)-.25 G 2.5(np).15 G(atterns)-2.5 E F1(+\()144 469.2 Q F2 (pattern-list).833 E F1(\)).833 E F0 (Matches one or more occurrences of the gi)180 481.2 Q -.15(ve)-.25 G 2.5(np).15 G(atterns)-2.5 E F1(@\()144 493.2 Q F2(pattern-list).833 E F1 (\)).833 E F0(Matches e)180 505.2 Q(xactly one of the gi)-.15 E -.15(ve) -.25 G 2.5(np).15 G(atterns)-2.5 E F1(!\()144 517.2 Q F2(pattern-list) .833 E F1(\)).833 E F0(Matches an)180 529.2 Q(ything e)-.15 E (xcept one of the gi)-.15 E -.15(ve)-.25 G 2.5(np).15 G(atterns)-2.5 E F1(Quote Remo)87 546 Q -.1(va)-.1 G(l).1 E F0 1.08 (After the preceding e)108 558 R 1.08 (xpansions, all unquoted occurrences of the characters)-.15 F F1(\\)3.58 E F0(,)A F1(')3.58 E F0 3.58(,a)C(nd)-3.58 E F1(")4.413 E F0 1.081 (that did not result)4.414 F(from one of the abo)108 570 Q .3 -.15 (ve ex)-.15 H(pansions are remo).15 E -.15(ve)-.15 G(d.).15 E/F3 10.95 /Times-Bold@0 SF(REDIRECTION)72 586.8 Q F0 .594(Before a command is e) 108 598.8 R -.15(xe)-.15 G .593(cuted, its input and output may be).15 F F2 -.37(re)3.093 G(dir).37 E(ected)-.37 E F0 .593 (using a special notation interpreted)3.093 F .616(by the shell.)108 610.8 R .617(Redirection may also be used to open and close \214les for\ the current shell e)5.616 F -.15(xe)-.15 G .617(cution en).15 F(viron-) -.4 E 3.354(ment. The)108 622.8 R(follo)3.354 E .854 (wing redirection operators may precede or appear an)-.25 F .853 (ywhere within a)-.15 F F2 .853(simple command)3.353 F F0(or)3.353 E (may follo)108 634.8 Q 2.5(wa)-.25 G F2(command)A F0 5(.R).77 G (edirections are processed in the order the)-5 E 2.5(ya)-.15 G(ppear) -2.5 E 2.5(,f)-.4 G(rom left to right.)-2.5 E .447(In the follo)108 651.6 R .447(wing descriptions, if the \214le descriptor number is omit\ ted, and the \214rst character of the redirec-)-.25 F .366 (tion operator is)108 663.6 R F1(<)2.866 E F0 2.866(,t)C .366 (he redirection refers to the standard input \(\214le descriptor 0\).) -2.866 F .365(If the \214rst character of the)5.366 F (redirection operator is)108 675.6 Q F1(>)2.5 E F0 2.5(,t)C (he redirection refers to the standard output \(\214le descriptor 1\).) -2.5 E .824(The w)108 692.4 R .824(ord follo)-.1 F .824 (wing the redirection operator in the follo)-.25 F .825 (wing descriptions, unless otherwise noted, is sub-)-.25 F .773 (jected to brace e)108 704.4 R .773(xpansion, tilde e)-.15 F .773 (xpansion, parameter e)-.15 F .772 (xpansion, command substitution, arithmetic e)-.15 F(xpan-)-.15 E .843 (sion, quote remo)108 716.4 R -.25(va)-.15 G .843(l, pathname e).25 F .843(xpansion, and w)-.15 F .843(ord splitting.)-.1 F .843(If it e)5.843 F .843(xpands to more than one w)-.15 F(ord,)-.1 E F1(bash)3.344 E F0 (reports an error)108 728.4 Q(.)-.55 E(GNU Bash-2.05a)72 768 Q(2001 No) 126.115 E -.15(ve)-.15 G(mber 13).15 E(18)185.545 E EP %%Page: 19 19 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\)) -.35 E(Note that the order of redirections is signi\214cant.)108 84 Q -.15(Fo)5 G 2.5(re).15 G(xample, the command)-2.65 E(ls)144 100.8 Q/F1 10/Times-Bold@0 SF(>)2.5 E F0(dirlist 2)2.5 E F1(>&)A F0(1)A (directs both standard output and standard error to the \214le)108 117.6 Q/F2 10/Times-Italic@0 SF(dirlist)2.5 E F0 2.5(,w).68 G (hile the command)-2.5 E(ls 2)144 134.4 Q F1(>&)A F0(1)A F1(>)2.5 E F0 (dirlist)2.5 E .388(directs only the standard output to \214le)108 151.2 R F2(dirlist)2.888 E F0 2.888(,b).68 G .387(ecause the standard error w) -2.888 F .387(as duplicated as standard output)-.1 F (before the standard output w)108 163.2 Q(as redirected to)-.1 E F2 (dirlist)2.5 E F0(.).68 E F1(Bash)108 180 Q F0 .598(handles se)3.098 F -.15(ve)-.25 G .598(ral \214lenames specially when the).15 F 3.099(ya) -.15 G .599(re used in redirections, as described in the follo)-3.099 F (wing)-.25 E(table:)108 192 Q F1(/de)144 208.8 Q(v/fd/)-.15 E F2(fd)A F0 (If)180 220.8 Q F2(fd)2.5 E F0(is a v)2.5 E(alid inte)-.25 E(ger)-.15 E 2.5<2c8c>-.4 G(le descriptor)-2.5 E F2(fd)2.5 E F0(is duplicated.)2.5 E F1(/de)144 232.8 Q(v/stdin)-.15 E F0(File descriptor 0 is duplicated.) 180 244.8 Q F1(/de)144 256.8 Q(v/stdout)-.15 E F0 (File descriptor 1 is duplicated.)180 268.8 Q F1(/de)144 280.8 Q (v/stderr)-.15 E F0(File descriptor 2 is duplicated.)180 292.8 Q F1(/de) 144 304.8 Q(v/tcp/)-.15 E F2(host)A F1(/)A F2(port)A F0(If)180 316.8 Q F2(host)2.997 E F0 .497(is a v)2.997 F .497 (alid hostname or Internet address, and)-.25 F F2(port)2.996 E F0 .496 (is an inte)2.996 F .496(ger port number or ser)-.15 F(-)-.2 E (vice name,)180 328.8 Q F1(bash)2.5 E F0 (attempts to open a TCP connection to the corresponding sock)2.5 E(et.) -.1 E F1(/de)144 340.8 Q(v/udp/)-.15 E F2(host)A F1(/)A F2(port)A F0(If) 180 352.8 Q F2(host)2.996 E F0 .496(is a v)2.996 F .496 (alid hostname or Internet address, and)-.25 F F2(port)2.997 E F0 .497 (is an inte)2.997 F .497(ger port number or ser)-.15 F(-)-.2 E (vice name,)180 364.8 Q F1(bash)2.5 E F0 (attempts to open a UDP connection to the corresponding sock)2.5 E(et.) -.1 E 2.5(Af)108 381.6 S (ailure to open or create a \214le causes the redirection to f)-2.6 E (ail.)-.1 E F1(Redir)87 398.4 Q(ecting Input)-.18 E F0 .453 (Redirection of input causes the \214le whose name results from the e) 108 410.4 R .453(xpansion of)-.15 F F2(wor)2.953 E(d)-.37 E F0 .452 (to be opened for read-)2.953 F(ing on \214le descriptor)108 422.4 Q F2 (n)2.5 E F0 2.5(,o).24 G 2.5(rt)-2.5 G (he standard input \(\214le descriptor 0\) if)-2.5 E F2(n)2.5 E F0 (is not speci\214ed.)2.5 E(The general format for redirecting input is:) 108 439.2 Q([)144 456 Q F2(n)A F0(])A F1(<)A F2(wor)A(d)-.37 E F1(Redir) 87 472.8 Q(ecting Output)-.18 E F0 .236 (Redirection of output causes the \214le whose name results from the e) 108 484.8 R .236(xpansion of)-.15 F F2(wor)2.736 E(d)-.37 E F0 .236 (to be opened for writ-)2.736 F .853(ing on \214le descriptor)108 496.8 R F2(n)3.353 E F0 3.353(,o).24 G 3.353(rt)-3.353 G .853 (he standard output \(\214le descriptor 1\) if)-3.353 F F2(n)3.353 E F0 .853(is not speci\214ed.)3.353 F .852(If the \214le does not)5.853 F -.15(ex)108 508.8 S(ist it is created; if it does e).15 E (xist it is truncated to zero size.)-.15 E (The general format for redirecting output is:)108 525.6 Q([)144 542.4 Q F2(n)A F0(])A F1(>)A F2(wor)A(d)-.37 E F0 .154 (If the redirection operator is)108 559.2 R F1(>)2.654 E F0 2.654(,a)C .154(nd the)-2.654 F F1(noclob)2.654 E(ber)-.1 E F0 .154(option to the) 2.654 F F1(set)2.655 E F0 -.2(bu)2.655 G .155 (iltin has been enabled, the redirection).2 F .077(will f)108 571.2 R .076(ail if the \214le whose name results from the e)-.1 F .076 (xpansion of)-.15 F F2(wor)2.576 E(d)-.37 E F0 -.15(ex)2.576 G .076 (ists and is a re).15 F .076(gular \214le.)-.15 F .076(If the redirec-) 5.076 F .547(tion operator is)108 583.2 R F1(>|)3.047 E F0 3.047(,o)C 3.047(rt)-3.047 G .547(he redirection operator is)-3.047 F F1(>)3.047 E F0 .547(and the)3.047 F F1(noclob)3.047 E(ber)-.1 E F0 .548 (option to the)3.048 F F1(set)3.048 E F0 -.2(bu)3.048 G .548 (iltin command is).2 F(not enabled, the redirection is attempted e)108 595.2 Q -.15(ve)-.25 G 2.5(ni).15 G 2.5(ft)-2.5 G(he \214le named by) -2.5 E F2(wor)2.5 E(d)-.37 E F0 -.15(ex)2.5 G(ists.).15 E F1 -.25(Ap)87 612 S(pending Redir).25 E(ected Output)-.18 E F0 .704 (Redirection of output in this f)108 624 R .703 (ashion causes the \214le whose name results from the e)-.1 F .703 (xpansion of)-.15 F F2(wor)3.203 E(d)-.37 E F0 .703(to be)3.203 F .505 (opened for appending on \214le descriptor)108 636 R F2(n)3.005 E F0 3.005(,o).24 G 3.005(rt)-3.005 G .505 (he standard output \(\214le descriptor 1\) if)-3.005 F F2(n)3.006 E F0 .506(is not speci\214ed.)3.006 F(If)5.506 E(the \214le does not e)108 648 Q(xist it is created.)-.15 E (The general format for appending output is:)108 664.8 Q([)144 681.6 Q F2(n)A F0(])A F1(>>)A F2(wor)A(d)-.37 E F1(Redir)87 703.2 Q (ecting Standard Output and Standard Err)-.18 E(or)-.18 E(Bash)108 715.2 Q F0(allo)3.142 E .642(ws both the standard output \(\214le descriptor \ 1\) and the standard error output \(\214le descriptor 2\) to)-.25 F (be redirected to the \214le whose name is the e)108 727.2 Q (xpansion of)-.15 E F2(wor)2.5 E(d)-.37 E F0(with this construct.)2.5 E (GNU Bash-2.05a)72 768 Q(2001 No)126.115 E -.15(ve)-.15 G(mber 13).15 E (19)185.545 E EP %%Page: 20 20 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\)) -.35 E(There are tw)108 84 Q 2.5(of)-.1 G (ormats for redirecting standard output and standard error:)-2.5 E/F1 10 /Times-Bold@0 SF(&>)144 100.8 Q/F2 10/Times-Italic@0 SF(wor)A(d)-.37 E F0(and)108 112.8 Q F1(>&)144 124.8 Q F2(wor)A(d)-.37 E F0(Of the tw)108 141.6 Q 2.5(of)-.1 G(orms, the \214rst is preferred.)-2.5 E (This is semantically equi)5 E -.25(va)-.25 G(lent to).25 E F1(>)144 158.4 Q F2(wor)A(d)-.37 E F0(2)2.5 E F1(>&)A F0(1)A F1(Her)87 175.2 Q 2.5(eD)-.18 G(ocuments)-2.5 E F0 .33(This type of redirection instructs\ the shell to read input from the current source until a line containin\ g only)108 187.2 R F2(wor)108 199.2 Q(d)-.37 E F0 .737 (\(with no trailing blanks\) is seen.)3.237 F .737 (All of the lines read up to that point are then used as the standard) 5.737 F(input for a command.)108 211.2 Q (The format of here-documents is as follo)108 228 Q(ws:)-.25 E F1(<<)144 244.8 Q F0([)A F1A F0(])A F2(wor)A(d)-.37 E(her)164 256.8 Q (e-document)-.37 E(delimiter)144 268.8 Q F0 .127(No parameter e)108 285.6 R .127(xpansion, command substitution, arithmetic e)-.15 F .127 (xpansion, or pathname e)-.15 F .128(xpansion is performed)-.15 F(on)108 297.6 Q F2(wor)2.609 E(d)-.37 E F0 5.109(.I).77 G 2.609(fa)-5.109 G .409 -.15(ny c)-2.609 H .109(haracters in).15 F F2(wor)2.609 E(d)-.37 E F0 .109(are quoted, the)2.609 F F2(delimiter)2.609 E F0 .109 (is the result of quote remo)2.609 F -.25(va)-.15 G 2.609(lo).25 G(n) -2.609 E F2(wor)2.609 E(d)-.37 E F0 2.609(,a).77 G .109(nd the)-2.609 F .61(lines in the here-document are not e)108 309.6 R 3.11(xpanded. If) -.15 F F2(wor)3.111 E(d)-.37 E F0 .611 (is unquoted, all lines of the here-document are sub-)3.111 F .006 (jected to parameter e)108 321.6 R .006 (xpansion, command substitution, and arithmetic e)-.15 F 2.506 (xpansion. In)-.15 F .005(the latter case, the char)2.506 F(-)-.2 E (acter sequence)108 333.6 Q F1(\\)2.5 E F0(is ignored, and)2.5 E F1(\\)2.5 E F0(must be used to quote the characters)2.5 E F1(\\)2.5 E F0(,)A F1($)2.5 E F0 2.5(,a)C(nd)-2.5 E F1(`)2.5 E F0(.)A .601 (If the redirection operator is)108 350.4 R F1(<<\255)3.101 E F0 3.101 (,t)C .601(hen all leading tab characters are stripped from input lines\ and the line)-3.101 F(containing)108 362.4 Q F2(delimiter)2.5 E F0 5 (.T).73 G(his allo)-5 E (ws here-documents within shell scripts to be indented in a natural f) -.25 E(ashion.)-.1 E F1(Duplicating File Descriptors)87 379.2 Q F0 (The redirection operator)108 391.2 Q([)144 408 Q F2(n)A F0(])A F1(<&)A F2(wor)A(d)-.37 E F0 .189 (is used to duplicate input \214le descriptors.)108 424.8 R(If)5.188 E F2(wor)2.688 E(d)-.37 E F0 -.15(ex)2.688 G .188 (pands to one or more digits, the \214le descriptor denoted).15 F(by)108 436.8 Q F2(n)3.031 E F0 .531(is made to be a cop)3.031 F 3.032(yo)-.1 G 3.032(ft)-3.032 G .532(hat \214le descriptor)-3.032 F 5.532(.I)-.55 G 3.032(ft)-5.532 G .532(he digits in)-3.032 F F2(wor)3.032 E(d)-.37 E F0 .532(do not specify a \214le descriptor open)3.032 F .265 (for input, a redirection error occurs.)108 448.8 R(If)5.265 E F2(wor) 2.765 E(d)-.37 E F0 -.25(eva)2.765 G .265(luates to).25 F F12.765 E F0 2.765<2c8c>C .265(le descriptor)-2.765 F F2(n)2.765 E F0 .265 (is closed.)2.765 F(If)5.265 E F2(n)2.765 E F0 .265(is not speci\214ed,) 2.765 F(the standard input \(\214le descriptor 0\) is used.)108 460.8 Q (The operator)108 477.6 Q([)144 494.4 Q F2(n)A F0(])A F1(>&)A F2(wor)A (d)-.37 E F0 .021 (is used similarly to duplicate output \214le descriptors.)108 511.2 R (If)5.021 E F2(n)2.521 E F0 .021 (is not speci\214ed, the standard output \(\214le descriptor)2.521 F .539(1\) is used.)108 523.2 R .539(If the digits in)5.539 F F2(wor)3.039 E(d)-.37 E F0 .538(do not specify a \214le descriptor open for output, \ a redirection error occurs.)3.039 F .439(As a special case, if)108 535.2 R F2(n)2.939 E F0 .439(is omitted, and)2.939 F F2(wor)2.939 E(d)-.37 E F0 .44(does not e)2.939 F .44 (xpand to one or more digits, the standard output and)-.15 F (standard error are redirected as described pre)108 547.2 Q(viously)-.25 E(.)-.65 E F1(Opening File Descriptors f)87 564 Q (or Reading and Writing)-.25 E F0(The redirection operator)108 576 Q([) 144 592.8 Q F2(n)A F0(])A F1(<>)A F2(wor)A(d)-.37 E F0 1.408 (causes the \214le whose name is the e)108 609.6 R 1.407(xpansion of) -.15 F F2(wor)3.907 E(d)-.37 E F0 1.407 (to be opened for both reading and writing on \214le)3.907 F(descriptor) 108 621.6 Q F2(n)2.5 E F0 2.5(,o).24 G 2.5(ro)-2.5 G 2.5<6e8c>-2.5 G (le descriptor 0 if)-2.5 E F2(n)2.5 E F0(is not speci\214ed.)2.5 E (If the \214le does not e)5 E(xist, it is created.)-.15 E/F3 10.95 /Times-Bold@0 SF(ALIASES)72 638.4 Q F2(Aliases)108 650.4 Q F0(allo)3.173 E 3.173(was)-.25 G .674(tring to be substituted for a w)-3.173 F .674 (ord when it is used as the \214rst w)-.1 F .674 (ord of a simple command.)-.1 F .394(The shell maintains a list of alia\ ses that may be set and unset with the)108 662.4 R F1(alias)2.893 E F0 (and)2.893 E F1(unalias)2.893 E F0 -.2(bu)2.893 G .393(iltin commands).2 F(\(see)108 674.4 Q/F4 9/Times-Bold@0 SF .763(SHELL B)3.263 F(UIL)-.09 E .763(TIN COMMANDS)-.828 F F0(belo)3.013 E 3.263(w\). The)-.25 F .763 (\214rst w)3.263 F .763(ord of each command, if unquoted, is check)-.1 F .764(ed to)-.1 F .634(see if it has an alias.)108 686.4 R .634 (If so, that w)5.634 F .633(ord is replaced by the te)-.1 F .633 (xt of the alias.)-.15 F .633(The alias name and the replace-)5.633 F .58(ment te)108 698.4 R .58(xt may contain an)-.15 F 3.08(yv)-.15 G .581 (alid shell input, including the)-3.33 F F2(metac)3.081 E(har)-.15 E (acter)-.15 E(s)-.1 E F0 .581(listed abo)3.081 F -.15(ve)-.15 G 3.081 (,w).15 G .581(ith the e)-3.081 F(xception)-.15 E .997 (that the alias name may not contain)108 710.4 R F2(=)3.497 E F0 5.997 (.T)C .997(he \214rst w)-5.997 F .996(ord of the replacement te)-.1 F .996(xt is tested for aliases, b)-.15 F .996(ut a)-.2 F -.1(wo)108 722.4 S .494(rd that is identical to an alias being e).1 F .495 (xpanded is not e)-.15 F .495(xpanded a second time.)-.15 F .495 (This means that one may)5.495 F(GNU Bash-2.05a)72 768 Q(2001 No)126.115 E -.15(ve)-.15 G(mber 13).15 E(20)185.545 E EP %%Page: 21 21 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\)) -.35 E(alias)108 84 Q/F1 10/Times-Bold@0 SF(ls)3.02 E F0(to)3.02 E F1 .52(ls \255F)3.02 F F0 3.02(,f)C .52(or instance, and)-3.02 F F1(bash) 3.02 E F0 .519(does not try to recursi)3.02 F -.15(ve)-.25 G .519(ly e) .15 F .519(xpand the replacement te)-.15 F 3.019(xt. If)-.15 F .519 (the last)3.019 F .441(character of the alias v)108 96 R .441(alue is a) -.25 F/F2 10/Times-Italic@0 SF(blank)2.941 E F0 2.941(,t).67 G .441 (hen the ne)-2.941 F .441(xt command w)-.15 F .441(ord follo)-.1 F .441 (wing the alias is also check)-.25 F .442(ed for)-.1 F(alias e)108 108 Q (xpansion.)-.15 E(Aliases are created and listed with the)108 124.8 Q F1 (alias)2.5 E F0(command, and remo)2.5 E -.15(ve)-.15 G 2.5(dw).15 G (ith the)-2.5 E F1(unalias)2.5 E F0(command.)2.5 E .284 (There is no mechanism for using ar)108 141.6 R .284 (guments in the replacement te)-.18 F 2.784(xt. If)-.15 F(ar)2.784 E .284(guments are needed, a shell func-)-.18 F(tion should be used \(see) 108 153.6 Q/F3 9/Times-Bold@0 SF(FUNCTIONS)2.5 E F0(belo)2.25 E(w\).) -.25 E 1.22(Aliases are not e)108 170.4 R 1.22 (xpanded when the shell is not interacti)-.15 F -.15(ve)-.25 G 3.72(,u) .15 G 1.22(nless the)-3.72 F F1(expand_aliases)3.72 E F0 1.22 (shell option is set)3.72 F(using)108 182.4 Q F1(shopt)2.5 E F0 (\(see the description of)2.5 E F1(shopt)2.5 E F0(under)2.5 E F3 (SHELL B)2.5 E(UIL)-.09 E(TIN COMMANDS)-.828 E F0(belo)2.25 E(w\).)-.25 E .436 (The rules concerning the de\214nition and use of aliases are some)108 199.2 R .435(what confusing.)-.25 F F1(Bash)5.435 E F0(al)2.935 E -.1 (wa)-.1 G .435(ys reads at least).1 F .337 (one complete line of input before e)108 211.2 R -.15(xe)-.15 G .338 (cuting an).15 F 2.838(yo)-.15 G 2.838(ft)-2.838 G .338 (he commands on that line.)-2.838 F .338(Aliases are e)5.338 F .338 (xpanded when)-.15 F 3.404(ac)108 223.2 S .904 (ommand is read, not when it is e)-3.404 F -.15(xe)-.15 G 3.404 (cuted. Therefore,).15 F .904 (an alias de\214nition appearing on the same line as)3.404 F 1.161 (another command does not tak)108 235.2 R 3.662(ee)-.1 G -.25(ff)-3.662 G 1.162(ect until the ne).25 F 1.162(xt line of input is read.)-.15 F 1.162(The commands follo)6.162 F 1.162(wing the)-.25 F .277 (alias de\214nition on that line are not af)108 247.2 R .277 (fected by the ne)-.25 F 2.777(wa)-.25 G 2.777(lias. This)-2.777 F(beha) 2.777 E .277(vior is also an issue when functions)-.2 F .698(are e)108 259.2 R -.15(xe)-.15 G 3.198(cuted. Aliases).15 F .698(are e)3.198 F .699(xpanded when a function de\214nition is read, not when the functio\ n is e)-.15 F -.15(xe)-.15 G(cuted,).15 E .495 (because a function de\214nition is itself a compound command.)108 271.2 R .494(As a consequence, aliases de\214ned in a func-)5.494 F .084 (tion are not a)108 283.2 R -.25(va)-.2 G .084 (ilable until after that function is e).25 F -.15(xe)-.15 G 2.584 (cuted. T).15 F 2.584(ob)-.8 G 2.584(es)-2.584 G .084(afe, al)-2.584 F -.1(wa)-.1 G .085(ys put alias de\214nitions on a sepa-).1 F (rate line, and do not use)108 295.2 Q F1(alias)2.5 E F0 (in compound commands.)2.5 E -.15(Fo)108 312 S 2.5(ra).15 G(lmost e)-2.5 E -.15(ve)-.25 G(ry purpose, aliases are superseded by shell functions.) .15 E/F4 10.95/Times-Bold@0 SF(FUNCTIONS)72 328.8 Q F0 3.468(As)108 340.8 S .968(hell function, de\214ned as described abo)-3.468 F 1.267 -.15(ve u)-.15 H(nder).15 E F3 .967(SHELL GRAMMAR)3.467 F/F5 9 /Times-Roman@0 SF(,)A F0 .967(stores a series of commands for)3.217 F 1.001(later e)108 352.8 R -.15(xe)-.15 G 3.501(cution. When).15 F 1.002 (the name of a shell function is used as a simple command name, the lis\ t of com-)3.501 F .316(mands associated with that function name is e)108 364.8 R -.15(xe)-.15 G 2.816(cuted. Functions).15 F .316(are e)2.816 F -.15(xe)-.15 G .315(cuted in the conte).15 F .315(xt of the current)-.15 F .035(shell; no ne)108 376.8 R 2.535(wp)-.25 G .036 (rocess is created to interpret them \(contrast this with the e)-2.535 F -.15(xe)-.15 G .036(cution of a shell script\).).15 F .036(When a)5.036 F .64(function is e)108 388.8 R -.15(xe)-.15 G .64(cuted, the ar).15 F .639 (guments to the function become the positional parameters during its e) -.18 F -.15(xe)-.15 G(cution.).15 E .221(The special parameter)108 400.8 R F1(#)2.721 E F0 .221(is updated to re\215ect the change.)2.721 F .221 (Positional parameter 0 is unchanged.)5.221 F(The)5.222 E F3(FUNC-)2.722 E -.18(NA)108 412.8 S(ME).18 E F0 -.25(va)2.849 G .599 (riable is set to the name of the function while the function is e).25 F -.15(xe)-.15 G 3.098(cuting. All).15 F .598(other aspects of the)3.098 F 1.806(shell e)108 424.8 R -.15(xe)-.15 G 1.806(cution en).15 F 1.806 (vironment are identical between a function and its caller with the e) -.4 F 1.806(xception that the)-.15 F F3(DEB)108 436.8 Q(UG)-.09 E F0 1.243(trap \(see the description of the)3.493 F F1(trap)3.743 E F0 -.2 (bu)3.743 G 1.243(iltin under).2 F F3 1.243(SHELL B)3.743 F(UIL)-.09 E 1.243(TIN COMMANDS)-.828 F F0(belo)3.492 E 1.242(w\) is not)-.25 F (inherited.)108 448.8 Q -1.11(Va)108 465.6 S .655 (riables local to the function may be declared with the)1.11 F F1(local) 3.155 E F0 -.2(bu)3.156 G .656(iltin command.).2 F(Ordinarily)5.656 E 3.156(,v)-.65 G .656(ariables and)-3.406 F(their v)108 477.6 Q (alues are shared between the function and its caller)-.25 E(.)-.55 E .044(If the b)108 494.4 R .043(uiltin command)-.2 F F1 -.18(re)2.543 G (tur).18 E(n)-.15 E F0 .043(is e)2.543 F -.15(xe)-.15 G .043 (cuted in a function, the function completes and e).15 F -.15(xe)-.15 G .043(cution resumes with).15 F .311(the ne)108 506.4 R .311 (xt command after the function call.)-.15 F .311 (When a function completes, the v)5.311 F .312 (alues of the positional parame-)-.25 F(ters and the special parameter) 108 518.4 Q F1(#)2.5 E F0(are restored to the v)2.5 E(alues the)-.25 E 2.5(yh)-.15 G(ad prior to the function')-2.5 E 2.5(se)-.55 G -.15(xe) -2.65 G(cution.).15 E 1.359 (Function names and de\214nitions may be listed with the)108 535.2 R F1 3.858 E F0 1.358(option to the)3.858 F F1(declar)3.858 E(e)-.18 E F0(or)3.858 E F1(typeset)3.858 E F0 -.2(bu)3.858 G 1.358(iltin com-).2 F 2.881(mands. The)108 547.2 R F12.881 E F0 .381(option to)2.881 F F1(declar)2.881 E(e)-.18 E F0(or)2.881 E F1(typeset)2.881 E F0 .381 (will list the function names only)2.881 F 5.381(.F)-.65 G .382 (unctions may be e)-5.381 F(xported)-.15 E (so that subshells automatically ha)108 559.2 Q .3 -.15(ve t)-.2 H (hem de\214ned with the).15 E F12.5 E F0(option to the)2.5 E F1 (export)2.5 E F0 -.2(bu)2.5 G(iltin.).2 E(Functions may be recursi)108 576 Q -.15(ve)-.25 G 5(.N).15 G 2.5(ol)-5 G (imit is imposed on the number of recursi)-2.5 E .3 -.15(ve c)-.25 H (alls.).15 E F4(ARITHMETIC EV)72 592.8 Q(ALU)-1.478 E -1.04(AT)-.657 G (ION)1.04 E F0 1.478(The shell allo)108 604.8 R 1.477(ws arithmetic e) -.25 F 1.477(xpressions to be e)-.15 F -.25(va)-.25 G 1.477 (luated, under certain circumstances \(see the).25 F F1(let)3.977 E F0 -.2(bu)3.977 G(iltin).2 E 1.232(command and)108 616.8 R F1 1.232 (Arithmetic Expansion)3.732 F F0 3.732(\). Ev)B 1.232 (aluation is done in long inte)-.25 F 1.232(gers with no check for o) -.15 F -.15(ve)-.15 G(r\215o).15 E -.65(w,)-.25 G .3(though di)108 628.8 R .3(vision by 0 is trapped and \215agged as an error)-.25 F 5.299(.T) -.55 G .299(he operators and their precedence and associati)-5.299 F(v-) -.25 E .245(ity are the same as in the C language.)108 640.8 R .246 (The follo)5.246 F .246(wing list of operators is grouped into le)-.25 F -.15(ve)-.25 G .246(ls of equal-prece-).15 F(dence operators.)108 652.8 Q(The le)5 E -.15(ve)-.25 G (ls are listed in order of decreasing precedence.).15 E F2(id)108 669.6 Q F1(++)A F2(id)2.5 E F1A F0 -.25(va)144 681.6 S (riable post-increment and post-decrement).25 E F1(++)108 693.6 Q F2(id) A F12.5 E F2(id)A F0 -.25(va)144 705.6 S (riable pre-increment and pre-decrement).25 E F1 2.5108 717.6 S F0 (unary minus and plus)19.6 E(GNU Bash-2.05a)72 768 Q(2001 No)126.115 E -.15(ve)-.15 G(mber 13).15 E(21)185.545 E EP %%Page: 22 22 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\)) -.35 E/F1 10/Times-Bold@0 SF 2.5(!~)108 84 S F0(logical and bitwise ne) 24.34 E -.05(ga)-.15 G(tion).05 E F1(**)108 96 Q F0 -.15(ex)26 G (ponentiation).15 E F1 2.5(*/%)108 108 S F0(multiplication, di)10.72 E (vision, remainder)-.25 E F1 2.5<2bad>108 120 S F0 (addition, subtraction)19.6 E F1(<< >>)108 132 Q F0 (left and right bitwise shifts)10.7 E F1(<= >= < >)108 144 Q F0 (comparison)144 156 Q F1(== !=)108 168 Q F0(equality and inequality) 13.07 E F1(&)108 180 Q F0(bitwise AND)27.67 E F1(^)108 192 Q F0 (bitwise e)32.67 E(xclusi)-.15 E .3 -.15(ve O)-.25 H(R).15 E F1(|)108 204 Q F0(bitwise OR)33.8 E F1(&&)108 216 Q F0(logical AND)19.34 E F1(||) 108 228 Q F0(logical OR)31.6 E/F2 10/Times-Italic@0 SF -.2(ex)108 240 S (pr).2 E F1(?)A F2 -.2(ex)C(pr).2 E F1(:)A F2 -.2(ex)C(pr).2 E F0 (conditional e)144 252 Q -.25(va)-.25 G(luation).25 E F1 2.5(=*)108 264 S 2.5(=/)-2.5 G 2.5(=%)-2.5 G 2.5(=+)-2.5 G 2.5<3dad>-2.5 G 2.5(=<)-2.5 G(<= >>= &= ^= |=)-2.5 E F0(assignment)144 276 Q F2 -.2(ex)108 288 S (pr1).2 E F1(,)2.5 E F2 -.2(ex)2.5 G(pr2).2 E F0(comma)144 300 Q .68 (Shell v)108 316.8 R .68(ariables are allo)-.25 F .68 (wed as operands; parameter e)-.25 F .68 (xpansion is performed before the e)-.15 F .68(xpression is e)-.15 F -.25(va)-.25 G(lu-).25 E 3.507(ated. W)108 328.8 R 1.007(ithin an e)-.4 F 1.007(xpression, shell v)-.15 F 1.007 (ariables may also be referenced by name without using the parameter) -.25 F -.15(ex)108 340.8 S .152(pansion syntax.).15 F .152(The v)5.152 F .151(alue of a v)-.25 F .151(ariable is e)-.25 F -.25(va)-.25 G .151 (luated as an arithmetic e).25 F .151(xpression when it is referenced.) -.15 F(A)5.151 E(shell v)108 352.8 Q(ariable need not ha)-.25 E .3 -.15 (ve i)-.2 H(ts inte).15 E(ger attrib)-.15 E (ute turned on to be used in an e)-.2 E(xpression.)-.15 E 1.406 (Constants with a leading 0 are interpreted as octal numbers.)108 369.6 R 3.906(Al)6.406 G 1.407(eading 0x or 0X denotes he)-3.906 F(xadecimal.) -.15 E .59(Otherwise, numbers tak)108 381.6 R 3.09(et)-.1 G .59 (he form [)-3.09 F F2(base#)A F0 .59(]n, where)B F2(base)3.089 E F0 .589 (is a decimal number between 2 and 64 represent-)3.089 F .092 (ing the arithmetic base, and)108 393.6 R F2(n)2.592 E F0 .093 (is a number in that base.)2.592 F(If)5.093 E F2(base#)2.593 E F0 .093 (is omitted, then base 10 is used.)2.593 F .093(The digits)5.093 F .065 (greater than 9 are represented by the lo)108 405.6 R .064 (wercase letters, the uppercase letters, @, and _, in that order)-.25 F 5.064(.I)-.55 G(f)-5.064 E F2(base)2.564 E F0 .696 (is less than or equal to 36, lo)108 417.6 R .697 (wercase and uppercase letters may be used interchang)-.25 F .697 (ably to represent num-)-.05 F(bers between 10 and 35.)108 429.6 Q .235 (Operators are e)108 446.4 R -.25(va)-.25 G .235 (luated in order of precedence.).25 F(Sub-e)5.234 E .234 (xpressions in parentheses are e)-.15 F -.25(va)-.25 G .234 (luated \214rst and may).25 F -.15(ove)108 458.4 S (rride the precedence rules abo).15 E -.15(ve)-.15 G(.).15 E/F3 10.95 /Times-Bold@0 SF(CONDITION)72 475.2 Q(AL EXPRESSIONS)-.219 E F0 .255 (Conditional e)108 487.2 R .255(xpressions are used by the)-.15 F F1([[) 2.755 E F0 .255(compound command and the)2.755 F F1(test)2.755 E F0(and) 2.755 E F1([)2.756 E F0 -.2(bu)2.756 G .256(iltin commands to test).2 F .77(\214le attrib)108 499.2 R .77 (utes and perform string and arithmetic comparisons.)-.2 F .77 (Expressions are formed from the follo)5.77 F(wing)-.25 E 1.04 (unary or binary primaries.)108 511.2 R 1.04(If an)6.04 F(y)-.15 E F2 (\214le)3.54 E F0(ar)3.54 E 1.041 (gument to one of the primaries is of the form)-.18 F F2(/de)3.541 E (v/fd/n)-.15 E F0 3.541(,t)C 1.041(hen \214le)-3.541 F(descriptor)108 523.2 Q F2(n)3.789 E F0 1.289(is check)3.789 F 3.789(ed. If)-.1 F(the) 3.789 E F2(\214le)3.789 E F0(ar)3.789 E 1.289 (gument to one of the primaries is one of)-.18 F F2(/de)3.789 E(v/stdin) -.15 E F0(,)A F2(/de)3.788 E(v/stdout)-.15 E F0 3.788(,o)C(r)-3.788 E F2 (/de)108 535.2 Q(v/stderr)-.15 E F0 2.5<2c8c>C (le descriptor 0, 1, or 2, respecti)-2.5 E -.15(ve)-.25 G(ly).15 E 2.5 (,i)-.65 G 2.5(sc)-2.5 G(heck)-2.5 E(ed.)-.1 E F1108 559.2 Q F2 (\214le)2.5 E F0 -.35(Tr)10.58 G(ue if).35 E F2(\214le)2.5 E F0 -.15(ex) 2.5 G(ists.).15 E F1108 571.2 Q F2(\214le)2.5 E F0 -.35(Tr)10.02 G (ue if).35 E F2(\214le)2.5 E F0 -.15(ex)2.5 G (ists and is a block special \214le.).15 E F1108 583.2 Q F2 (\214le)2.5 E F0 -.35(Tr)11.14 G(ue if).35 E F2(\214le)2.5 E F0 -.15(ex) 2.5 G(ists and is a character special \214le.).15 E F1108 595.2 Q F2(\214le)2.5 E F0 -.35(Tr)10.02 G(ue if).35 E F2(\214le)2.5 E F0 -.15 (ex)2.5 G(ists and is a directory).15 E(.)-.65 E F1108 607.2 Q F2 (\214le)2.5 E F0 -.35(Tr)11.14 G(ue if).35 E F2(\214le)2.5 E F0 -.15(ex) 2.5 G(ists.).15 E F1108 619.2 Q F2(\214le)2.5 E F0 -.35(Tr)12.25 G (ue if).35 E F2(\214le)2.5 E F0 -.15(ex)2.5 G(ists and is a re).15 E (gular \214le.)-.15 E F1108 631.2 Q F2(\214le)2.5 E F0 -.35(Tr) 10.58 G(ue if).35 E F2(\214le)2.5 E F0 -.15(ex)2.5 G (ists and is set-group-id.).15 E F1108 643.2 Q F2(\214le)2.5 E F0 -.35(Tr)10.02 G(ue if).35 E F2(\214le)2.5 E F0 -.15(ex)2.5 G (ists and is a symbolic link.).15 E F1108 655.2 Q F2(\214le)2.5 E F0 -.35(Tr)10.02 G(ue if).35 E F2(\214le)2.5 E F0 -.15(ex)2.5 G (ists and its `).15 E(`stick)-.74 E(y')-.15 E 2.5('b)-.74 G(it is set.) -2.5 E F1108 667.2 Q F2(\214le)2.5 E F0 -.35(Tr)10.02 G(ue if).35 E F2(\214le)2.5 E F0 -.15(ex)2.5 G(ists and is a named pipe \(FIFO\).) .15 E F1108 679.2 Q F2(\214le)2.5 E F0 -.35(Tr)11.14 G(ue if).35 E F2(\214le)2.5 E F0 -.15(ex)2.5 G(ists and is readable.).15 E F1108 691.2 Q F2(\214le)2.5 E F0 -.35(Tr)11.69 G(ue if).35 E F2(\214le)2.5 E F0 -.15(ex)2.5 G(ists and has a size greater than zero.).15 E F1 108 703.2 Q F2(fd)2.5 E F0 -.35(Tr)16.69 G(ue if \214le descriptor).35 E F2(fd)2.5 E F0(is open and refers to a terminal.)2.5 E F1108 715.2 Q F2(\214le)2.5 E F0 -.35(Tr)10.02 G(ue if).35 E F2(\214le)2.5 E F0 -.15 (ex)2.5 G(ists and its set-user).15 E(-id bit is set.)-.2 E (GNU Bash-2.05a)72 768 Q(2001 No)126.115 E -.15(ve)-.15 G(mber 13).15 E (22)185.545 E EP %%Page: 23 23 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\)) -.35 E/F1 10/Times-Bold@0 SF108 84 Q/F2 10/Times-Italic@0 SF (\214le)2.5 E F0 -.35(Tr)8.36 G(ue if).35 E F2(\214le)2.5 E F0 -.15(ex) 2.5 G(ists and is writable.).15 E F1108 96 Q F2(\214le)2.5 E F0 -.35(Tr)10.58 G(ue if).35 E F2(\214le)2.5 E F0 -.15(ex)2.5 G (ists and is e).15 E -.15(xe)-.15 G(cutable.).15 E F1108 108 Q F2 (\214le)2.5 E F0 -.35(Tr)7.8 G(ue if).35 E F2(\214le)2.5 E F0 -.15(ex) 2.5 G(ists and is o).15 E(wned by the ef)-.25 E(fecti)-.25 E .3 -.15 (ve u)-.25 H(ser id.).15 E F1108 120 Q F2(\214le)2.5 E F0 -.35(Tr) 7.8 G(ue if).35 E F2(\214le)2.5 E F0 -.15(ex)2.5 G(ists and is o).15 E (wned by the ef)-.25 E(fecti)-.25 E .3 -.15(ve g)-.25 H(roup id.).15 E F1108 132 Q F2(\214le)2.5 E F0 -.35(Tr)8.91 G(ue if).35 E F2 (\214le)2.5 E F0 -.15(ex)2.5 G(ists and is a symbolic link.).15 E F1 108 144 Q F2(\214le)2.5 E F0 -.35(Tr)10.02 G(ue if).35 E F2 (\214le)2.5 E F0 -.15(ex)2.5 G(ists and is a sock).15 E(et.)-.1 E F1 108 156 Q F2(\214le)2.5 E F0 -.35(Tr)8.36 G(ue if).35 E F2(\214le) 2.5 E F0 -.15(ex)2.5 G(ists and has been modi\214ed since it w).15 E (as last read.)-.1 E F2(\214le1)108 168 Q F02.5 E F1(nt)A F2 (\214le2)2.5 E F0 -.35(Tr)144 180 S(ue if).35 E F2(\214le1)2.5 E F0 (is ne)2.5 E(wer \(according to modi\214cation date\) than)-.25 E F2 (\214le2)2.5 E F0(.)A F2(\214le1)108 192 Q F02.5 E F1(ot)A F2 (\214le2)2.5 E F0 -.35(Tr)144 204 S(ue if).35 E F2(\214le1)2.5 E F0 (is older than)2.5 E F2(\214le2)2.5 E F0(.)A F2(\214le1)108 216 Q F1 (\255ef)2.5 E F2(\214le2)2.5 E F0 -.35(Tr)144 228 S(ue if).35 E F2 (\214le1)2.5 E F0(and)2.5 E F2(\214le2)2.5 E F0(ha)2.5 E .3 -.15(ve t) -.2 H(he same de).15 E(vice and inode numbers.)-.25 E F1108 240 Q F2(optname)2.5 E F0 -.35(Tr)144 252 S 1.167(ue if shell option).35 F F2 (optname)3.667 E F0 1.167(is enabled.)3.667 F 1.168 (See the list of options under the description of the)6.168 F F1 3.668 E F0(option to the)144 264 Q F1(set)2.5 E F0 -.2(bu)2.5 G (iltin belo).2 E -.65(w.)-.25 G F1108 276 Q F2(string)2.5 E F0 -.35(Tr)144 288 S(ue if the length of).35 E F2(string)2.5 E F0(is zero.) 2.5 E F1108 300 Q F2(string)2.5 E(string)108 312 Q F0 -.35(Tr) 12.66 G(ue if the length of).35 E F2(string)2.5 E F0(is non-zero.)2.5 E F2(string1)108 324 Q F1(==)2.5 E F2(string2)2.5 E F0 -.35(Tr)144 336 S (ue if the strings are equal.).35 E F1(=)5 E F0(may be used in place of) 2.5 E F1(==)2.5 E F0(.)A F2(string1)108 348 Q F1(!=)2.5 E F2(string2)2.5 E F0 -.35(Tr)144 360 S(ue if the strings are not equal.).35 E F2 (string1)108 372 Q F1(<)2.5 E F2(string2)2.5 E F0 -.35(Tr)144 384 S (ue if).35 E F2(string1)2.5 E F0(sorts before)2.5 E F2(string2)2.5 E F0 (le)2.5 E(xicographically in the current locale.)-.15 E F2(string1)108 396 Q F1(>)2.5 E F2(string2)2.5 E F0 -.35(Tr)144 408 S(ue if).35 E F2 (string1)2.5 E F0(sorts after)2.5 E F2(string2)2.5 E F0(le)2.5 E (xicographically in the current locale.)-.15 E F2(ar)108 420 Q(g1)-.37 E F1(OP)2.5 E F2(ar)2.5 E(g2)-.37 E/F3 9/Times-Bold@0 SF(OP)144 432 Q F0 .385(is one of)2.635 F F1(\255eq)2.885 E F0(,)A F1(\255ne)2.885 E F0(,)A F1(\255lt)2.885 E F0(,)A F1(\255le)2.885 E F0(,)A F1(\255gt)2.885 E F0 2.885(,o)C(r)-2.885 E F1(\255ge)2.885 E F0 5.385(.T)C .385 (hese arithmetic binary operators return true if)-5.385 F F2(ar)2.884 E (g1)-.37 E F0 .845(is equal to, not equal to, less than, less than or e\ qual to, greater than, or greater than or equal to)144 444 R F2(ar)144 456 Q(g2)-.37 E F0 2.5(,r)C(especti)-2.5 E -.15(ve)-.25 G(ly).15 E(.) -.65 E F2(Ar)5 E(g1)-.37 E F0(and)2.5 E F2(ar)2.5 E(g2)-.37 E F0 (may be positi)2.5 E .3 -.15(ve o)-.25 H 2.5(rn).15 G -2.25 -.15(eg a) -2.5 H(ti).15 E .3 -.15(ve i)-.25 H(nte).15 E(gers.)-.15 E/F4 10.95 /Times-Bold@0 SF(SIMPLE COMMAND EXP)72 472.8 Q(ANSION)-.81 E F0 .614 (When a simple command is e)108 484.8 R -.15(xe)-.15 G .614 (cuted, the shell performs the follo).15 F .613(wing e)-.25 F .613 (xpansions, assignments, and redi-)-.15 F(rections, from left to right.) 108 496.8 Q 26(1. The)108 513.6 R -.1(wo)4.348 G 1.848 (rds that the parser has mark).1 F 1.848(ed as v)-.1 F 1.849 (ariable assignments \(those preceding the command)-.25 F (name\) and redirections are sa)144 525.6 Q -.15(ve)-.2 G 2.5(df).15 G (or later processing.)-2.5 E 26(2. The)108 542.4 R -.1(wo)3.664 G 1.164 (rds that are not v).1 F 1.164 (ariable assignments or redirections are e)-.25 F 3.663(xpanded. If)-.15 F(an)3.663 E 3.663(yw)-.15 G 1.163(ords remain)-3.763 F .775(after e)144 554.4 R .775(xpansion, the \214rst w)-.15 F .775(ord is tak)-.1 F .775 (en to be the name of the command and the remaining w)-.1 F(ords)-.1 E (are the ar)144 566.4 Q(guments.)-.18 E 26(3. Redirections)108 583.2 R (are performed as described abo)2.5 E .3 -.15(ve u)-.15 H(nder).15 E F3 (REDIRECTION)2.5 E/F5 9/Times-Roman@0 SF(.)A F0 26(4. The)108 600 R(te) 3.217 E .717(xt after the)-.15 F F1(=)3.217 E F0 .717(in each v)3.217 F .717(ariable assignment under)-.25 F .717(goes tilde e)-.18 F .717 (xpansion, parameter e)-.15 F(xpansion,)-.15 E .339 (command substitution, arithmetic e)144 612 R .339 (xpansion, and quote remo)-.15 F -.25(va)-.15 G 2.839(lb).25 G .339 (efore being assigned to the v)-2.839 F(ari-)-.25 E(able.)144 624 Q .332 (If no command name results, the v)108 640.8 R .332 (ariable assignments af)-.25 F .332(fect the current shell en)-.25 F 2.832(vironment. Otherwise,)-.4 F(the)2.832 E -.25(va)108 652.8 S .757 (riables are added to the en).25 F .757(vironment of the e)-.4 F -.15 (xe)-.15 G .757(cuted command and do not af).15 F .757 (fect the current shell en)-.25 F(vi-)-.4 E 3.177(ronment. If)108 664.8 R(an)3.177 E 3.177(yo)-.15 G 3.177(ft)-3.177 G .677 (he assignments attempts to assign a v)-3.177 F .677 (alue to a readonly v)-.25 F .676(ariable, an error occurs, and)-.25 F (the command e)108 676.8 Q(xits with a non-zero status.)-.15 E .149 (If no command name results, redirections are performed, b)108 693.6 R .149(ut do not af)-.2 F .15(fect the current shell en)-.25 F 2.65 (vironment. A)-.4 F(redirection error causes the command to e)108 705.6 Q(xit with a non-zero status.)-.15 E 1.064 (If there is a command name left after e)108 722.4 R 1.064(xpansion, e) -.15 F -.15(xe)-.15 G 1.064(cution proceeds as described belo).15 F 4.864 -.65(w. O)-.25 H 1.064(therwise, the).65 F(GNU Bash-2.05a)72 768 Q (2001 No)126.115 E -.15(ve)-.15 G(mber 13).15 E(23)185.545 E EP %%Page: 24 24 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\)) -.35 E .068(command e)108 84 R 2.568(xits. If)-.15 F .069(one of the e) 2.568 F .069(xpansions contained a command substitution, the e)-.15 F .069(xit status of the command)-.15 F .467(is the e)108 96 R .466 (xit status of the last command substitution performed.)-.15 F .466 (If there were no command substitutions, the)5.466 F(command e)108 108 Q (xits with a status of zero.)-.15 E/F1 10.95/Times-Bold@0 SF (COMMAND EXECUTION)72 124.8 Q F0 .546 (After a command has been split into w)108 136.8 R .547 (ords, if it results in a simple command and an optional list of ar)-.1 F(gu-)-.18 E(ments, the follo)108 148.8 Q(wing actions are tak)-.25 E (en.)-.1 E .379(If the command name contains no slashes, the shell atte\ mpts to locate it.)108 165.6 R .379(If there e)5.379 F .379 (xists a shell function by)-.15 F .246(that name, that function is in) 108 177.6 R -.2(vo)-.4 G -.1(ke).2 G 2.746(da).1 G 2.746(sd)-2.746 G .246(escribed abo)-2.746 F .546 -.15(ve i)-.15 H(n).15 E/F2 9 /Times-Bold@0 SF(FUNCTIONS)2.746 E/F3 9/Times-Roman@0 SF(.)A F0 .246 (If the name does not match a func-)4.746 F (tion, the shell searches for it in the list of shell b)108 189.6 Q 2.5 (uiltins. If)-.2 F 2.5(am)2.5 G(atch is found, that b)-2.5 E (uiltin is in)-.2 E -.2(vo)-.4 G -.1(ke).2 G(d.).1 E .31 (If the name is neither a shell function nor a b)108 206.4 R .309 (uiltin, and contains no slashes,)-.2 F/F4 10/Times-Bold@0 SF(bash)2.809 E F0 .309(searches each element of)2.809 F(the)108 218.4 Q F2 -.666(PA) 3.162 G(TH)-.189 E F0 .662(for a directory containing an e)2.912 F -.15 (xe)-.15 G .662(cutable \214le by that name.).15 F F4(Bash)5.662 E F0 .663(uses a hash table to remember)3.162 F 1.915 (the full pathnames of e)108 230.4 R -.15(xe)-.15 G 1.915 (cutable \214les \(see).15 F F4(hash)4.415 E F0(under)4.415 E F2 1.915 (SHELL B)4.415 F(UIL)-.09 E 1.914(TIN COMMANDS)-.828 F F0(belo)4.164 E 4.414(w\). A)-.25 F(full)4.414 E .719(search of the directories in)108 242.4 R F2 -.666(PA)3.219 G(TH)-.189 E F0 .72 (is performed only if the command is not found in the hash table.)2.969 F .72(If the)5.72 F(search is unsuccessful, the shell prints an error m\ essage and returns an e)108 254.4 Q(xit status of 127.)-.15 E 1.089(If \ the search is successful, or if the command name contains one or more s\ lashes, the shell e)108 271.2 R -.15(xe)-.15 G 1.089(cutes the).15 F .197(named program in a separate e)108 283.2 R -.15(xe)-.15 G .197 (cution en).15 F 2.698(vironment. Ar)-.4 F .198 (gument 0 is set to the name gi)-.18 F -.15(ve)-.25 G .198 (n, and the remain-).15 F(ing ar)108 295.2 Q (guments to the command are set to the ar)-.18 E(guments gi)-.18 E -.15 (ve)-.25 G(n, if an).15 E -.65(y.)-.15 G 1.809(If this e)108 312 R -.15 (xe)-.15 G 1.809(cution f).15 F 1.809 (ails because the \214le is not in e)-.1 F -.15(xe)-.15 G 1.809 (cutable format, and the \214le is not a directory).15 F 4.309(,i)-.65 G 4.309(ti)-4.309 G(s)-4.309 E .677(assumed to be a)108 324 R/F5 10 /Times-Italic@0 SF .678(shell script)3.177 F F0 3.178(,a\214)C .678 (le containing shell commands.)-3.178 F 3.178(As)5.678 G .678 (ubshell is spa)-3.178 F .678(wned to e)-.15 F -.15(xe)-.15 G .678 (cute it.).15 F(This)5.678 E .33 (subshell reinitializes itself, so that the ef)108 336 R .33 (fect is as if a ne)-.25 F 2.829(ws)-.25 G .329(hell had been in)-2.829 F -.2(vo)-.4 G -.1(ke).2 G 2.829(dt).1 G 2.829(oh)-2.829 G .329 (andle the script, with)-2.829 F 1.219(the e)108 348 R 1.219 (xception that the locations of commands remembered by the parent \(see) -.15 F F4(hash)3.719 E F0(belo)3.719 E 3.719(wu)-.25 G(nder)-3.719 E F2 (SHELL)3.719 E -.09(BU)108 360 S(IL).09 E(TIN COMMANDS)-.828 E F3(\))A F0(are retained by the child.)2.25 E .348(If the program is a \214le be) 108 376.8 R .348(ginning with)-.15 F F4(#!)2.848 E F0 2.848(,t)C .347(h\ e remainder of the \214rst line speci\214es an interpreter for the pro-) -2.848 F 3.178(gram. The)108 388.8 R .678(shell e)3.178 F -.15(xe)-.15 G .678(cutes the speci\214ed interpreter on operating systems that do not\ handle this e).15 F -.15(xe)-.15 G(cutable).15 E 1.193(format themselv) 108 400.8 R 3.693(es. The)-.15 F(ar)3.693 E 1.193 (guments to the interpreter consist of a single optional ar)-.18 F 1.192 (gument follo)-.18 F 1.192(wing the)-.25 F 1.13 (interpreter name on the \214rst line of the program, follo)108 412.8 R 1.131(wed by the name of the program, follo)-.25 F 1.131(wed by the)-.25 F(command ar)108 424.8 Q(guments, if an)-.18 E -.65(y.)-.15 G F1 (COMMAND EXECUTION ENVIR)72 441.6 Q(ONMENT)-.329 E F0(The shell has an) 108 453.6 Q F5 -.2(ex)2.5 G(ecution en).2 E(vir)-.4 E(onment)-.45 E F0 2.5(,w)C(hich consists of the follo)-2.5 E(wing:)-.25 E 32.5<836f>108 482.4 S 1.406(pen \214les inherited by the shell at in)-32.5 F -.2(vo) -.4 G 1.405(cation, as modi\214ed by redirections supplied to the).2 F F4(exec)3.905 E F0 -.2(bu)144 494.4 S(iltin).2 E 32.5<8374>108 511.2 S (he current w)-32.5 E(orking directory as set by)-.1 E F4(cd)2.5 E F0(,) A F4(pushd)2.5 E F0 2.5(,o)C(r)-2.5 E F4(popd)2.5 E F0 2.5(,o)C 2.5(ri) -2.5 G(nherited by the shell at in)-2.5 E -.2(vo)-.4 G(cation).2 E 32.5 <8374>108 528 S(he \214le creation mode mask as set by)-32.5 E F4(umask) 2.5 E F0(or inherited from the shell')2.5 E 2.5(sp)-.55 G(arent)-2.5 E 32.5<8363>108 544.8 S(urrent traps set by)-32.5 E F4(trap)2.5 E F0 32.5 <8373>108 561.6 S .256(hell parameters that are set by v)-32.5 F .256 (ariable assignment or with)-.25 F F4(set)2.756 E F0 .257 (or inherited from the shell')2.756 F 2.757(sp)-.55 G(arent)-2.757 E (in the en)144 573.6 Q(vironment)-.4 E 32.5<8373>108 590.4 S (hell functions de\214ned during e)-32.5 E -.15(xe)-.15 G (cution or inherited from the shell').15 E 2.5(sp)-.55 G (arent in the en)-2.5 E(vironment)-.4 E 32.5<836f>108 607.2 S (ptions enabled at in)-32.5 E -.2(vo)-.4 G(cation \(either by def).2 E (ault or with command-line ar)-.1 E(guments\) or by)-.18 E F4(set)2.5 E F0 32.5<836f>108 624 S(ptions enabled by)-32.5 E F4(shopt)2.5 E F0 32.5 <8373>108 640.8 S(hell aliases de\214ned with)-32.5 E F4(alias)2.5 E F0 32.5<8376>108 657.6 S (arious process IDs, including those of background jobs, the v)-32.75 E (alue of)-.25 E F4($$)2.5 E F0 2.5(,a)C(nd the v)-2.5 E(alue of)-.25 E F4($PPID)2.5 E F0 .427(When a simple command other than a b)108 674.4 R .426(uiltin or shell function is to be e)-.2 F -.15(xe)-.15 G .426 (cuted, it is in).15 F -.2(vo)-.4 G -.1(ke).2 G 2.926(di).1 G 2.926(nas) -2.926 G(eparate)-2.926 E -.15(exe)108 686.4 S .133(cution en).15 F .133 (vironment that consists of the follo)-.4 F 2.634(wing. Unless)-.25 F .134(otherwise noted, the v)2.634 F .134(alues are inherited from)-.25 F (the shell.)108 698.4 Q(GNU Bash-2.05a)72 768 Q(2001 No)126.115 E -.15 (ve)-.15 G(mber 13).15 E(24)185.545 E EP %%Page: 25 25 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\)) -.35 E 32.5<8374>108 84 S 1.056(he shell')-32.5 F 3.556(so)-.55 G 1.056 (pen \214les, plus an)-3.556 F 3.556(ym)-.15 G 1.056 (odi\214cations and additions speci\214ed by redirections to the com-) -3.556 F(mand)144 96 Q 32.5<8374>108 112.8 S(he current w)-32.5 E (orking directory)-.1 E 32.5<8374>108 129.6 S (he \214le creation mode mask)-32.5 E 32.5<8373>108 146.4 S .974(hell v) -32.5 F .974(ariables mark)-.25 F .974(ed for e)-.1 F .974 (xport, along with v)-.15 F .974(ariables e)-.25 F .975 (xported for the command, passed in the)-.15 F(en)144 158.4 Q(vironment) -.4 E 32.5<8374>108 175.2 S 1.385 (raps caught by the shell are reset to the v)-32.5 F 1.385 (alues the inherited from the shell')-.25 F 3.884(sp)-.55 G 1.384 (arent, and traps)-3.884 F(ignored by the shell are ignored)144 187.2 Q 2.5(Ac)108 204 S(ommand in)-2.5 E -.2(vo)-.4 G -.1(ke).2 G 2.5(di).1 G 2.5(nt)-2.5 G(his separate en)-2.5 E(vironment cannot af)-.4 E (fect the shell')-.25 E 2.5(se)-.55 G -.15(xe)-2.65 G(cution en).15 E (vironment.)-.4 E .5 (Command substitution and asynchronous commands are in)108 220.8 R -.2 (vo)-.4 G -.1(ke).2 G 3.001(di).1 G 3.001(nas)-3.001 G .501(ubshell en) -3.001 F .501(vironment that is a dupli-)-.4 F 1.35 (cate of the shell en)108 232.8 R 1.35(vironment, e)-.4 F 1.35 (xcept that traps caught by the shell are reset to the v)-.15 F 1.35 (alues that the shell)-.25 F 1.128(inherited from its parent at in)108 244.8 R -.2(vo)-.4 G 3.629(cation. Builtin).2 F 1.129 (commands that are in)3.629 F -.2(vo)-.4 G -.1(ke).2 G 3.629(da).1 G 3.629(sp)-3.629 G 1.129(art of a pipeline are also)-3.629 F -.15(exe)108 256.8 S 1.117(cuted in a subshell en).15 F 3.617(vironment. Changes)-.4 F 1.116(made to the subshell en)3.617 F 1.116(vironment cannot af)-.4 F 1.116(fect the shell')-.25 F(s)-.55 E -.15(exe)108 268.8 S(cution en).15 E(vironment.)-.4 E .404(If a command is follo)108 285.6 R .404(wed by a) -.25 F/F1 10/Times-Bold@0 SF(&)2.904 E F0 .405 (and job control is not acti)2.904 F -.15(ve)-.25 G 2.905(,t).15 G .405 (he def)-2.905 F .405(ault standard input for the command)-.1 F .198 (is the empty \214le)108 297.6 R/F2 10/Times-Italic@0 SF(/de)2.698 E (v/null)-.15 E F0 5.198(.O)C .198(therwise, the in)-5.198 F -.2(vo)-.4 G -.1(ke).2 G 2.698(dc).1 G .197 (ommand inherits the \214le descriptors of the calling shell)-2.698 F (as modi\214ed by redirections.)108 309.6 Q/F3 10.95/Times-Bold@0 SF (ENVIR)72 326.4 Q(ONMENT)-.329 E F0 2.353(When a program is in)108 338.4 R -.2(vo)-.4 G -.1(ke).2 G 4.853(di).1 G 4.853(ti)-4.853 G 4.853(sg) -4.853 G -2.15 -.25(iv e)-4.853 H 4.853(na).25 G 4.853(na)-4.853 G 2.353 (rray of strings called the)-4.853 F F2(en)4.853 E(vir)-.4 E(onment)-.45 E F0 7.353(.T).68 G 2.354(his is a list of)-7.353 F F2(name)108 350.4 Q F0A F2(value)A F0(pairs, of the form)2.5 E F2(name)2.5 E F0(=)A F2 (value)A F0(.).18 E 1.486(The shell pro)108 367.2 R 1.486(vides se)-.15 F -.15(ve)-.25 G 1.486(ral w).15 F 1.485(ays to manipulate the en)-.1 F 3.985(vironment. On)-.4 F(in)3.985 E -.2(vo)-.4 G 1.485 (cation, the shell scans its o).2 F(wn)-.25 E(en)108 379.2 Q .186(viron\ ment and creates a parameter for each name found, automatically marking\ it for)-.4 F F2 -.2(ex)2.687 G(port).2 E F0 .187(to child pro-)2.687 F 2.704(cesses. Ex)108 391.2 R .203(ecuted commands inherit the en)-.15 F 2.703(vironment. The)-.4 F F1(export)2.703 E F0(and)2.703 E F1(declar) 2.703 E 2.703<65ad>-.18 G(x)-2.703 E F0 .203(commands allo)2.703 F 2.703 (wp)-.25 G(aram-)-2.703 E 1.153 (eters and functions to be added to and deleted from the en)108 403.2 R 3.653(vironment. If)-.4 F 1.153(the v)3.653 F 1.154 (alue of a parameter in the)-.25 F(en)108 415.2 Q .64 (vironment is modi\214ed, the ne)-.4 F 3.14(wv)-.25 G .64 (alue becomes part of the en)-3.39 F .64(vironment, replacing the old.) -.4 F .64(The en)5.64 F(viron-)-.4 E .58(ment inherited by an)108 427.2 R 3.08(ye)-.15 G -.15(xe)-3.23 G .58 (cuted command consists of the shell').15 F 3.08(si)-.55 G .58 (nitial en)-3.08 F .58(vironment, whose v)-.4 F .58(alues may be)-.25 F .301(modi\214ed in the shell, less an)108 439.2 R 2.801(yp)-.15 G .301 (airs remo)-2.801 F -.15(ve)-.15 G 2.801(db).15 G 2.801(yt)-2.801 G(he) -2.801 E F1(unset)2.801 E F0 .3(command, plus an)2.8 F 2.8(ya)-.15 G .3 (dditions via the)-2.8 F F1(export)2.8 E F0(and)2.8 E F1(declar)108 451.2 Q 2.5<65ad>-.18 G(x)-2.5 E F0(commands.)2.5 E .636(The en)108 468 R .636(vironment for an)-.4 F(y)-.15 E F2 .636(simple command)3.136 F F0 .637(or function may be augmented temporarily by pre\214xing it with) 3.137 F .203(parameter assignments, as described abo)108 480 R .502 -.15 (ve i)-.15 H(n).15 E/F4 9/Times-Bold@0 SF -.666(PA)2.702 G(RAMETERS).666 E/F5 9/Times-Roman@0 SF(.)A F0 .202(These assignment statements af)4.702 F .202(fect only the)-.25 F(en)108 492 Q (vironment seen by that command.)-.4 E .036(If the)108 508.8 R F1 2.536 E F0 .037(option is set \(see the)2.536 F F1(set)2.537 E F0 -.2 (bu)2.537 G .037(iltin command belo).2 F .037(w\), then)-.25 F F2(all) 2.537 E F0 .037(parameter assignments are placed in the)2.537 F(en)108 520.8 Q (vironment for a command, not just those that precede the command name.) -.4 E(When)108 537.6 Q F1(bash)3.397 E F0(in)3.397 E -.2(vo)-.4 G -.1 (ke).2 G 3.397(sa).1 G 3.397(ne)-3.397 G .897(xternal command, the v) -3.547 F(ariable)-.25 E F1(_)3.397 E F0 .897 (is set to the full \214le name of the command and)3.397 F (passed to that command in its en)108 549.6 Q(vironment.)-.4 E F3 (EXIT ST)72 566.4 Q -1.04(AT)-.986 G(US)1.04 E F0 -.15(Fo)108 578.4 S 3.372(rt).15 G .872(he shell')-3.372 F 3.372(sp)-.55 G .873 (urposes, a command which e)-3.372 F .873(xits with a zero e)-.15 F .873 (xit status has succeeded.)-.15 F .873(An e)5.873 F .873(xit status of) -.15 F .049(zero indicates success.)108 590.4 R 2.549(An)5.049 G .049 (on-zero e)-2.549 F .049(xit status indicates f)-.15 F 2.549 (ailure. When)-.1 F 2.549(ac)2.549 G .048(ommand terminates on a f) -2.549 F .048(atal sig-)-.1 F(nal)108 602.4 Q F2(N)2.5 E F0(,)A F1(bash) 2.5 E F0(uses the v)2.5 E(alue of 128+)-.25 E F2(N)A F0(as the e)2.5 E (xit status.)-.15 E .404 (If a command is not found, the child process created to e)108 619.2 R -.15(xe)-.15 G .404(cute it returns a status of 127.).15 F .405 (If a command is)5.405 F(found b)108 631.2 Q(ut is not e)-.2 E -.15(xe) -.15 G(cutable, the return status is 126.).15 E(If a command f)108 648 Q (ails because of an error during e)-.1 E(xpansion or redirection, the e) -.15 E(xit status is greater than zero.)-.15 E .081(Shell b)108 664.8 R .081(uiltin commands return a status of 0 \()-.2 F F2(true)A F0 2.581 (\)i)C 2.581(fs)-2.581 G .08(uccessful, and non-zero \()-2.581 F F2 (false)A F0 2.58(\)i)C 2.58(fa)-2.58 G 2.58(ne)-2.58 G .08 (rror occurs while)-2.58 F(the)108 676.8 Q 2.5(ye)-.15 G -.15(xe)-2.65 G 2.5(cute. All).15 F -.2(bu)2.5 G(iltins return an e).2 E (xit status of 2 to indicate incorrect usage.)-.15 E F1(Bash)108 693.6 Q F0 .201(itself returns the e)2.701 F .202 (xit status of the last command e)-.15 F -.15(xe)-.15 G .202 (cuted, unless a syntax error occurs, in which case).15 F(it e)108 705.6 Q(xits with a non-zero v)-.15 E 2.5(alue. See)-.25 F(also the)2.5 E F1 (exit)2.5 E F0 -.2(bu)2.5 G(iltin command belo).2 E -.65(w.)-.25 G (GNU Bash-2.05a)72 768 Q(2001 No)126.115 E -.15(ve)-.15 G(mber 13).15 E (25)185.545 E EP %%Page: 26 26 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\)) -.35 E/F1 10.95/Times-Bold@0 SF(SIGN)72 84 Q(ALS)-.219 E F0(When)108 96 Q/F2 10/Times-Bold@0 SF(bash)3.183 E F0 .683(is interacti)3.183 F -.15 (ve)-.25 G 3.183(,i).15 G 3.183(nt)-3.183 G .683(he absence of an)-3.183 F 3.183(yt)-.15 G .683(raps, it ignores)-3.183 F/F3 9/Times-Bold@0 SF (SIGTERM)3.183 E F0 .682(\(so that)2.933 F F2 .682(kill 0)3.182 F F0 .682(does not kill an)3.182 F(interacti)108 108 Q .757 -.15(ve s)-.25 H .457(hell\), and).15 F F3(SIGINT)2.957 E F0 .458 (is caught and handled \(so that the)2.707 F F2(wait)2.958 E F0 -.2(bu) 2.958 G .458(iltin is interruptible\).).2 F .458(In all cases,)5.458 F F2(bash)108 120 Q F0(ignores)2.5 E F3(SIGQ)2.5 E(UIT)-.09 E/F4 9 /Times-Roman@0 SF(.)A F0(If job control is in ef)4.5 E(fect,)-.25 E F2 (bash)2.5 E F0(ignores)2.5 E F3(SIGTTIN)2.5 E F4(,)A F3(SIGTT)2.25 E(OU) -.162 E F4(,)A F0(and)2.25 E F3(SIGTSTP)2.5 E F4(.)A F0 .405 (Synchronous jobs started by)108 136.8 R F2(bash)2.905 E F0(ha)2.905 E .705 -.15(ve s)-.2 H .404(ignal handlers set to the v).15 F .404 (alues inherited by the shell from its par)-.25 F(-)-.2 E 4.117 (ent. When)108 148.8 R 1.617(job control is not in ef)4.117 F 1.617 (fect, asynchronous commands ignore)-.25 F F3(SIGINT)4.118 E F0(and) 3.868 E F3(SIGQ)4.118 E(UIT)-.09 E F0 1.618(as well.)3.868 F 1.95 (Commands run as a result of command substitution ignore the k)108 160.8 R -.15(ey)-.1 G 1.95(board-generated job control signals).15 F F3 (SIGTTIN)108 172.8 Q F4(,)A F3(SIGTT)2.25 E(OU)-.162 E F4(,)A F0(and) 2.25 E F3(SIGTSTP)2.5 E F4(.)A F0 2.045(The shell e)108 189.6 R 2.045 (xits by def)-.15 F 2.045(ault upon receipt of a)-.1 F F3(SIGHUP)4.545 E F4(.)A F0 2.045(Before e)6.545 F 2.045(xiting, an interacti)-.15 F 2.346 -.15(ve s)-.25 H 2.046(hell resends the).15 F F3(SIGHUP)108 201.6 Q F0 1.005(to all jobs, running or stopped.)3.255 F 1.004 (Stopped jobs are sent)6.005 F F3(SIGCONT)3.504 E F0 1.004 (to ensure that the)3.254 F 3.504(yr)-.15 G(ecei)-3.504 E 1.304 -.15 (ve t)-.25 H(he).15 E F3(SIGHUP)108 213.6 Q F4(.)A F0 2.529 -.8(To p) 5.429 H(re).8 E -.15(ve)-.25 G .93(nt the shell from sending the signal\ to a particular job, it should be remo).15 F -.15(ve)-.15 G 3.43(df).15 G .93(rom the)-3.43 F 1.357(jobs table with the)108 225.6 R F2(diso) 3.857 E(wn)-.1 E F0 -.2(bu)3.857 G 1.357(iltin \(see).2 F F3 1.356 (SHELL B)3.856 F(UIL)-.09 E 1.356(TIN COMMANDS)-.828 F F0(belo)3.606 E 1.356(w\) or mark)-.25 F 1.356(ed to not recei)-.1 F -.15(ve)-.25 G F3 (SIGHUP)108 237.6 Q F0(using)2.25 E F2(diso)2.5 E(wn \255h)-.1 E F0(.)A .166(If the)108 254.4 R F2(huponexit)2.666 E F0 .166 (shell option has been set with)2.666 F F2(shopt)2.666 E F0(,)A F2(bash) 2.666 E F0 .166(sends a)2.666 F F3(SIGHUP)2.666 E F0 .166 (to all jobs when an interacti)2.416 F -.15(ve)-.25 G(login shell e)108 266.4 Q(xits.)-.15 E(When)108 283.2 Q F2(bash)3.221 E F0(recei)3.221 E -.15(ve)-.25 G 3.221(sas).15 G .721 (ignal for which a trap has been set while w)-3.221 F .72 (aiting for a command to complete, the)-.1 F .673(trap will not be e)108 295.2 R -.15(xe)-.15 G .674(cuted until the command completes.).15 F (When)5.674 E F2(bash)3.174 E F0 .674(is w)3.174 F .674 (aiting for an asynchronous com-)-.1 F .303(mand via the)108 307.2 R F2 (wait)2.803 E F0 -.2(bu)2.803 G .302(iltin, the reception of a signal f\ or which a trap has been set will cause the).2 F F2(wait)2.802 E F0 -.2 (bu)2.802 G(iltin).2 E(to return immediately with an e)108 319.2 Q (xit status greater than 128, immediately after which the trap is e)-.15 E -.15(xe)-.15 G(cuted.).15 E F1(JOB CONTR)72 336 Q(OL)-.329 E/F5 10 /Times-Italic@0 SF -.25(Jo)108 348 S 4.601(bc).25 G(ontr)-4.601 E(ol) -.45 E F0 2.101(refers to the ability to selecti)4.601 F -.15(ve)-.25 G 2.101(ly stop \().15 F F5(suspend)A F0 4.601(\)t)C 2.102(he e)-4.601 F -.15(xe)-.15 G 2.102(cution of processes and continue).15 F(\()108 360 Q F5 -.37(re)C(sume).37 E F0 3.202(\)t)C .702(heir e)-3.202 F -.15(xe)-.15 G .702(cution at a later point.).15 F 3.202(Au)5.702 G .702 (ser typically emplo)-3.202 F .702(ys this f)-.1 F .702 (acility via an interacti)-.1 F 1.001 -.15(ve i)-.25 H(nterf).15 E(ace) -.1 E(supplied jointly by the system')108 372 Q 2.5(st)-.55 G (erminal dri)-2.5 E -.15(ve)-.25 G 2.5(ra).15 G(nd)-2.5 E F2(bash)2.5 E F0(.)A .893(The shell associates a)108 388.8 R F5(job)3.394 E F0 .894 (with each pipeline.)3.394 F .894(It k)5.894 F .894 (eeps a table of currently e)-.1 F -.15(xe)-.15 G .894 (cuting jobs, which may be).15 F .341(listed with the)108 400.8 R F2 (jobs)2.841 E F0 2.841(command. When)2.841 F F2(bash)2.841 E F0 .341 (starts a job asynchronously \(in the)2.841 F F5(bac)2.84 E(kgr)-.2 E (ound)-.45 E F0 .34(\), it prints a line).77 F(that looks lik)108 412.8 Q(e:)-.1 E([1] 25647)144 429.6 Q .241(indicating that this job is job n\ umber 1 and that the process ID of the last process in the pipeline ass\ ociated)108 446.4 R .733(with this job is 25647.)108 458.4 R .732 (All of the processes in a single pipeline are members of the same job) 5.733 F(.)-.4 E F2(Bash)5.732 E F0(uses)3.232 E(the)108 470.4 Q F5(job) 2.5 E F0(abstraction as the basis for job control.)2.5 E 3.062 -.8(To f) 108 487.2 T 1.462(acilitate the implementation of the user interf).7 F 1.463(ace to job control, the operating system maintains the)-.1 F .871 (notion of a)108 499.2 R F5(curr)3.371 E .871(ent terminal pr)-.37 F .871(ocess gr)-.45 F .871(oup ID)-.45 F F0 5.871(.M)C .87 (embers of this process group \(processes whose process)-5.871 F .023 (group ID is equal to the current terminal process group ID\) recei)108 511.2 R .323 -.15(ve k)-.25 H -.15(ey).05 G .023 (board-generated signals such as).15 F F3(SIG-)2.523 E(INT)108 523.2 Q F4(.)A F0 1.437(These processes are said to be in the)5.937 F F5(for) 3.936 E -.4(eg)-.37 G -.45(ro).4 G(und).45 E F0(.).77 E F5(Bac)6.436 E (kgr)-.2 E(ound)-.45 E F0 1.436(processes are those whose process)3.936 F .145(group ID dif)108 535.2 R .145(fers from the terminal')-.25 F .146 (s; such processes are immune to k)-.55 F -.15(ey)-.1 G .146 (board-generated signals.).15 F .146(Only fore-)5.146 F .042 (ground processes are allo)108 547.2 R .042 (wed to read from or write to the terminal.)-.25 F .042 (Background processes which attempt to)5.042 F 1.639 (read from \(write to\) the terminal are sent a)108 559.2 R F3 1.64 (SIGTTIN \(SIGTT)4.14 F(OU\))-.162 E F0 1.64(signal by the terminal dri) 3.89 F -.15(ve)-.25 G 2.44 -.4(r, w).15 H(hich,).4 E (unless caught, suspends the process.)108 571.2 Q 1.088 (If the operating system on which)108 588 R F2(bash)3.588 E F0 1.088 (is running supports job control,)3.588 F F2(bash)3.587 E F0 1.087 (contains f)3.587 F 1.087(acilities to use it.)-.1 F -.8(Ty)108 600 S .37(ping the).8 F F5(suspend)2.87 E F0 .37(character \(typically)2.87 F F2(^Z)2.87 E F0 2.87(,C)C .371 (ontrol-Z\) while a process is running causes that process to be)-2.87 F .027(stopped and returns control to)108 612 R F2(bash)2.527 E F0 5.027 (.T)C .026(yping the)-5.827 F F5 .026(delayed suspend)2.526 F F0 .026 (character \(typically)2.526 F F2(^Y)2.526 E F0 2.526(,C)C .026 (ontrol-Y\) causes)-2.526 F .985(the process to be stopped when it atte\ mpts to read input from the terminal, and control to be returned to)108 624 R F2(bash)108 636 Q F0 5.171(.T)C .171 (he user may then manipulate the state of this job, using the)-5.171 F F2(bg)2.67 E F0 .17(command to continue it in the back-)2.67 F .543 (ground, the)108 648 R F2(fg)3.043 E F0 .543 (command to continue it in the fore)3.043 F .543(ground, or the)-.15 F F2(kill)3.044 E F0 .544(command to kill it.)3.044 F(A)5.544 E F2(^Z) 3.044 E F0(tak)3.044 E .544(es ef)-.1 F(fect)-.25 E(immediately)108 660 Q 2.5(,a)-.65 G(nd has the additional side ef)-2.5 E (fect of causing pending output and typeahead to be discarded.)-.25 E 1.098(There are a number of w)108 676.8 R 1.097 (ays to refer to a job in the shell.)-.1 F 1.097(The character)6.097 F F2(%)3.597 E F0 1.097(introduces a job name.)3.597 F(Job)6.097 E(number) 108 688.8 Q F5(n)2.796 E F0 .296(may be referred to as)2.796 F F2(%n) 2.796 E F0 5.296(.A)C .296 (job may also be referred to using a pre\214x of the name used to start) -2.5 F .277(it, or using a substring that appears in its command line.) 108 700.8 R -.15(Fo)5.277 G 2.777(re).15 G(xample,)-2.927 E F2(%ce)2.777 E F0 .277(refers to a stopped)2.777 F F2(ce)2.777 E F0(job)2.777 E 5.277 (.I)-.4 G 2.777(fa)-5.277 G .38(pre\214x matches more than one job,)108 712.8 R F2(bash)2.88 E F0 .38(reports an error)2.88 F 5.38(.U)-.55 G (sing)-5.38 E F2(%?ce)2.88 E F0 2.88(,o)C 2.88(nt)-2.88 G .38 (he other hand, refers to an)-2.88 F 2.88(yj)-.15 G(ob)-2.88 E .623 (containing the string)108 724.8 R F2(ce)3.123 E F0 .622 (in its command line.)3.123 F .622 (If the substring matches more than one job,)5.622 F F2(bash)3.122 E F0 .622(reports an)3.122 F(GNU Bash-2.05a)72 768 Q(2001 No)126.115 E -.15 (ve)-.15 G(mber 13).15 E(26)185.545 E EP %%Page: 27 27 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\)) -.35 E(error)108 84 Q 5.143(.T)-.55 G .143(he symbols)-5.143 F/F1 10 /Times-Bold@0 SF(%%)2.643 E F0(and)2.643 E F1(%+)2.643 E F0 .143 (refer to the shell')2.643 F 2.643(sn)-.55 G .143(otion of the)-2.643 F /F2 10/Times-Italic@0 SF(curr)2.643 E .143(ent job)-.37 F F0 2.643(,w) .23 G .143(hich is the last job stopped)-2.643 F .074(while it w)108 96 R .074(as in the fore)-.1 F .073(ground or started in the background.) -.15 F(The)5.073 E F2(pr)2.573 E -.15(ev)-.37 G .073(ious job).15 F F0 .073(may be referenced using)2.573 F F1<25ad>2.573 E F0(.)A .249 (In output pertaining to jobs \(e.g., the output of the)108 108 R F1 (jobs)2.749 E F0 .25(command\), the current job is al)2.75 F -.1(wa)-.1 G .25(ys \215agged with a).1 F F1(+)108 120 Q F0 2.5(,a)C(nd the pre) -2.5 E(vious job with a)-.25 E F12.5 E F0(.)A .444 (Simply naming a job can be used to bring it into the fore)108 136.8 R (ground:)-.15 E F1(%1)2.943 E F0 .443(is a synon)2.943 F .443(ym for) -.15 F F1 -.63(``)2.943 G .443(fg %1').63 F(')-.63 E F0 2.943(,b)C (ringing)-2.943 E 1.472(job 1 from the background into the fore)108 148.8 R 3.972(ground. Similarly)-.15 F(,)-.65 E F1 -.63(``)3.973 G 1.473 (%1 &').63 F(')-.63 E F0 1.473(resumes job 1 in the background,)3.973 F (equi)108 160.8 Q -.25(va)-.25 G(lent to).25 E F1 -.63(``)2.5 G(bg %1') .63 E(')-.63 E F0(.)A .131(The shell learns immediately whene)108 177.6 R -.15(ve)-.25 G 2.631(raj).15 G .131(ob changes state.)-2.631 F (Normally)5.131 E(,)-.65 E F1(bash)2.631 E F0 -.1(wa)2.63 G .13 (its until it is about to print a).1 F .157 (prompt before reporting changes in a job')108 189.6 R 2.657(ss)-.55 G .157(tatus so as to not interrupt an)-2.657 F 2.658(yo)-.15 G .158 (ther output.)-2.658 F .158(If the)5.158 F F12.658 E F0 .158 (option to)2.658 F(the)108 201.6 Q F1(set)3.952 E F0 -.2(bu)3.952 G 1.452(iltin command is enabled,).2 F F1(bash)3.952 E F0 1.451 (reports such changes immediately)3.952 F 6.451(.A)-.65 G 1.751 -.15 (ny t)-6.451 H 1.451(rap on).15 F/F3 9/Times-Bold@0 SF(SIGCHLD)3.951 E F0(is)3.701 E -.15(exe)108 213.6 S(cuted for each child that e).15 E (xits.)-.15 E 1.026(If an attempt to e)108 230.4 R(xit)-.15 E F1(bash) 3.527 E F0 1.027(is made while jobs are stopped, the shell prints a w) 3.527 F 1.027(arning message.)-.1 F(The)6.027 E F1(jobs)3.527 E F0 .256 (command may then be used to inspect their status.)108 242.4 R .255 (If a second attempt to e)5.255 F .255(xit is made without an interv) -.15 F(en-)-.15 E(ing command, the shell does not print another w)108 254.4 Q(arning, and the stopped jobs are terminated.)-.1 E/F4 10.95 /Times-Bold@0 SF(PR)72 271.2 Q(OMPTING)-.329 E F0 .644(When e)108 283.2 R -.15(xe)-.15 G .644(cuting interacti).15 F -.15(ve)-.25 G(ly).15 E(,) -.65 E F1(bash)3.144 E F0 .645(displays the primary prompt)3.145 F F3 (PS1)3.145 E F0 .645(when it is ready to read a command,)2.895 F 1.826 (and the secondary prompt)108 295.2 R F3(PS2)4.326 E F0 1.825 (when it needs more input to complete a command.)4.076 F F1(Bash)6.825 E F0(allo)4.325 E 1.825(ws these)-.25 F 1.499(prompt strings to be custom\ ized by inserting a number of backslash-escaped special characters that\ are)108 307.2 R(decoded as follo)108 319.2 Q(ws:)-.25 E F1(\\a)144 331.2 Q F0(an ASCII bell character \(07\))28.22 E F1(\\d)144 343.2 Q F0 (the date in "W)27.66 E(eekday Month Date" format \(e.g., "T)-.8 E (ue May 26"\))-.45 E F1(\\e)144 355.2 Q F0 (an ASCII escape character \(033\))28.78 E F1(\\h)144 367.2 Q F0 (the hostname up to the \214rst `.)27.66 E(')-.7 E F1(\\H)144 379.2 Q F0 (the hostname)25.44 E F1(\\j)144 391.2 Q F0 (the number of jobs currently managed by the shell)29.89 E F1(\\l)144 403.2 Q F0(the basename of the shell')30.44 E 2.5(st)-.55 G(erminal de) -2.5 E(vice name)-.25 E F1(\\n)144 415.2 Q F0(ne)27.66 E(wline)-.25 E F1 (\\r)144 427.2 Q F0(carriage return)28.78 E F1(\\s)144 439.2 Q F0 (the name of the shell, the basename of)29.33 E F1($0)2.5 E F0 (\(the portion follo)2.5 E(wing the \214nal slash\))-.25 E F1(\\t)144 451.2 Q F0(the current time in 24-hour HH:MM:SS format)29.89 E F1(\\T) 144 463.2 Q F0(the current time in 12-hour HH:MM:SS format)26.55 E F1 (\\@)144 475.2 Q F0(the current time in 12-hour am/pm format)23.92 E F1 (\\A)144 487.2 Q F0(the current time in 24-hour HH:MM format)26 E F1 (\\u)144 499.2 Q F0(the username of the current user)27.66 E F1(\\v)144 511.2 Q F0(the v)28.22 E(ersion of)-.15 E F1(bash)2.5 E F0 (\(e.g., 2.00\))2.5 E F1(\\V)144 523.2 Q F0(the release of)26 E F1(bash) 2.5 E F0 2.5(,v)C(ersion + patchelv)-2.65 E(el \(e.g., 2.00.0\))-.15 E F1(\\w)144 535.2 Q F0(the current w)26 E(orking directory)-.1 E F1(\\W) 144 547.2 Q F0(the basename of the current w)23.22 E(orking directory) -.1 E F1(\\!)144 559.2 Q F0(the history number of this command)29.89 E F1(\\#)144 571.2 Q F0(the command number of this command)28.22 E F1(\\$) 144 583.2 Q F0(if the ef)28.22 E(fecti)-.25 E .3 -.15(ve U)-.25 H (ID is 0, a).15 E F1(#)2.5 E F0 2.5(,o)C(therwise a)-2.5 E F1($)2.5 E (\\)144 595.2 Q F2(nnn)A F0 (the character corresponding to the octal number)18.22 E F2(nnn)2.5 E F1 (\\\\)144 607.2 Q F0 2.5(ab)30.44 G(ackslash)-2.5 E F1(\\[)144 619.2 Q F0(be)29.89 E 1.257(gin a sequence of non-printing characters, which co\ uld be used to embed a terminal)-.15 F(control sequence into the prompt) 180 631.2 Q F1(\\])144 643.2 Q F0 (end a sequence of non-printing characters)29.89 E .119 (The command number and the history number are usually dif)108 660 R .12 (ferent: the history number of a command is its)-.25 F 1.585(position i\ n the history list, which may include commands restored from the histor\ y \214le \(see)108 672 R F3(HIST)4.084 E(OR)-.162 E(Y)-.315 E F0(belo) 108 684 Q .541(w\), while the command number is the position in the seq\ uence of commands e)-.25 F -.15(xe)-.15 G .541(cuted during the cur).15 F(-)-.2 E .546(rent shell session.)108 696 R .546 (After the string is decoded, it is e)5.546 F .546 (xpanded via parameter e)-.15 F .546(xpansion, command substitu-)-.15 F .351(tion, arithmetic e)108 708 R .352(xpansion, and quote remo)-.15 F -.25(va)-.15 G .352(l, subject to the v).25 F .352(alue of the)-.25 F F1 (pr)2.852 E(omptv)-.18 E(ars)-.1 E F0 .352(shell option \(see the)2.852 F(description of the)108 720 Q F1(shopt)2.5 E F0(command under)2.5 E F3 (SHELL B)2.5 E(UIL)-.09 E(TIN COMMANDS)-.828 E F0(belo)2.25 E(w\).)-.25 E(GNU Bash-2.05a)72 768 Q(2001 No)126.115 E -.15(ve)-.15 G(mber 13).15 E (27)185.545 E EP %%Page: 28 28 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\)) -.35 E/F1 10.95/Times-Bold@0 SF(READLINE)72 84 Q F0 .151 (This is the library that handles reading input when using an interacti) 108 96 R .45 -.15(ve s)-.25 H .15(hell, unless the).15 F/F2 10 /Times-Bold@0 SF(\255\255noediting)2.65 E F0(option)2.65 E .066(is gi) 108 108 R -.15(ve)-.25 G 2.566(na).15 G 2.566(ts)-2.566 G .066(hell in) -2.566 F -.2(vo)-.4 G 2.566(cation. By).2 F(def)2.566 E .066 (ault, the line editing commands are similar to those of emacs.)-.1 F 2.567(Av)5.067 G(i-style)-2.567 E .566(line editing interf)108 120 R .566(ace is also a)-.1 F -.25(va)-.2 G 3.065(ilable. T).25 F 3.065(ot) -.8 G .565(urn of)-3.065 F 3.065(fl)-.25 G .565 (ine editing after the shell is running, use the)-3.065 F F2 .565 (+o emacs)3.065 F F0(or)108 132 Q F2(+o vi)2.5 E F0(options to the)2.5 E F2(set)2.5 E F0 -.2(bu)2.5 G(iltin \(see).2 E/F3 9/Times-Bold@0 SF (SHELL B)2.5 E(UIL)-.09 E(TIN COMMANDS)-.828 E F0(belo)2.25 E(w\).)-.25 E F2(Readline Notation)87 148.8 Q F0 .567 (In this section, the emacs-style notation is used to denote k)108 160.8 R -.15(ey)-.1 G(strok).15 E 3.068(es. Control)-.1 F -.1(ke)3.068 G .568 (ys are denoted by C\255)-.05 F/F4 10/Times-Italic@0 SF -.1(ke)C(y)-.2 E F0(,)A 1.196(e.g., C\255n means Control\255N.)108 172.8 R(Similarly) 6.196 E(,)-.65 E F4(meta)3.696 E F0 -.1(ke)3.695 G 1.195 (ys are denoted by M\255)-.05 F F4 -.1(ke)C(y)-.2 E F0 3.695(,s)C 3.695 (oM)-3.695 G 1.195(\255x means Meta\255X.)-3.695 F(\(On)6.195 E -.1(ke) 108 184.8 S .932(yboards without a)-.05 F F4(meta)3.432 E F0 -.1(ke) 3.432 G 2.232 -.65(y, M)-.05 H.65 E F4(x)A F0 .932(means ESC)3.432 F F4(x)3.433 E F0 3.433(,i)C .933(.e., press the Escape k)-3.433 F 1.233 -.15(ey t)-.1 H .933(hen the).15 F F4(x)3.433 E F0 -.1(ke)3.433 G 4.733 -.65(y. T)-.05 H .933(his mak).65 F(es)-.1 E .6(ESC the)108 196.8 R F4 .6(meta pr)3.1 F(e\214x)-.37 E F0 5.6(.T)C .6(he combination M\255C\255) -5.6 F F4(x)A F0 .599(means ESC\255Control\255)3.099 F F4(x)A F0 3.099 (,o)C 3.099(rp)-3.099 G .599(ress the Escape k)-3.099 F .899 -.15(ey t) -.1 H .599(hen hold).15 F(the Control k)108 208.8 Q .3 -.15(ey w)-.1 H (hile pressing the).15 E F4(x)2.5 E F0 -.1(ke)2.5 G -.65(y.)-.05 G(\)) .65 E .619(Readline commands may be gi)108 225.6 R -.15(ve)-.25 G 3.119 (nn).15 G(umeric)-3.119 E F4(ar)3.119 E(guments)-.37 E F0 3.119(,w).27 G .619(hich normally act as a repeat count.)-3.119 F(Sometimes,)5.62 E(ho) 108 237.6 Q(we)-.25 E -.15(ve)-.25 G 1.419 -.4(r, i).15 H 3.119(ti).4 G 3.119(st)-3.119 G .619(he sign of the ar)-3.119 F .619 (gument that is signi\214cant.)-.18 F -.15(Pa)5.619 G .619(ssing a ne) .15 F -.05(ga)-.15 G(ti).05 E .919 -.15(ve a)-.25 H -.18(rg).15 G .619 (ument to a command that).18 F 1.018(acts in the forw)108 249.6 R 1.018 (ard direction \(e.g.,)-.1 F F2(kill\255line)3.518 E F0 3.518(\)c)C 1.018(auses that command to act in a backw)-3.518 F 1.019 (ard direction.)-.1 F(Com-)6.019 E(mands whose beha)108 261.6 Q (vior with ar)-.2 E(guments de)-.18 E(viates from this are noted belo) -.25 E -.65(w.)-.25 G .812(When a command is described as)108 278.4 R F4 (killing)3.311 E F0(te)3.311 E .811(xt, the te)-.15 F .811 (xt deleted is sa)-.15 F -.15(ve)-.2 G 3.311(df).15 G .811 (or possible future retrie)-3.311 F -.25(va)-.25 G 3.311(l\().25 G F4 (yank-)-3.311 E(ing)108 290.4 Q F0 2.529(\). The)B .029(killed te)2.529 F .029(xt is sa)-.15 F -.15(ve)-.2 G 2.529(di).15 G 2.529(na)-2.529 G F4 .029(kill ring)B F0 5.029(.C)C(onsecuti)-5.029 E .329 -.15(ve k)-.25 H .029(ills cause the te).15 F .029(xt to be accumulated into one unit,) -.15 F .567(which can be yank)108 302.4 R .567(ed all at once.)-.1 F .567(Commands which do not kill te)5.567 F .567 (xt separate the chunks of te)-.15 F .567(xt on the kill)-.15 F(ring.) 108 314.4 Q F2(Readline Initialization)87 331.2 Q F0 .091(Readline is c\ ustomized by putting commands in an initialization \214le \(the)108 343.2 R F4(inputr)2.591 E(c)-.37 E F0 2.591(\214le\). The)2.591 F .092 (name of this \214le)2.591 F .197(is tak)108 355.2 R .196(en from the v) -.1 F .196(alue of the)-.25 F F3(INPUTRC)2.696 E F0 -.25(va)2.446 G 2.696(riable. If).25 F .196(that v)2.696 F .196 (ariable is unset, the def)-.25 F .196(ault is)-.1 F F4(~/.inputr)2.696 E(c)-.37 E F0 5.196(.W).31 G .196(hen a)-5.196 F 1.034(program which us\ es the readline library starts up, the initialization \214le is read, a\ nd the k)108 367.2 R 1.335 -.15(ey b)-.1 H 1.035(indings and).15 F -.25 (va)108 379.2 S 1.15(riables are set.).25 F 1.15(There are only a fe) 6.15 F 3.649(wb)-.25 G 1.149(asic constructs allo)-3.649 F 1.149 (wed in the readline initialization \214le.)-.25 F(Blank)6.149 E .736 (lines are ignored.)108 391.2 R .737(Lines be)5.737 F .737 (ginning with a)-.15 F F2(#)3.237 E F0 .737(are comments.)3.237 F .737 (Lines be)5.737 F .737(ginning with a)-.15 F F2($)3.237 E F0 .737 (indicate conditional)3.237 F 2.5(constructs. Other)108 403.2 R (lines denote k)2.5 E .3 -.15(ey b)-.1 H(indings and v).15 E (ariable settings.)-.25 E 1.007(The def)108 420 R 1.007(ault k)-.1 F -.15(ey)-.1 G 1.007(-bindings may be changed with an).15 F F4(inputr) 3.507 E(c)-.37 E F0 3.507(\214le. Other)3.507 F 1.007 (programs that use this library may)3.507 F(add their o)108 432 Q (wn commands and bindings.)-.25 E -.15(Fo)108 448.8 S 2.5(re).15 G (xample, placing)-2.65 E(M\255Control\255u: uni)144 465.6 Q -.15(ve)-.25 G(rsal\255ar).15 E(gument)-.18 E(or)108 477.6 Q(C\255Meta\255u: uni)144 489.6 Q -.15(ve)-.25 G(rsal\255ar).15 E(gument)-.18 E(into the)108 501.6 Q F4(inputr)2.5 E(c)-.37 E F0 -.1(wo)2.5 G(uld mak).1 E 2.5(eM)-.1 G (\255C\255u e)-2.5 E -.15(xe)-.15 G(cute the readline command).15 E F4 (univer)2.5 E(sal\255ar)-.1 E(gument)-.37 E F0(.).68 E 1.26(The follo) 108 518.4 R 1.261(wing symbolic character names are recognized:)-.25 F F4 -.4(RU)3.761 G(BOUT).4 E F0(,)1.27 E F4(DEL)3.761 E F0(,).53 E F4 (ESC)3.761 E F0(,).72 E F4(LFD)3.761 E F0(,).28 E F4(NEWLINE)3.761 E F0 (,).73 E F4(RET)3.761 E F0(,)1.27 E F4(RETURN)108 530.4 Q F0(,)1.1 E F4 (SPC)2.5 E F0(,).72 E F4(SP)2.5 E -.3(AC)-.9 G(E).3 E F0 2.5(,a).73 G (nd)-2.5 E F4 -.5(TA)2.5 G(B).5 E F0(.).27 E .209 (In addition to command names, readline allo)108 547.2 R .209(ws k)-.25 F -.15(ey)-.1 G 2.709(st).15 G 2.709(ob)-2.709 G 2.709(eb)-2.709 G .209 (ound to a string that is inserted when the k)-2.709 F .509 -.15(ey i) -.1 H(s).15 E(pressed \(a)108 559.2 Q F4(macr)2.5 E(o)-.45 E F0(\).)A F2 (Readline K)87 576 Q(ey Bindings)-.25 E F0 .382 (The syntax for controlling k)108 588 R .682 -.15(ey b)-.1 H .382 (indings in the).15 F F4(inputr)2.882 E(c)-.37 E F0 .382 (\214le is simple.)2.882 F .382(All that is required is the name of the) 5.382 F .383(command or the te)108 600 R .383(xt of a macro and a k)-.15 F .683 -.15(ey s)-.1 H .383 (equence to which it should be bound. The name may be speci-).15 F .853 (\214ed in one of tw)108 612 R 3.353(ow)-.1 G .853(ays: as a symbolic k) -3.453 F 1.153 -.15(ey n)-.1 H .853(ame, possibly with).15 F F4 (Meta\255)3.353 E F0(or)3.353 E F4(Contr)3.353 E(ol\255)-.45 E F0 (pre\214x)3.353 E .853(es, or as a k)-.15 F -.15(ey)-.1 G(sequence.)108 624 Q 1.553(When using the form)108 640.8 R F2 -.1(ke)4.053 G(yname).1 E F0(:)A F4(function\255name).833 E F0(or)4.053 E F4(macr)4.053 E(o)-.45 E F0(,)A F4 -.1(ke)4.053 G(yname)-.2 E F0 1.553(is the name of a k)4.053 F 1.853 -.15(ey s)-.1 H 1.553(pelled out in).15 F 2.5(English. F)108 652.8 R(or e)-.15 E(xample:)-.15 E(Control-u: uni)144 676.8 Q -.15(ve)-.25 G (rsal\255ar).15 E(gument)-.18 E(Meta-Rubout: backw)144 688.8 Q (ard-kill-w)-.1 E(ord)-.1 E(Control-o: "> output")144 700.8 Q .015 (In the abo)108 717.6 R .315 -.15(ve ex)-.15 H(ample,).15 E F4(C\255u) 2.515 E F0 .015(is bound to the function)2.515 F F2(uni)2.515 E -.1(ve) -.1 G(rsal\255ar).1 E(gument)-.1 E F0(,)A F4(M\255DEL)2.515 E F0 .015 (is bound to the function)2.515 F F2(backward\255kill\255w)108 729.6 Q (ord)-.1 E F0 3.838(,a)C(nd)-3.838 E F4(C\255o)3.837 E F0 1.337 (is bound to run the macro e)3.837 F 1.337 (xpressed on the right hand side \(that is, to)-.15 F(GNU Bash-2.05a)72 768 Q(2001 No)126.115 E -.15(ve)-.15 G(mber 13).15 E(28)185.545 E EP %%Page: 29 29 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\)) -.35 E(insert the te)108 84 Q(xt)-.15 E/F1 10/Courier@0 SF 6(>o)2.5 G (utput)-6 E F0(into the line\).)2.5 E .055(In the second form,)108 100.8 R/F2 10/Times-Bold@0 SF("k)2.555 E(eyseq")-.1 E F0(:)A/F3 10 /Times-Italic@0 SF(function\255name).833 E F0(or)2.555 E F3(macr)2.555 E (o)-.45 E F0(,)A F2 -.1(ke)2.555 G(yseq).1 E F0(dif)2.556 E .056 (fers from)-.25 F F2 -.1(ke)2.556 G(yname).1 E F0(abo)2.556 E .356 -.15 (ve i)-.15 H 2.556(nt).15 G .056(hat strings)-2.556 F 1.284 (denoting an entire k)108 112.8 R 1.584 -.15(ey s)-.1 H 1.284(equence m\ ay be speci\214ed by placing the sequence within double quotes.).15 F (Some)6.284 E .385(GNU Emacs style k)108 124.8 R .685 -.15(ey e)-.1 H .385(scapes can be used, as in the follo).15 F .385(wing e)-.25 F .386 (xample, b)-.15 F .386(ut the symbolic character names)-.2 F (are not recognized.)108 136.8 Q("\\C\255u": uni)144 160.8 Q -.15(ve) -.25 G(rsal\255ar).15 E(gument)-.18 E ("\\C\255x\\C\255r": re\255read\255init\255\214le)144 172.8 Q ("\\e[11~": "Function K)144 184.8 Q .3 -.15(ey 1)-.25 H(").15 E .354 (In this e)108 201.6 R(xample,)-.15 E F3(C\255u)2.854 E F0 .354(is ag) 2.854 F .354(ain bound to the function)-.05 F F2(uni)2.853 E -.1(ve)-.1 G(rsal\255ar).1 E(gument)-.1 E F0(.)A F3 .353(C\255x C\255r)5.353 F F0 .353(is bound to the func-)2.853 F(tion)108 213.6 Q F2 -.18(re)2.5 G .18 E(ead\255init\255\214le)-.18 E F0 2.5(,a)C(nd)-2.5 E F3 (ESC [ 1 1 ~)2.5 E F0(is bound to insert the te)2.5 E(xt)-.15 E F1 (Function Key 1)2.5 E F0(.)A (The full set of GNU Emacs style escape sequences is)108 230.4 Q F2 <5c43ad>144 242.4 Q F0(control pre\214x)20.3 E F2<5c4dad>144 254.4 Q F0 (meta pre\214x)18.08 E F2(\\e)144 266.4 Q F0(an escape character)28.78 E F2(\\\\)144 278.4 Q F0(backslash)30.44 E F2(\\")144 290.4 Q F0 (literal ")27.67 E F2(\\')144 302.4 Q F0(literal ')29.89 E(In addition \ to the GNU Emacs style escape sequences, a second set of backslash esca\ pes is a)108 319.2 Q -.25(va)-.2 G(ilable:).25 E F2(\\a)144 331.2 Q F0 (alert \(bell\))28.22 E F2(\\b)144 343.2 Q F0(backspace)27.66 E F2(\\d) 144 355.2 Q F0(delete)27.66 E F2(\\f)144 367.2 Q F0(form feed)29.89 E F2 (\\n)144 379.2 Q F0(ne)27.66 E(wline)-.25 E F2(\\r)144 391.2 Q F0 (carriage return)28.78 E F2(\\t)144 403.2 Q F0(horizontal tab)29.89 E F2 (\\v)144 415.2 Q F0 -.15(ve)28.22 G(rtical tab).15 E F2(\\)144 427.2 Q F3(nnn)A F0(the eight-bit character whose v)18.22 E(alue is the octal v) -.25 E(alue)-.25 E F3(nnn)2.5 E F0(\(one to three digits\))2.5 E F2(\\x) 144 439.2 Q F3(HH)A F0(the eight-bit character whose v)13.78 E (alue is the he)-.25 E(xadecimal v)-.15 E(alue)-.25 E F3(HH)2.5 E F0 (\(one or tw)2.5 E 2.5(oh)-.1 G .3 -.15(ex d)-2.5 H(igits\)).15 E 1.141 (When entering the te)108 456 R 1.141(xt of a macro, single or double q\ uotes must be used to indicate a macro de\214nition.)-.15 F .09 (Unquoted te)108 468 R .09(xt is assumed to be a function name.)-.15 F .089(In the macro body)5.089 F 2.589(,t)-.65 G .089 (he backslash escapes described abo)-2.589 F -.15(ve)-.15 G(are e)108 480 Q 2.5(xpanded. Backslash)-.15 F(will quote an)2.5 E 2.5(yo)-.15 G (ther character in the macro te)-2.5 E(xt, including " and '.)-.15 E F2 (Bash)108 496.8 Q F0(allo)2.929 E .429(ws the current readline k)-.25 F .729 -.15(ey b)-.1 H .429 (indings to be displayed or modi\214ed with the).15 F F2(bind)2.93 E F0 -.2(bu)2.93 G .43(iltin command.).2 F .046 (The editing mode may be switched during interacti)108 508.8 R .346 -.15 (ve u)-.25 H .046(se by using the).15 F F22.545 E F0 .045 (option to the)2.545 F F2(set)2.545 E F0 -.2(bu)2.545 G .045 (iltin command).2 F(\(see)108 520.8 Q/F4 9/Times-Bold@0 SF(SHELL B)2.5 E (UIL)-.09 E(TIN COMMANDS)-.828 E F0(belo)2.25 E(w\).)-.25 E F2 (Readline V)87 537.6 Q(ariables)-.92 E F0 .043(Readline has v)108 549.6 R .044(ariables that can be used to further customize its beha)-.25 F (vior)-.2 E 5.044(.A)-.55 G -.25(va)-2.5 G .044 (riable may be set in the).25 F F3(inpu-)2.544 E(tr)108 561.6 Q(c)-.37 E F0(\214le with a statement of the form)2.5 E F2(set)144 578.4 Q F3 (variable\255name value)2.5 E F0 .489(Except where noted, readline v)108 595.2 R .489(ariables can tak)-.25 F 2.989(et)-.1 G .489(he v)-2.989 F (alues)-.25 E F2(On)2.989 E F0(or)2.989 E F2(Off)2.989 E F0 5.489(.T)C .489(he v)-5.489 F .488(ariables and their def)-.25 F .488(ault v)-.1 F (al-)-.25 E(ues are:)108 607.2 Q F2(bell\255style \(audible\))108 624 Q F0 .01(Controls what happens when readline w)144 636 R .011 (ants to ring the terminal bell.)-.1 F .011(If set to)5.011 F F2(none) 2.511 E F0 2.511(,r)C .011(eadline ne)-2.511 F -.15(ve)-.25 G(r).15 E .94(rings the bell.)144 648 R .94(If set to)5.94 F F2(visible)3.44 E F0 3.44(,r)C .94(eadline uses a visible bell if one is a)-3.44 F -.25(va) -.2 G 3.44(ilable. If).25 F .94(set to)3.44 F F2(audible)3.44 E F0(,)A (readline attempts to ring the terminal')144 660 Q 2.5(sb)-.55 G(ell.) -2.5 E F2(comment\255begin \(`)108 672 Q(`#')-.63 E('\))-.63 E F0 .884 (The string that is inserted when the readline)144 684 R F2 (insert\255comment)3.385 E F0 .885(command is e)3.385 F -.15(xe)-.15 G 3.385(cuted. This).15 F(com-)3.385 E(mand is bound to)144 696 Q F2 (M\255#)2.5 E F0(in emacs mode and to)2.5 E F2(#)2.5 E F0 (in vi command mode.)2.5 E(GNU Bash-2.05a)72 768 Q(2001 No)126.115 E -.15(ve)-.15 G(mber 13).15 E(29)185.545 E EP %%Page: 30 30 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\)) -.35 E/F1 10/Times-Bold@0 SF(completion\255ignor)108 84 Q (e\255case \(Off\))-.18 E F0(If set to)144 96 Q F1(On)2.5 E F0 2.5(,r)C (eadline performs \214lename matching and completion in a case\255insen\ siti)-2.5 E .3 -.15(ve f)-.25 H(ashion.).05 E F1 (completion\255query\255items \(100\))108 108 Q F0 .53 (This determines when the user is queried about vie)144 120 R .529 (wing the number of possible completions gen-)-.25 F .56(erated by the) 144 132 R F1(possible\255completions)3.06 E F0 3.06(command. It)3.06 F .561(may be set to an)3.061 F 3.061(yi)-.15 G(nte)-3.061 E .561(ger v) -.15 F .561(alue greater than or)-.25 F .783(equal to zero.)144 144 R .783(If the number of possible completions is greater than or equal to \ the v)5.783 F .782(alue of this)-.25 F -.25(va)144 156 S .237 (riable, the user is ask).25 F .237(ed whether or not he wishes to vie) -.1 F 2.737(wt)-.25 G .237(hem; otherwise the)-2.737 F 2.737(ya)-.15 G .237(re simply listed)-2.737 F(on the terminal.)144 168 Q F1(con)108 180 Q -.1(ve)-.4 G(rt\255meta \(On\)).1 E F0 .613(If set to)144 192 R F1(On) 3.113 E F0 3.113(,r)C .613(eadline will con)-3.113 F -.15(ve)-.4 G .613 (rt characters with the eighth bit set to an ASCII k).15 F .912 -.15 (ey s)-.1 H .612(equence by).15 F .541 (stripping the eighth bit and pre\214xing an escape character \(in ef) 144 204 R .541(fect, using escape as the)-.25 F/F2 10/Times-Italic@0 SF .542(meta pr)3.042 F(e-)-.37 E<8c78>144 216 Q F0(\).)A F1 (disable\255completion \(Off\))108 228 Q F0 .038(If set to)144 240 R F1 (On)2.538 E F0 2.538(,r)C .038(eadline will inhibit w)-2.538 F .038 (ord completion.)-.1 F .038 (Completion characters will be inserted into the)5.038 F(line as if the) 144 252 Q 2.5(yh)-.15 G(ad been mapped to)-2.5 E F1(self-insert)2.5 E F0 (.)A F1(editing\255mode \(emacs\))108 264 Q F0 .252 (Controls whether readline be)144 276 R .253(gins with a set of k)-.15 F .553 -.15(ey b)-.1 H .253(indings similar to).15 F F2(emacs)2.753 E F0 (or)2.753 E F2(vi)2.753 E F0(.)A F1(editing\255mode)5.253 E F0 (can be set to either)144 288 Q F1(emacs)2.5 E F0(or)2.5 E F1(vi)2.5 E F0(.)A F1(enable\255k)108 300 Q(eypad \(Off\))-.1 E F0 .893(When set to) 144 312 R F1(On)3.393 E F0 3.393(,r)C .893 (eadline will try to enable the application k)-3.393 F -.15(ey)-.1 G .893(pad when it is called.).15 F .892(Some sys-)5.893 F (tems need this to enable the arro)144 324 Q 2.5(wk)-.25 G -.15(ey)-2.6 G(s.).15 E F1(expand\255tilde \(Off\))108 336 Q F0(If set to)144 348 Q F1(on)2.5 E F0 2.5(,t)C(ilde e)-2.5 E (xpansion is performed when readline attempts w)-.15 E(ord completion.) -.1 E F1(history-pr)108 360 Q(eser)-.18 E -.1(ve)-.1 G(-point).1 E F0 1.492(If set to)144 372 R F1(on)3.992 E F0 3.992(,t)C 1.493(he history \ code attempts to place point at the same location on each history line) -3.992 F(retri)144 384 Q -.15(ve)-.25 G 2.5(dw).15 G(ith)-2.5 E F1(pr) 2.5 E -.15(ev)-.18 G(ious-history).15 E F0(or)2.5 E F1(next-history)2.5 E F0(.)A F1(horizontal\255scr)108 396 Q(oll\255mode \(Off\))-.18 E F0 .449(When set to)144 408 R F1(On)2.949 E F0 2.949(,m)C(ak)-2.949 E .448 (es readline use a single line for display)-.1 F 2.948(,s)-.65 G .448 (crolling the input horizontally on a)-2.948 F 1.194(single screen line\ when it becomes longer than the screen width rather than wrapping to a\ ne)144 420 R(w)-.25 E(line.)144 432 Q F1(input\255meta \(Off\))108 444 Q F0 .228(If set to)144 456 R F1(On)2.728 E F0 2.728(,r)C .227(eadline \ will enable eight-bit input \(that is, it will not strip the high bit f\ rom the char)-2.728 F(-)-.2 E .956(acters it reads\), re)144 468 R -.05 (ga)-.15 G .956(rdless of what the terminal claims it can support.).05 F .957(The name)5.956 F F1(meta\255\215ag)3.457 E F0 .957(is a)3.457 F (synon)144 480 Q(ym for this v)-.15 E(ariable.)-.25 E F1(isear)108 492 Q (ch\255terminators \(`)-.18 E(`C\255[C\255J')-.63 E('\))-.63 E F0 .439(\ The string of characters that should terminate an incremental search wi\ thout subsequently e)144 504 R -.15(xe)-.15 G(cut-).15 E .934 (ing the character as a command.)144 516 R .935(If this v)5.935 F .935 (ariable has not been gi)-.25 F -.15(ve)-.25 G 3.435(nav).15 G .935 (alue, the characters)-3.685 F F2(ESC)3.435 E F0(and)144 528 Q F2 (C\255J)2.5 E F0(will terminate an incremental search.)2.5 E F1 -.1(ke) 108 540 S(ymap \(emacs\)).1 E F0 2.021(Set the current readline k)144 552 R -.15(ey)-.1 G 4.521(map. The).15 F 2.021(set of v)4.521 F 2.021 (alid k)-.25 F -.15(ey)-.1 G 2.021(map names is).15 F F2 2.02 (emacs, emacs\255standar)4.52 F(d,)-.37 E .068 (emacs\255meta, emacs\255ctlx, vi, vi\255command)144 564 R F0 2.568(,a)C (nd)-2.568 E F2(vi\255insert)2.568 E F0(.).68 E F2(vi)5.068 E F0 .068 (is equi)2.568 F -.25(va)-.25 G .068(lent to).25 F F2(vi\255command) 2.569 E F0(;)A F2(emacs)2.569 E F0 1.544(is equi)144 576 R -.25(va)-.25 G 1.544(lent to).25 F F2(emacs\255standar)4.044 E(d)-.37 E F0 6.544(.T)C 1.544(he def)-6.544 F 1.544(ault v)-.1 F 1.544(alue is)-.25 F F2(emacs) 4.044 E F0 4.044(;t).27 G 1.544(he v)-4.044 F 1.544(alue of)-.25 F F1 (editing\255mode)4.043 E F0(also)4.043 E(af)144 588 Q(fects the def)-.25 E(ault k)-.1 E -.15(ey)-.1 G(map.).15 E F1(mark\255dir)108 600 Q (ectories \(On\))-.18 E F0(If set to)144 612 Q F1(On)2.5 E F0 2.5(,c)C (ompleted directory names ha)-2.5 E .3 -.15(ve a s)-.2 H(lash appended.) .15 E F1(mark\255modi\214ed\255lines \(Off\))108 624 Q F0(If set to)144 636 Q F1(On)2.5 E F0 2.5(,h)C(istory lines that ha)-2.5 E .3 -.15(ve b) -.2 H(een modi\214ed are displayed with a preceding asterisk \().15 E F1 (*)A F0(\).)A F1(match\255hidden\255\214les \(On\))108 648 Q F0 .192 (This v)144 660 R .192(ariable, when set to)-.25 F F1(On)2.692 E F0 2.692(,c)C .192(auses readline to match \214les whose names be)-2.692 F .193(gin with a `.)-.15 F 2.693('\()-.7 G(hidden)-2.693 E 1.024 (\214les\) when performing \214lename completion, unless the leading `.) 144 672 R 3.523('i)-.7 G 3.523(ss)-3.523 G 1.023 (upplied by the user in the)-3.523 F(\214lename to be completed.)144 684 Q F1(output\255meta \(Off\))108 696 Q F0 .506(If set to)144 708 R F1(On) 3.006 E F0 3.006(,r)C .507(eadline will display characters with the eig\ hth bit set directly rather than as a meta-)-3.006 F(pre\214x)144 720 Q (ed escape sequence.)-.15 E(GNU Bash-2.05a)72 768 Q(2001 No)126.115 E -.15(ve)-.15 G(mber 13).15 E(30)185.545 E EP %%Page: 31 31 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\)) -.35 E/F1 10/Times-Bold@0 SF (print\255completions\255horizontally \(Off\))108 84 Q F0 1.319 (If set to)144 96 R F1(On)3.819 E F0 3.819(,r)C 1.318(eadline will disp\ lay completions with matches sorted horizontally in alphabetical)-3.819 F(order)144 108 Q 2.5(,r)-.4 G(ather than do)-2.5 E(wn the screen.)-.25 E F1(sho)108 120 Q(w\255all\255if\255ambiguous \(Off\))-.1 E F0 .477 (This alters the def)144 132 R .477(ault beha)-.1 F .477 (vior of the completion functions.)-.2 F .478(If set to)5.478 F F1(on) 2.978 E F0 2.978(,w)C .478(ords which ha)-3.078 F .778 -.15(ve m)-.2 H (ore).15 E 1.264(than one possible completion cause the matches to be l\ isted immediately instead of ringing the)144 144 R(bell.)144 156 Q F1 (visible\255stats \(Off\))108 168 Q F0 .846(If set to)144 180 R F1(On) 3.346 E F0 3.346(,ac)C .846(haracter denoting a \214le')-3.346 F 3.346 (st)-.55 G .846(ype as reported by)-3.346 F/F2 10/Times-Italic@0 SF (stat)3.346 E F0 .846(\(2\) is appended to the \214lename)B (when listing possible completions.)144 192 Q F1 (Readline Conditional Constructs)87 208.8 Q F0 .05 (Readline implements a f)108 220.8 R .05(acility similar in spirit to t\ he conditional compilation features of the C preprocessor)-.1 F .096 (which allo)108 232.8 R .096(ws k)-.25 F .396 -.15(ey b)-.1 H .096 (indings and v).15 F .096 (ariable settings to be performed as the result of tests.)-.25 F .097 (There are four parser)5.096 F(directi)108 244.8 Q -.15(ve)-.25 G 2.5 (su).15 G(sed.)-2.5 E F1($if)108 261.6 Q F0(The)24.89 E F1($if)2.963 E F0 .463(construct allo)2.963 F .462(ws bindings to be made based on the\ editing mode, the terminal being used,)-.25 F .477 (or the application using readline.)144 273.6 R .477(The te)5.477 F .477 (xt of the test e)-.15 F .477 (xtends to the end of the line; no characters)-.15 F (are required to isolate it.)144 285.6 Q F1(mode)144 302.4 Q F0(The) 12.67 E F1(mode=)3.712 E F0 1.212(form of the)3.712 F F1($if)3.711 E F0 (directi)3.711 E 1.511 -.15(ve i)-.25 H 3.711(su).15 G 1.211 (sed to test whether readline is in emacs or vi)-3.711 F 3.065 (mode. This)180 314.4 R .565(may be used in conjunction with the)3.065 F F1 .565(set k)3.065 F(eymap)-.1 E F0 .565(command, for instance, to) 3.065 F .735(set bindings in the)180 326.4 R F2(emacs\255standar)3.235 E (d)-.37 E F0(and)3.235 E F2(emacs\255ctlx)3.235 E F0 -.1(ke)3.235 G .735 (ymaps only if readline is starting)-.05 F(out in emacs mode.)180 338.4 Q F1(term)144 355.2 Q F0(The)15.46 E F1(term=)3.196 E F0 .696 (form may be used to include terminal-speci\214c k)3.196 F .996 -.15 (ey b)-.1 H .697(indings, perhaps to bind).15 F .654(the k)180 367.2 R .954 -.15(ey s)-.1 H .654(equences output by the terminal').15 F 3.154 (sf)-.55 G .654(unction k)-3.154 F -.15(ey)-.1 G 3.154(s. The).15 F -.1 (wo)3.154 G .654(rd on the right side of).1 F(the)180 379.2 Q F1(=)3.231 E F0 .731(is tested ag)3.231 F .732(ainst the both full name of the ter\ minal and the portion of the terminal)-.05 F(name before the \214rst)180 391.2 Q F12.5 E F0 5(.T)C(his allo)-5 E(ws)-.25 E F2(sun)2.5 E F0 (to match both)2.5 E F2(sun)2.5 E F0(and)2.5 E F2(sun\255cmd)2.5 E F0 2.5(,f).77 G(or instance.)-2.5 E F1(application)144 408 Q F0(The)180 420 Q F1(application)3.003 E F0 .503 (construct is used to include application-speci\214c settings.)3.003 F .503(Each program)5.503 F .114(using the readline library sets the)180 432 R F2 .114(application name)2.614 F F0 2.614(,a)C .114 (nd an initialization \214le can test for a)-2.614 F .501(particular v) 180 444 R 3.001(alue. This)-.25 F .501(could be used to bind k)3.001 F .801 -.15(ey s)-.1 H .5(equences to functions useful for a spe-).15 F .396(ci\214c program.)180 456 R -.15(Fo)5.396 G 2.896(ri).15 G .396 (nstance, the follo)-2.896 F .396(wing command adds a k)-.25 F .696 -.15 (ey s)-.1 H .397(equence that quotes the).15 F(current or pre)180 468 Q (vious w)-.25 E(ord in Bash:)-.1 E F1($if)180 492 Q F0(Bash)2.5 E 2.5 (#Q)180 504 S(uote the current or pre)-2.5 E(vious w)-.25 E(ord)-.1 E ("\\C\255xq": "\\eb\\"\\ef\\"")180 516 Q F1($endif)180 528 Q($endif)108 544.8 Q F0(This command, as seen in the pre)9.33 E(vious e)-.25 E (xample, terminates an)-.15 E F1($if)2.5 E F0(command.)2.5 E F1($else) 108 561.6 Q F0(Commands in this branch of the)15.45 E F1($if)2.5 E F0 (directi)2.5 E .3 -.15(ve a)-.25 H(re e).15 E -.15(xe)-.15 G (cuted if the test f).15 E(ails.)-.1 E F1($include)108 578.4 Q F0 .357 (This directi)144 590.4 R .657 -.15(ve t)-.25 H(ak).15 E .357 (es a single \214lename as an ar)-.1 F .356 (gument and reads commands and bindings from that)-.18 F 2.5(\214le. F) 144 602.4 R(or e)-.15 E(xample, the follo)-.15 E(wing directi)-.25 E .3 -.15(ve w)-.25 H(ould read).05 E F2(/etc/inputr)2.5 E(c)-.37 E F0(:)A F1 ($include)144 626.4 Q F2(/etc/inputr)5.833 E(c)-.37 E F1(Sear)87 643.2 Q (ching)-.18 E F0 .834(Readline pro)108 655.2 R .834 (vides commands for searching through the command history \(see)-.15 F /F3 9/Times-Bold@0 SF(HIST)3.335 E(OR)-.162 E(Y)-.315 E F0(belo)3.085 E .835(w\) for lines)-.25 F(containing a speci\214ed string.)108 667.2 Q (There are tw)5 E 2.5(os)-.1 G(earch modes:)-2.5 E F2(incr)2.5 E (emental)-.37 E F0(and)2.5 E F2(non-incr)2.5 E(emental)-.37 E F0(.).51 E .698(Incremental searches be)108 684 R .698 (gin before the user has \214nished typing the search string.)-.15 F .697(As each character of the)5.697 F .112 (search string is typed, readline displays the ne)108 696 R .112 (xt entry from the history matching the string typed so f)-.15 F(ar)-.1 E 5.113(.A)-.55 G(n)-5.113 E .542 (incremental search requires only as man)108 708 R 3.042(yc)-.15 G .542 (haracters as needed to \214nd the desired history entry)-3.042 F 5.541 (.T)-.65 G .541(he char)-5.541 F(-)-.2 E .224(acters present in the v) 108 720 R .224(alue of the)-.25 F F1(isear)2.724 E(ch-terminators)-.18 E F0 -.25(va)2.724 G .224 (riable are used to terminate an incremental search.).25 F (GNU Bash-2.05a)72 768 Q(2001 No)126.115 E -.15(ve)-.15 G(mber 13).15 E (31)185.545 E EP %%Page: 32 32 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\)) -.35 E .66(If that v)108 84 R .66(ariable has not been assigned a v)-.25 F .66(alue the Escape and Control-J characters will terminate an incre-) -.25 F .096(mental search.)108 96 R .096(Control-G will abort an increm\ ental search and restore the original line.)5.096 F .097 (When the search is)5.097 F(terminated, the history entry containing th\ e search string becomes the current line.)108 108 Q 2.939 -.8(To \214) 108 124.8 T 1.339(nd other matching entries in the history list, type C\ ontrol-S or Control-R as appropriate.).8 F 1.338(This will)6.338 F .674 (search backw)108 136.8 R .674(ard or forw)-.1 F .674 (ard in the history for the ne)-.1 F .675 (xt entry matching the search string typed so f)-.15 F(ar)-.1 E 5.675 (.A)-.55 G -.15(ny)-5.675 G .175(other k)108 148.8 R .475 -.15(ey s)-.1 H .174 (equence bound to a readline command will terminate the search and e).15 F -.15(xe)-.15 G .174(cute that command.).15 F -.15(Fo)5.174 G(r).15 E .54(instance, a)108 160.8 R/F1 10/Times-Italic@0 SF(ne)3.04 E(wline)-.15 E F0 .541(will terminate the search and accept the line, thereby e)3.04 F -.15(xe)-.15 G .541(cuting the command from the).15 F(history list.) 108 172.8 Q .653(Readline remembers the last incremental search string.) 108 189.6 R .653(If tw)5.653 F 3.153(oC)-.1 G .653 (ontrol-Rs are typed without an)-3.153 F 3.152(yi)-.15 G(nterv)-3.152 E (en-)-.15 E(ing characters de\214ning a ne)108 201.6 Q 2.5(ws)-.25 G (earch string, an)-2.5 E 2.5(yr)-.15 G(emembered search string is used.) -2.5 E .567(Non-incremental searches read the entire search string befo\ re starting to search for matching history lines.)108 218.4 R(The searc\ h string may be typed by the user or be part of the contents of the cur\ rent line.)108 230.4 Q/F2 10/Times-Bold@0 SF(Readline Command Names)87 247.2 Q F0 1.392(The follo)108 259.2 R 1.391 (wing is a list of the names of the commands and the def)-.25 F 1.391 (ault k)-.1 F 1.691 -.15(ey s)-.1 H 1.391(equences to which the).15 F 3.891(ya)-.15 G(re)-3.891 E 2.621(bound. Command)108 271.2 R .121 (names without an accompan)2.621 F .121(ying k)-.15 F .421 -.15(ey s)-.1 H .122(equence are unbound by def).15 F 2.622(ault. In)-.1 F .122 (the follo)2.622 F(wing)-.25 E(descriptions,)108 283.2 Q F1(point)3.411 E F0 .911(refers to the current cursor position, and)3.411 F F1(mark) 3.411 E F0 .91(refers to a cursor position sa)3.411 F -.15(ve)-.2 G 3.41 (db).15 G 3.41(yt)-3.41 G(he)-3.41 E F2(set\255mark)108 295.2 Q F0 2.5 (command. The)2.5 F(te)2.5 E (xt between the point and mark is referred to as the)-.15 E F1 -.37(re) 2.5 G(gion)-.03 E F0(.)A F2(Commands f)87 312 Q(or Mo)-.25 E(ving)-.1 E (beginning\255of\255line \(C\255a\))108 324 Q F0(Mo)144 336 Q .3 -.15 (ve t)-.15 H 2.5(ot).15 G(he start of the current line.)-2.5 E F2 (end\255of\255line \(C\255e\))108 348 Q F0(Mo)144 360 Q .3 -.15(ve t) -.15 H 2.5(ot).15 G(he end of the line.)-2.5 E F2 -.25(fo)108 372 S (rward\255char \(C\255f\)).25 E F0(Mo)144 384 Q .3 -.15(ve f)-.15 H(orw) .15 E(ard a character)-.1 E(.)-.55 E F2(backward\255char \(C\255b\))108 396 Q F0(Mo)144 408 Q .3 -.15(ve b)-.15 H(ack a character).15 E(.)-.55 E F2 -.25(fo)108 420 S(rward\255w).25 E(ord \(M\255f\))-.1 E F0(Mo)144 432 Q .822 -.15(ve f)-.15 H(orw).15 E .522(ard to the end of the ne)-.1 F .523(xt w)-.15 F 3.023(ord. W)-.1 F .523 (ords are composed of alphanumeric characters \(let-)-.8 F (ters and digits\).)144 444 Q F2(backward\255w)108 456 Q(ord \(M\255b\)) -.1 E F0(Mo)144 468 Q 1.71 -.15(ve b)-.15 H 1.41 (ack to the start of the current or pre).15 F 1.41(vious w)-.25 F 3.91 (ord. W)-.1 F 1.41(ords are composed of alphanumeric)-.8 F (characters \(letters and digits\).)144 480 Q F2(clear\255scr)108 492 Q (een \(C\255l\))-.18 E F0 .993(Clear the screen lea)144 504 R .993 (ving the current line at the top of the screen.)-.2 F -.4(Wi)5.993 G .993(th an ar).4 F .993(gument, refresh the)-.18 F (current line without clearing the screen.)144 516 Q F2 -.18(re)108 528 S(draw\255curr).18 E(ent\255line)-.18 E F0(Refresh the current line.)144 540 Q F2(Commands f)87 556.8 Q(or Manipulating the History)-.25 E (accept\255line \(Newline, Retur)108 568.8 Q(n\))-.15 E F0 .159 (Accept the line re)144 580.8 R -.05(ga)-.15 G .159 (rdless of where the cursor is.).05 F .158(If this line is non-empty) 5.158 F 2.658(,a)-.65 G .158(dd it to the history list)-2.658 F .699 (according to the state of the)144 592.8 R/F3 9/Times-Bold@0 SF (HISTCONTR)3.199 E(OL)-.27 E F0 -.25(va)2.949 G 3.199(riable. If).25 F .699(the line is a modi\214ed history line, then)3.199 F (restore the history line to its original state.)144 604.8 Q F2(pr)108 616.8 Q -.15(ev)-.18 G(ious\255history \(C\255p\)).15 E F0 (Fetch the pre)144 628.8 Q(vious command from the history list, mo)-.25 E(ving back in the list.)-.15 E F2(next\255history \(C\255n\))108 640.8 Q F0(Fetch the ne)144 652.8 Q(xt command from the history list, mo)-.15 E(ving forw)-.15 E(ard in the list.)-.1 E F2 (beginning\255of\255history \(M\255<\))108 664.8 Q F0(Mo)144 676.8 Q .3 -.15(ve t)-.15 H 2.5(ot).15 G(he \214rst line in the history)-2.5 E(.) -.65 E F2(end\255of\255history \(M\255>\))108 688.8 Q F0(Mo)144 700.8 Q .3 -.15(ve t)-.15 H 2.5(ot).15 G(he end of the input history)-2.5 E 2.5 (,i)-.65 G(.e., the line currently being entered.)-2.5 E(GNU Bash-2.05a) 72 768 Q(2001 No)126.115 E -.15(ve)-.15 G(mber 13).15 E(32)185.545 E EP %%Page: 33 33 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\)) -.35 E/F1 10/Times-Bold@0 SF -2.29 -.18(re v)108 84 T(erse\255sear).08 E (ch\255history \(C\255r\))-.18 E F0 1.471(Search backw)144 96 R 1.471 (ard starting at the current line and mo)-.1 F 1.47 (ving `up' through the history as necessary)-.15 F(.)-.65 E (This is an incremental search.)144 108 Q F1 -.25(fo)108 120 S (rward\255sear).25 E(ch\255history \(C\255s\))-.18 E F0 1.131 (Search forw)144 132 R 1.131(ard starting at the current line and mo)-.1 F 1.132(ving `do)-.15 F 1.132(wn' through the history as necessary)-.25 F(.)-.65 E(This is an incremental search.)144 144 Q F1(non\255incr)108 156 Q(emental\255r)-.18 E -2.3 -.15(ev e)-.18 H(rse\255sear).15 E (ch\255history \(M\255p\))-.18 E F0 .165(Search backw)144 168 R .164(ar\ d through the history starting at the current line using a non-incremen\ tal search for)-.1 F 2.5(as)144 180 S(tring supplied by the user)-2.5 E (.)-.55 E F1(non\255incr)108 192 Q(emental\255f)-.18 E(orward\255sear) -.25 E(ch\255history \(M\255n\))-.18 E F0 1.353(Search forw)144 204 R 1.354(ard through the history using a non-incremental search for a stri\ ng supplied by the)-.1 F(user)144 216 Q(.)-.55 E F1(history\255sear)108 228 Q(ch\255f)-.18 E(orward)-.25 E F0 .249(Search forw)144 240 R .249(a\ rd through the history for the string of characters between the start o\ f the current line)-.1 F(and the point.)144 252 Q (This is a non-incremental search.)5 E F1(history\255sear)108 264 Q (ch\255backward)-.18 E F0 .95(Search backw)144 276 R .951(ard through t\ he history for the string of characters between the start of the curren\ t)-.1 F(line and the point.)144 288 Q(This is a non-incremental search.) 5 E F1(yank\255nth\255ar)108 300 Q 2.5(g\()-.1 G<4dad43ad7929>-2.5 E F0 .622(Insert the \214rst ar)144 312 R .622(gument to the pre)-.18 F .622 (vious command \(usually the second w)-.25 F .622(ord on the pre)-.1 F .622(vious line\))-.25 F .794(at point.)144 324 R -.4(Wi)5.794 G .794 (th an ar).4 F(gument)-.18 E/F2 10/Times-Italic@0 SF(n)3.294 E F0 3.294 (,i).24 G .794(nsert the)-3.294 F F2(n)3.294 E F0 .794(th w)B .794 (ord from the pre)-.1 F .794(vious command \(the w)-.25 F .795 (ords in the)-.1 F(pre)144 336 Q .292(vious command be)-.25 F .292 (gin with w)-.15 F .291(ord 0\).)-.1 F 2.791(An)5.291 G -2.25 -.15(eg a) -2.791 H(ti).15 E .591 -.15(ve a)-.25 H -.18(rg).15 G .291 (ument inserts the).18 F F2(n)2.791 E F0 .291(th w)B .291 (ord from the end of)-.1 F(the pre)144 348 Q(vious command.)-.25 E F1 (yank\255last\255ar)108 360 Q 2.5(g\()-.1 G -1.667(M\255. ,)-2.5 F -1.667(M\255_ \))2.5 F F0 1.307(Insert the last ar)144 372 R 1.307 (gument to the pre)-.18 F 1.307(vious command \(the last w)-.25 F 1.308 (ord of the pre)-.1 F 1.308(vious history entry\).)-.25 F -.4(Wi)144 384 S .736(th an ar).4 F .736(gument, beha)-.18 F 1.036 -.15(ve ex)-.2 H .736(actly lik).15 F(e)-.1 E F1(yank\255nth\255ar)3.235 E(g)-.1 E F0 5.735(.S)C(uccessi)-5.735 E 1.035 -.15(ve c)-.25 H .735(alls to).15 F F1 (yank\255last\255ar)3.235 E(g)-.1 E F0(mo)3.235 E -.15(ve)-.15 G (back through the history list, inserting the last ar)144 396 Q (gument of each line in turn.)-.18 E F1 (shell\255expand\255line \(M\255C\255e\))108 408 Q F0 .622 (Expand the line as the shell does.)144 420 R .622 (This performs alias and history e)5.622 F .623 (xpansion as well as all of the)-.15 F(shell w)144 432 Q(ord e)-.1 E 2.5 (xpansions. See)-.15 F/F3 9/Times-Bold@0 SF(HIST)2.5 E(OR)-.162 E 2.25 (YE)-.315 G(XP)-2.25 E(ANSION)-.666 E F0(belo)2.25 E 2.5(wf)-.25 G (or a description of history e)-2.5 E(xpansion.)-.15 E F1 (history\255expand\255line \(M\255^\))108 444 Q F0 .939 (Perform history e)144 456 R .939(xpansion on the current line.)-.15 F (See)5.939 E F3(HIST)3.439 E(OR)-.162 E 3.189(YE)-.315 G(XP)-3.189 E (ANSION)-.666 E F0(belo)3.189 E 3.438(wf)-.25 G .938(or a descrip-) -3.438 F(tion of history e)144 468 Q(xpansion.)-.15 E F1(magic\255space) 108 480 Q F0 1.626(Perform history e)144 492 R 1.626 (xpansion on the current line and insert a space.)-.15 F(See)6.627 E F3 (HIST)4.127 E(OR)-.162 E 3.877(YE)-.315 G(XP)-3.877 E(ANSION)-.666 E F0 (belo)144 504 Q 2.5(wf)-.25 G(or a description of history e)-2.5 E (xpansion.)-.15 E F1(alias\255expand\255line)108 516 Q F0 .395 (Perform alias e)144 528 R .395(xpansion on the current line.)-.15 F (See)5.395 E F3(ALIASES)2.895 E F0(abo)2.645 E .694 -.15(ve f)-.15 H .394(or a description of alias e).15 F(xpan-)-.15 E(sion.)144 540 Q F1 (history\255and\255alias\255expand\255line)108 552 Q F0 (Perform history and alias e)144 564 Q(xpansion on the current line.) -.15 E F1(insert\255last\255ar)108 576 Q(gument \(M\255.)-.1 E 2.5(,M) .833 G -1.667(\255_ \))-2.5 F F0 2.5(As)144 588 S(ynon)-2.5 E(ym for) -.15 E F1(yank\255last\255ar)2.5 E(g)-.1 E F0(.)A F1 (operate\255and\255get\255next \(C\255o\))108 600 Q F0 .947 (Accept the current line for e)144 612 R -.15(xe)-.15 G .948 (cution and fetch the ne).15 F .948(xt line relati)-.15 F 1.248 -.15 (ve t)-.25 H 3.448(ot).15 G .948(he current line from the)-3.448 F (history for editing.)144 624 Q(An)5 E 2.5(ya)-.15 G -.18(rg)-2.5 G (ument is ignored.).18 E F1(Commands f)87 640.8 Q(or Changing T)-.25 E (ext)-.92 E(delete\255char \(C\255d\))108 652.8 Q F0 .358 (Delete the character at point.)144 664.8 R .358(If point is at the be) 5.358 F .358(ginning of the line, there are no characters in the)-.15 F (line, and the last character typed w)144 676.8 Q(as not bound to)-.1 E F1(delete\255char)2.5 E F0 2.5(,t)C(hen return)-2.5 E F3(EOF)2.5 E/F4 9 /Times-Roman@0 SF(.)A F1(backward\255delete\255char \(Rubout\))108 688.8 Q F0 .552(Delete the character behind the cursor)144 700.8 R 5.553(.W) -.55 G .553(hen gi)-5.553 F -.15(ve)-.25 G 3.053(nan).15 G .553 (umeric ar)-3.053 F .553(gument, sa)-.18 F .853 -.15(ve t)-.2 H .553 (he deleted te).15 F .553(xt on)-.15 F(the kill ring.)144 712.8 Q (GNU Bash-2.05a)72 768 Q(2001 No)126.115 E -.15(ve)-.15 G(mber 13).15 E (33)185.545 E EP %%Page: 34 34 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\)) -.35 E/F1 10/Times-Bold@0 SF -.25(fo)108 84 S (rward\255backward\255delete\255char).25 E F0 .474 (Delete the character under the cursor)144 96 R 2.974(,u)-.4 G .474 (nless the cursor is at the end of the line, in which case the)-2.974 F (character behind the cursor is deleted.)144 108 Q F1 (quoted\255insert \(C\255q, C\255v\))108 120 Q F0 .778(Add the ne)144 132 R .779(xt character typed to the line v)-.15 F 3.279(erbatim. This) -.15 F .779(is ho)3.279 F 3.279(wt)-.25 G 3.279(oi)-3.279 G .779 (nsert characters lik)-3.279 F(e)-.1 E F1(C\255q)3.279 E F0 3.279(,f)C (or)-3.279 E -.15(ex)144 144 S(ample.).15 E F1(tab\255insert \(C\255v T) 108 156 Q(AB\))-.9 E F0(Insert a tab character)144 168 Q(.)-.55 E F1 (self\255insert \(a, b, A, 1, !, ...\))108 180 Q F0 (Insert the character typed.)144 192 Q F1(transpose\255chars \(C\255t\)) 108 204 Q F0 .322(Drag the character before point forw)144 216 R .321 (ard o)-.1 F -.15(ve)-.15 G 2.821(rt).15 G .321 (he character at point, mo)-2.821 F .321(ving point forw)-.15 F .321 (ard as well.)-.1 F 1.182 (If point is at the end of the line, then this transposes the tw)144 228 R 3.683(oc)-.1 G 1.183(haracters before point.)-3.683 F(Ne)6.183 E -.05 (ga)-.15 G(ti).05 E -.15(ve)-.25 G(ar)144 240 Q(guments ha)-.18 E .3 -.15(ve n)-.2 H 2.5(oe).15 G -.25(ff)-2.5 G(ect.).25 E F1 (transpose\255w)108 252 Q(ords \(M\255t\))-.1 E F0 .024(Drag the w)144 264 R .024(ord before point past the w)-.1 F .023(ord after point, mo) -.1 F .023(ving point o)-.15 F -.15(ve)-.15 G 2.523(rt).15 G .023(hat w) -2.523 F .023(ord as well.)-.1 F .023(If point)5.023 F (is at the end of the line, this transposes the last tw)144 276 Q 2.5 (ow)-.1 G(ords on the line.)-2.6 E F1(upcase\255w)108 288 Q (ord \(M\255u\))-.1 E F0 1.698(Uppercase the current \(or follo)144 300 R 1.698(wing\) w)-.25 F 4.198(ord. W)-.1 F 1.698(ith a ne)-.4 F -.05(ga) -.15 G(ti).05 E 1.999 -.15(ve a)-.25 H -.18(rg).15 G 1.699 (ument, uppercase the pre).18 F(vious)-.25 E -.1(wo)144 312 S(rd, b).1 E (ut do not mo)-.2 E .3 -.15(ve p)-.15 H(oint.).15 E F1(do)108 324 Q (wncase\255w)-.1 E(ord \(M\255l\))-.1 E F0(Lo)144 336 Q 1.648 (wercase the current \(or follo)-.25 F 1.648(wing\) w)-.25 F 4.148 (ord. W)-.1 F 1.647(ith a ne)-.4 F -.05(ga)-.15 G(ti).05 E 1.947 -.15 (ve a)-.25 H -.18(rg).15 G 1.647(ument, lo).18 F 1.647(wercase the pre) -.25 F(vious)-.25 E -.1(wo)144 348 S(rd, b).1 E(ut do not mo)-.2 E .3 -.15(ve p)-.15 H(oint.).15 E F1(capitalize\255w)108 360 Q (ord \(M\255c\))-.1 E F0 1.974(Capitalize the current \(or follo)144 372 R 1.974(wing\) w)-.25 F 4.474(ord. W)-.1 F 1.974(ith a ne)-.4 F -.05(ga) -.15 G(ti).05 E 2.274 -.15(ve a)-.25 H -.18(rg).15 G 1.975 (ument, capitalize the pre).18 F(vious)-.25 E -.1(wo)144 384 S(rd, b).1 E(ut do not mo)-.2 E .3 -.15(ve p)-.15 H(oint.).15 E F1(Killing and Y)87 400.8 Q(anking)-.85 E(kill\255line \(C\255k\))108 412.8 Q F0 (Kill the te)144 424.8 Q(xt from point to the end of the line.)-.15 E F1 (backward\255kill\255line \(C\255x Rubout\))108 436.8 Q F0(Kill backw) 144 448.8 Q(ard to the be)-.1 E(ginning of the line.)-.15 E F1 (unix\255line\255discard \(C\255u\))108 460.8 Q F0(Kill backw)144 472.8 Q(ard from point to the be)-.1 E(ginning of the line.)-.15 E (The killed te)5 E(xt is sa)-.15 E -.15(ve)-.2 G 2.5(do).15 G 2.5(nt) -2.5 G(he kill-ring.)-2.5 E F1(kill\255whole\255line)108 484.8 Q F0 (Kill all characters on the current line, no matter where point is.)144 496.8 Q F1(kill\255w)108 508.8 Q(ord \(M\255d\))-.1 E F0 .729 (Kill from point to the end of the current w)144 520.8 R .728 (ord, or if between w)-.1 F .728(ords, to the end of the ne)-.1 F .728 (xt w)-.15 F(ord.)-.1 E -.8(Wo)144 532.8 S (rd boundaries are the same as those used by).8 E F1 -.25(fo)2.5 G (rward\255w).25 E(ord)-.1 E F0(.)A F1(backward\255kill\255w)108 544.8 Q (ord \(M\255Rubout\))-.1 E F0(Kill the w)144 556.8 Q(ord behind point.) -.1 E -.8(Wo)5 G(rd boundaries are the same as those used by).8 E F1 (backward\255w)2.5 E(ord)-.1 E F0(.)A F1(unix\255w)108 568.8 Q (ord\255rubout \(C\255w\))-.1 E F0 .364(Kill the w)144 580.8 R .364 (ord behind point, using white space as a w)-.1 F .365(ord boundary)-.1 F 5.365(.T)-.65 G .365(he killed te)-5.365 F .365(xt is sa)-.15 F -.15 (ve)-.2 G 2.865(do).15 G 2.865(nt)-2.865 G(he)-2.865 E(kill-ring.)144 592.8 Q F1(delete\255horizontal\255space \(M\255\\\))108 604.8 Q F0 (Delete all spaces and tabs around point.)144 616.8 Q F1(kill\255r)108 628.8 Q(egion)-.18 E F0(Kill the te)144 640.8 Q(xt in the current re) -.15 E(gion.)-.15 E F1(copy\255r)108 652.8 Q(egion\255as\255kill)-.18 E F0(Cop)144 664.8 Q 2.5(yt)-.1 G(he te)-2.5 E(xt in the re)-.15 E (gion to the kill b)-.15 E(uf)-.2 E(fer)-.25 E(.)-.55 E F1 (copy\255backward\255w)108 676.8 Q(ord)-.1 E F0(Cop)144 688.8 Q 4.801 (yt)-.1 G 2.301(he w)-4.801 F 2.301(ord before point to the kill b)-.1 F (uf)-.2 E(fer)-.25 E 7.301(.T)-.55 G 2.301(he w)-7.301 F 2.3 (ord boundaries are the same as)-.1 F F1(back-)4.8 E(ward\255w)144 700.8 Q(ord)-.1 E F0(.)A(GNU Bash-2.05a)72 768 Q(2001 No)126.115 E -.15(ve) -.15 G(mber 13).15 E(34)185.545 E EP %%Page: 35 35 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\)) -.35 E/F1 10/Times-Bold@0 SF(copy\255f)108 84 Q(orward\255w)-.25 E(ord) -.1 E F0(Cop)144 96 Q 4.507(yt)-.1 G 2.007(he w)-4.507 F 2.007 (ord follo)-.1 F 2.007(wing point to the kill b)-.25 F(uf)-.2 E(fer)-.25 E 7.008(.T)-.55 G 2.008(he w)-7.008 F 2.008 (ord boundaries are the same as)-.1 F F1 -.25(fo)4.508 G -.37(r-).25 G (ward\255w)144 108 Q(ord)-.1 E F0(.)A F1(yank \(C\255y\))108 120 Q F0 -1 (Ya)144 132 S(nk the top of the kill ring into the b)1 E(uf)-.2 E (fer at point.)-.25 E F1(yank\255pop \(M\255y\))108 144 Q F0 (Rotate the kill ring, and yank the ne)144 156 Q 2.5(wt)-.25 G 2.5 (op. Only)-2.5 F -.1(wo)2.5 G(rks follo).1 E(wing)-.25 E F1(yank)2.5 E F0(or)2.5 E F1(yank\255pop)2.5 E F0(.)A F1(Numeric Ar)87 172.8 Q (guments)-.1 E(digit\255ar)108 184.8 Q (gument \(M\2550, M\2551, ..., M\255\255\))-.1 E F0 .642 (Add this digit to the ar)144 196.8 R .641 (gument already accumulating, or start a ne)-.18 F 3.141(wa)-.25 G -.18 (rg)-3.141 G 3.141(ument. M\255\255).18 F .641(starts a ne)3.141 F(g-) -.15 E(ati)144 208.8 Q .3 -.15(ve a)-.25 H -.18(rg).15 G(ument.).18 E F1 (uni)108 220.8 Q -.1(ve)-.1 G(rsal\255ar).1 E(gument)-.1 E F0 .778 (This is another w)144 232.8 R .779(ay to specify an ar)-.1 F 3.279 (gument. If)-.18 F .779(this command is follo)3.279 F .779 (wed by one or more digits,)-.25 F 1.376 (optionally with a leading minus sign, those digits de\214ne the ar)144 244.8 R 3.876(gument. If)-.18 F 1.376(the command is fol-)3.876 F(lo)144 256.8 Q 1.17(wed by digits, e)-.25 F -.15(xe)-.15 G(cuting).15 E F1(uni) 3.67 E -.1(ve)-.1 G(rsal\255ar).1 E(gument)-.1 E F0(ag)3.67 E 1.17 (ain ends the numeric ar)-.05 F 1.17(gument, b)-.18 F 1.17(ut is other) -.2 F(-)-.2 E .899(wise ignored.)144 268.8 R .898 (As a special case, if this command is immediately follo)5.899 F .898 (wed by a character that is)-.25 F .243 (neither a digit or minus sign, the ar)144 280.8 R .243 (gument count for the ne)-.18 F .243(xt command is multiplied by four) -.15 F 5.243(.T)-.55 G(he)-5.243 E(ar)144 292.8 Q .378 (gument count is initially one, so e)-.18 F -.15(xe)-.15 G .378 (cuting this function the \214rst time mak).15 F .378(es the ar)-.1 F .378(gument count)-.18 F(four)144 304.8 Q 2.5(,as)-.4 G(econd time mak) -2.5 E(es the ar)-.1 E(gument count sixteen, and so on.)-.18 E F1 (Completing)87 321.6 Q(complete \(T)108 333.6 Q(AB\))-.9 E F0 1.137 (Attempt to perform completion on the te)144 345.6 R 1.137 (xt before point.)-.15 F F1(Bash)6.137 E F0 1.137 (attempts completion treating the)3.637 F(te)144 357.6 Q .533(xt as a v) -.15 F .533(ariable \(if the te)-.25 F .533(xt be)-.15 F .533(gins with) -.15 F F1($)3.033 E F0 .533(\), username \(if the te)B .532(xt be)-.15 F .532(gins with)-.15 F F1(~)3.032 E F0 .532(\), hostname \(if the)B(te) 144 369.6 Q .701(xt be)-.15 F .701(gins with)-.15 F F1(@)3.201 E F0 .701 (\), or command \(including aliases and functions\) in turn.)B .702 (If none of these pro-)5.701 F (duces a match, \214lename completion is attempted.)144 381.6 Q F1 (possible\255completions \(M\255?\))108 393.6 Q F0 (List the possible completions of the te)144 405.6 Q(xt before point.) -.15 E F1(insert\255completions \(M\255*\))108 417.6 Q F0 .783 (Insert all completions of the te)144 429.6 R .783 (xt before point that w)-.15 F .783(ould ha)-.1 F 1.083 -.15(ve b)-.2 H .783(een generated by).15 F F1(possible\255com-)3.282 E(pletions)144 441.6 Q F0(.)A F1(menu\255complete)108 453.6 Q F0 .928(Similar to)144 465.6 R F1(complete)3.428 E F0 3.428(,b)C .929(ut replaces the w)-3.628 F .929(ord to be completed with a single match from the list of)-.1 F 1.194(possible completions.)144 477.6 R 1.194(Repeated e)6.194 F -.15 (xe)-.15 G 1.194(cution of).15 F F1(menu\255complete)3.694 E F0 1.193 (steps through the list of possible)3.694 F .828 (completions, inserting each match in turn.)144 489.6 R .828 (At the end of the list of completions, the bell is rung)5.828 F .727 (\(subject to the setting of)144 501.6 R F1(bell\255style)3.227 E F0 3.227(\)a)C .727(nd the original te)-3.227 F .727(xt is restored.)-.15 F .727(An ar)5.727 F .727(gument of)-.18 F/F2 10/Times-Italic@0 SF(n)3.227 E F0(mo)3.227 E -.15(ve)-.15 G(s).15 E F2(n)3.227 E F0 1.73 (positions forw)144 513.6 R 1.73(ard in the list of matches; a ne)-.1 F -.05(ga)-.15 G(ti).05 E 2.03 -.15(ve a)-.25 H -.18(rg).15 G 1.73 (ument may be used to mo).18 F 2.03 -.15(ve b)-.15 H(ackw).15 E(ard)-.1 E(through the list.)144 525.6 Q(This command is intended to be bound to) 5 E F1 -.9(TA)2.5 G(B).9 E F0 2.5(,b)C(ut is unbound by def)-2.7 E (ault.)-.1 E F1(delete\255char\255or\255list)108 537.6 Q F0 .234 (Deletes the character under the cursor if not at the be)144 549.6 R .234(ginning or end of the line \(lik)-.15 F(e)-.1 E F1(delete\255char) 2.734 E F0(\).)A .425(If at the end of the line, beha)144 561.6 R -.15 (ve)-.2 G 2.925(si).15 G .425(dentically to)-2.925 F F1 (possible\255completions)2.925 E F0 5.425(.T)C .425 (his command is unbound)-5.425 F(by def)144 573.6 Q(ault.)-.1 E F1 (complete\255\214lename \(M\255/\))108 585.6 Q F0 (Attempt \214lename completion on the te)144 597.6 Q(xt before point.) -.15 E F1(possible\255\214lename\255completions \(C\255x /\))108 609.6 Q F0(List the possible completions of the te)144 621.6 Q (xt before point, treating it as a \214lename.)-.15 E F1 (complete\255user)108 633.6 Q(name \(M\255~\))-.15 E F0 (Attempt completion on the te)144 645.6 Q (xt before point, treating it as a username.)-.15 E F1(possible\255user) 108 657.6 Q(name\255completions \(C\255x ~\))-.15 E F0 (List the possible completions of the te)144 669.6 Q (xt before point, treating it as a username.)-.15 E F1(complete\255v)108 681.6 Q(ariable \(M\255$\))-.1 E F0(Attempt completion on the te)144 693.6 Q(xt before point, treating it as a shell v)-.15 E(ariable.)-.25 E F1(possible\255v)108 705.6 Q(ariable\255completions \(C\255x $\))-.1 E F0(List the possible completions of the te)144 717.6 Q (xt before point, treating it as a shell v)-.15 E(ariable.)-.25 E (GNU Bash-2.05a)72 768 Q(2001 No)126.115 E -.15(ve)-.15 G(mber 13).15 E (35)185.545 E EP %%Page: 36 36 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\)) -.35 E/F1 10/Times-Bold@0 SF(complete\255hostname \(M\255@\))108 84 Q F0 (Attempt completion on the te)144 96 Q (xt before point, treating it as a hostname.)-.15 E F1 (possible\255hostname\255completions \(C\255x @\))108 108 Q F0 (List the possible completions of the te)144 120 Q (xt before point, treating it as a hostname.)-.15 E F1 (complete\255command \(M\255!\))108 132 Q F0 .581 (Attempt completion on the te)144 144 R .581 (xt before point, treating it as a command name.)-.15 F .58 (Command comple-)5.58 F .715(tion attempts to match the te)144 156 R .715(xt ag)-.15 F .715(ainst aliases, reserv)-.05 F .715(ed w)-.15 F .715(ords, shell functions, shell b)-.1 F .715(uiltins, and)-.2 F (\214nally e)144 168 Q -.15(xe)-.15 G (cutable \214lenames, in that order).15 E(.)-.55 E F1 (possible\255command\255completions \(C\255x !\))108 180 Q F0 (List the possible completions of the te)144 192 Q (xt before point, treating it as a command name.)-.15 E F1 (dynamic\255complete\255history \(M\255T)108 204 Q(AB\))-.9 E F0 .425 (Attempt completion on the te)144 216 R .425 (xt before point, comparing the te)-.15 F .425(xt ag)-.15 F .424 (ainst lines from the history list)-.05 F (for possible completion matches.)144 228 Q F1 (complete\255into\255braces \(M\255{\))108 240 Q F0 .4(Perform \214lena\ me completion and insert the list of possible completions enclosed with\ in braces so)144 252 R(the list is a)144 264 Q -.25(va)-.2 G (ilable to the shell \(see).25 E F1(Brace Expansion)2.5 E F0(abo)2.5 E -.15(ve)-.15 G(\).).15 E F1 -.25(Ke)87 280.8 S(yboard Macr).25 E(os)-.18 E(start\255kbd\255macr)108 292.8 Q 2.5(o\()-.18 G(C\255x \()-2.5 E(\)) .833 E F0(Be)144 304.8 Q(gin sa)-.15 E (ving the characters typed into the current k)-.2 E -.15(ey)-.1 G (board macro.).15 E F1(end\255kbd\255macr)108 316.8 Q 2.5(o\()-.18 G (C\255x \))-2.5 E(\)).833 E F0(Stop sa)144 328.8 Q (ving the characters typed into the current k)-.2 E -.15(ey)-.1 G (board macro and store the de\214nition.).15 E F1 (call\255last\255kbd\255macr)108 340.8 Q 2.5(o\()-.18 G(C\255x e\))-2.5 E F0(Re-e)144 352.8 Q -.15(xe)-.15 G 1(cute the last k).15 F -.15(ey)-.1 G .999(board macro de\214ned, by making the characters in the macro app\ ear as if).15 F(typed at the k)144 364.8 Q -.15(ey)-.1 G(board.).15 E F1 (Miscellaneous)87 381.6 Q -.18(re)108 393.6 S.18 E (ead\255init\255\214le \(C\255x C\255r\))-.18 E F0 1.776 (Read in the contents of the)144 405.6 R/F2 10/Times-Italic@0 SF(inputr) 4.276 E(c)-.37 E F0 1.777(\214le, and incorporate an)4.276 F 4.277(yb) -.15 G 1.777(indings or v)-4.277 F 1.777(ariable assignments)-.25 F (found there.)144 417.6 Q F1(abort \(C\255g\))108 429.6 Q F0 3.249 (Abort the current editing command and ring the terminal')144 441.6 R 5.748(sb)-.55 G 3.248(ell \(subject to the setting of)-5.748 F F1 (bell\255style)144 453.6 Q F0(\).)A F1(do\255upper)108 465.6 Q (case\255v)-.18 E(ersion \(M\255a, M\255b, M\255)-.1 E F2(x)A F1 2.5(,.) C(..\))-2.5 E F0 1.755(If the meta\214ed character)144 477.6 R F2(x) 4.255 E F0 1.755(is lo)4.255 F 1.756 (wercase, run the command that is bound to the corresponding)-.25 F (uppercase character)144 489.6 Q(.)-.55 E F1(pr)108 501.6 Q (e\214x\255meta \(ESC\))-.18 E F0(Metafy the ne)144 513.6 Q (xt character typed.)-.15 E/F3 9/Times-Bold@0 SF(ESC)5 E F1(f)2.25 E F0 (is equi)2.5 E -.25(va)-.25 G(lent to).25 E F1(Meta\255f)2.5 E F0(.)A F1 (undo \(C\255_, C\255x C\255u\))108 525.6 Q F0 (Incremental undo, separately remembered for each line.)144 537.6 Q F1 -2.29 -.18(re v)108 549.6 T(ert\255line \(M\255r\)).08 E F0 1.095 (Undo all changes made to this line.)144 561.6 R 1.095(This is lik)6.095 F 3.595(ee)-.1 G -.15(xe)-3.745 G 1.095(cuting the).15 F F1(undo)3.595 E F0 1.095(command enough times to)3.595 F (return the line to its initial state.)144 573.6 Q F1 (tilde\255expand \(M\255&\))108 585.6 Q F0(Perform tilde e)144 597.6 Q (xpansion on the current w)-.15 E(ord.)-.1 E F1 (set\255mark \(C\255@, M\255\))108 609.6 Q F0 (Set the mark to the point.)144 621.6 Q(If a numeric ar)5 E (gument is supplied, the mark is set to that position.)-.18 E F1 (exchange\255point\255and\255mark \(C\255x C\255x\))108 633.6 Q F0(Sw) 144 645.6 Q .282(ap the point with the mark.)-.1 F .283 (The current cursor position is set to the sa)5.283 F -.15(ve)-.2 G 2.783(dp).15 G .283(osition, and the old)-2.783 F(cursor position is sa) 144 657.6 Q -.15(ve)-.2 G 2.5(da).15 G 2.5(st)-2.5 G(he mark.)-2.5 E F1 (character\255sear)108 669.6 Q(ch \(C\255]\))-.18 E F0 3.036(Ac)144 681.6 S .536(haracter is read and point is mo)-3.036 F -.15(ve)-.15 G 3.035(dt).15 G 3.035(ot)-3.035 G .535(he ne)-3.035 F .535 (xt occurrence of that character)-.15 F 5.535(.A)-.55 G(ne)-2.5 E -.05 (ga)-.15 G(ti).05 E .835 -.15(ve c)-.25 H(ount).15 E(searches for pre) 144 693.6 Q(vious occurrences.)-.25 E F1(character\255sear)108 705.6 Q (ch\255backward \(M\255C\255]\))-.18 E F0 3.543(Ac)144 717.6 S 1.043 (haracter is read and point is mo)-3.543 F -.15(ve)-.15 G 3.544(dt).15 G 3.544(ot)-3.544 G 1.044(he pre)-3.544 F 1.044 (vious occurrence of that character)-.25 F 6.044(.A)-.55 G(ne)-2.5 E -.05(ga)-.15 G(ti).05 E -.15(ve)-.25 G (count searches for subsequent occurrences.)144 729.6 Q(GNU Bash-2.05a) 72 768 Q(2001 No)126.115 E -.15(ve)-.15 G(mber 13).15 E(36)185.545 E EP %%Page: 37 37 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\)) -.35 E/F1 10/Times-Bold@0 SF(insert\255comment \(M\255#\))108 84 Q F0 .291(The v)144 96 R .291(alue of the readline)-.25 F F1 (comment\255begin)2.791 E F0 -.25(va)2.791 G .291 (riable is inserted at the be).25 F .29(ginning of the current line,) -.15 F 1.277(and the line is accepted as if a ne)144 108 R 1.277 (wline had been typed.)-.25 F 1.277(The def)6.277 F 1.277(ault v)-.1 F 1.277(alue of)-.25 F F1(comment\255begin)3.777 E F0 (causes this command to mak)144 120 Q 2.5(et)-.1 G (he current line a shell comment.)-2.5 E F1(glob\255expand\255w)108 132 Q(ord \(C\255x *\))-.1 E F0 .372(The w)144 144 R .372 (ord before point is treated as a pattern for pathname e)-.1 F .371 (xpansion, and the list of matching \214le)-.15 F (names is inserted, replacing the w)144 156 Q(ord.)-.1 E F1 (glob\255list\255expansions \(C\255x g\))108 168 Q F0 .923 (The list of e)144 180 R .923(xpansions that w)-.15 F .923(ould ha)-.1 F 1.223 -.15(ve b)-.2 H .923(een generated by).15 F F1 (glob\255expand\255w)3.423 E(ord)-.1 E F0 .923(is displayed, and)3.423 F (the line is redra)144 192 Q(wn.)-.15 E F1(dump\255functions)108 204 Q F0 .627(Print all of the functions and their k)144 216 R .927 -.15(ey b) -.1 H .626(indings to the readline output stream.).15 F .626 (If a numeric ar)5.626 F(gu-)-.18 E (ment is supplied, the output is formatted in such a w)144 228 Q (ay that it can be made part of an)-.1 E/F2 10/Times-Italic@0 SF(inputr) 2.5 E(c)-.37 E F0(\214le.)2.5 E F1(dump\255v)108 240 Q(ariables)-.1 E F0 1.799(Print all of the settable readline v)144 252 R 1.799 (ariables and their v)-.25 F 1.8(alues to the readline output stream.) -.25 F 1.8(If a)6.8 F .305(numeric ar)144 264 R .304 (gument is supplied, the output is formatted in such a w)-.18 F .304 (ay that it can be made part of an)-.1 F F2(inputr)144 276 Q(c)-.37 E F0 (\214le.)2.5 E F1(dump\255macr)108 288 Q(os)-.18 E F0 .756 (Print all of the readline k)144 300 R 1.056 -.15(ey s)-.1 H .756 (equences bound to macros and the strings the).15 F 3.256(yo)-.15 G 3.256(uput. If)-3.256 F 3.256(an)3.256 G(umeric)-3.256 E(ar)144 312 Q .528(gument is supplied, the output is formatted in such a w)-.18 F .528 (ay that it can be made part of an)-.1 F F2(inputr)3.027 E(c)-.37 E F0 (\214le.)144 324 Q F1(display\255shell\255v)108 336 Q (ersion \(C\255x C\255v\))-.1 E F0(Display v)144 348 Q (ersion information about the current instance of)-.15 E F1(bash)2.5 E F0(.)A F1(Pr)87 364.8 Q(ogrammable Completion)-.18 E F0 .146(When w)108 376.8 R .147(ord completion is attempted for an ar)-.1 F .147 (gument to a command for which a completion speci\214cation \(a)-.18 F F2(compspec)108 388.8 Q F0 3.829(\)h)C 1.329 (as been de\214ned using the)-3.829 F F1(complete)3.829 E F0 -.2(bu) 3.829 G 1.329(iltin \(see).2 F/F3 9/Times-Bold@0 SF 1.329(SHELL B)3.829 F(UIL)-.09 E 1.329(TIN COMMANDS)-.828 F F0(belo)3.579 E 1.328(w\), the) -.25 F(programmable completion f)108 400.8 Q(acilities are in)-.1 E -.2 (vo)-.4 G -.1(ke).2 G(d.).1 E .333 (First, the command name is identi\214ed.)108 417.6 R .334 (If a compspec has been de\214ned for that command, the compspec is) 5.333 F .587 (used to generate the list of possible completions for the w)108 429.6 R 3.087(ord. If)-.1 F .587(the command w)3.087 F .586 (ord is a full pathname, a)-.1 F 1.18 (compspec for the full pathname is searched for \214rst.)108 441.6 R 1.181(If no compspec is found for the full pathname, an)6.181 F (attempt is made to \214nd a compspec for the portion follo)108 453.6 Q (wing the \214nal slash.)-.25 E .817(Once a compspec has been found, it\ is used to generate the list of matching w)108 470.4 R 3.317(ords. If) -.1 F 3.317(ac)3.317 G .817(ompspec is not)-3.317 F(found, the def)108 482.4 Q(ault)-.1 E F1(bash)2.5 E F0(completion as described abo)2.5 E .3 -.15(ve u)-.15 H(nder).15 E F1(Completing)2.5 E F0(is performed.)2.5 E .463(First, the actions speci\214ed by the compspec are used.)108 499.2 R .464(Only matches which are pre\214x)5.464 F .464(ed by the w)-.15 F .464(ord being)-.1 F .596(completed are returned.)108 511.2 R .596 (When the)5.596 F F13.096 E F0(or)3.095 E F13.095 E F0 .595 (option is used for \214lename or directory name completion, the)3.095 F (shell v)108 523.2 Q(ariable)-.25 E F3(FIGNORE)2.5 E F0 (is used to \214lter the matches.)2.25 E(An)108 540 Q 2.585(yc)-.15 G .085(ompletions speci\214ed by a \214lename e)-2.585 F .085 (xpansion pattern to the)-.15 F F12.585 E F0 .085 (option are generated ne)2.585 F 2.585(xt. The)-.15 F -.1(wo)2.585 G (rds).1 E .844(generated by the pattern need not match the w)108 552 R .844(ord being completed.)-.1 F(The)5.844 E F3(GLOBIGNORE)3.343 E F0 .843(shell v)3.093 F .843(ariable is)-.25 F (not used to \214lter the matches, b)108 564 Q(ut the)-.2 E F3(FIGNORE) 2.5 E F0 -.25(va)2.25 G(riable is used.).25 E(Ne)108 580.8 Q .32 (xt, the string speci\214ed as the ar)-.15 F .32(gument to the)-.18 F F1 2.82 E F0 .321(option is considered.)2.821 F .321 (The string is \214rst split using the)5.321 F .413(characters in the) 108 592.8 R F3(IFS)2.913 E F0 .412(special v)2.663 F .412 (ariable as delimiters.)-.25 F .412(Shell quoting is honored.)5.412 F .412(Each w)5.412 F .412(ord is then e)-.1 F(xpanded)-.15 E 1.64 (using brace e)108 604.8 R 1.64(xpansion, tilde e)-.15 F 1.64 (xpansion, parameter and v)-.15 F 1.64(ariable e)-.25 F 1.64 (xpansion, command substitution, arith-)-.15 F 1.345(metic e)108 616.8 R 1.345(xpansion, and pathname e)-.15 F 1.344(xpansion, as described abo) -.15 F 1.644 -.15(ve u)-.15 H(nder).15 E F3(EXP)3.844 E(ANSION)-.666 E /F4 9/Times-Roman@0 SF(.)A F0 1.344(The results are split)5.844 F 1.265 (using the rules described abo)108 628.8 R 1.565 -.15(ve u)-.15 H(nder) .15 E F1 -.75(Wo)3.765 G 1.265(rd Splitting).75 F F0 6.265(.T)C 1.265 (he results of the e)-6.265 F 1.265(xpansion are pre\214x-matched)-.15 F (ag)108 640.8 Q(ainst the w)-.05 E (ord being completed, and the matching w)-.1 E (ords become the possible completions.)-.1 E 1.238 (After these matches ha)108 657.6 R 1.538 -.15(ve b)-.2 H 1.238 (een generated, an).15 F 3.738(ys)-.15 G 1.237 (hell function or command speci\214ed with the)-3.738 F F13.737 E F0(and)3.737 E F13.737 E F0 .513(options is in)108 669.6 R -.2(vo) -.4 G -.1(ke).2 G 3.013(d. When).1 F .513(the command or function is in) 3.013 F -.2(vo)-.4 G -.1(ke).2 G .513(d, the).1 F F3(COMP_LINE)3.013 E F0(and)2.763 E F3(COMP_POINT)3.013 E F0 -.25(va)2.763 G(ri-).25 E .873 (ables are assigned v)108 681.6 R .873(alues as described abo)-.25 F 1.173 -.15(ve u)-.15 H(nder).15 E F1 .872(Shell V)3.373 F(ariables)-.92 E F0 5.872(.I)C 3.372(fas)-5.872 G .872(hell function is being in)-3.372 F -.2(vo)-.4 G -.1(ke).2 G(d,).1 E(the)108 693.6 Q F3(COMP_W)5.26 E (ORDS)-.09 E F0(and)5.01 E F3(COMP_CW)5.26 E(ORD)-.09 E F0 -.25(va)5.01 G 2.76(riables are also set.).25 F 2.76(When the function or command is) 7.76 F(in)108 705.6 Q -.2(vo)-.4 G -.1(ke).2 G .404(d, the \214rst ar).1 F .404(gument is the name of the command whose ar)-.18 F .403 (guments are being completed, the second)-.18 F(ar)108 717.6 Q .52 (gument is the w)-.18 F .52(ord being completed, and the third ar)-.1 F .52(gument is the w)-.18 F .52(ord preceding the w)-.1 F .52 (ord being com-)-.1 F 1.648(pleted on the current command line.)108 729.6 R 1.647(No \214ltering of the generated completions ag)6.647 F 1.647(ainst the w)-.05 F 1.647(ord being)-.1 F(GNU Bash-2.05a)72 768 Q (2001 No)126.115 E -.15(ve)-.15 G(mber 13).15 E(37)185.545 E EP %%Page: 38 38 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\)) -.35 E(completed is performed; the function or command has complete fre\ edom in generating the matches.)108 84 Q(An)108 100.8 Q 2.937(yf)-.15 G .437(unction speci\214ed with)-2.937 F/F1 10/Times-Bold@0 SF2.937 E F0 .437(is in)2.937 F -.2(vo)-.4 G -.1(ke).2 G 2.937<648c>.1 G 2.937 (rst. The)-2.937 F .437(function may use an)2.937 F 2.937(yo)-.15 G 2.937(ft)-2.937 G .437(he shell f)-2.937 F .438(acilities, including)-.1 F(the)108 112.8 Q F1(compgen)2.957 E F0 -.2(bu)2.957 G .457 (iltin described belo).2 F 1.756 -.65(w, t)-.25 H 2.956(og).65 G .456 (enerate the matches.)-2.956 F .456 (It must put the possible completions in the)5.456 F/F2 9/Times-Bold@0 SF(COMPREPL)108 124.8 Q(Y)-.828 E F0(array v)2.25 E(ariable.)-.25 E(Ne) 108 141.6 Q .08(xt, an)-.15 F 2.58(yc)-.15 G .08 (ommand speci\214ed with the)-2.58 F F12.58 E F0 .081 (option is in)2.581 F -.2(vo)-.4 G -.1(ke).2 G 2.581(di).1 G 2.581(na) -2.581 G 2.581(ne)-2.581 G -.4(nv)-2.581 G .081(ironment equi).4 F -.25 (va)-.25 G .081(lent to command sub-).25 F 2.859(stitution. It)108 153.6 R .359(should print a list of completions, one per line, to the standar\ d output.)2.859 F .358(Backslash may be used)5.359 F(to escape a ne)108 165.6 Q(wline, if necessary)-.25 E(.)-.65 E .376 (After all of the possible completions are generated, an)108 182.4 R 2.877<798c>-.15 G .377(lter speci\214ed with the)-2.877 F F12.877 E F0 .377(option is applied to the)2.877 F 3.182(list. The)108 194.4 R .682(\214lter is a pattern as used for pathname e)3.182 F .681 (xpansion; a)-.15 F F1(&)3.181 E F0 .681 (in the pattern is replaced with the te)3.181 F .681(xt of)-.15 F .522 (the w)108 206.4 R .522(ord being completed.)-.1 F 3.022(Al)5.522 G (iteral)-3.022 E F1(&)3.022 E F0 .523 (may be escaped with a backslash; the backslash is remo)3.022 F -.15(ve) -.15 G 3.023(db).15 G(efore)-3.023 E .85(attempting a match.)108 218.4 R (An)5.85 E 3.35(yc)-.15 G .849 (ompletion that matches the pattern will be remo)-3.35 F -.15(ve)-.15 G 3.349(df).15 G .849(rom the list.)-3.349 F 3.349(Al)5.849 G(eading) -3.349 E F1(!)3.349 E F0(ne)108 230.4 Q -.05(ga)-.15 G (tes the pattern; in this case an).05 E 2.5(yc)-.15 G (ompletion not matching the pattern will be remo)-2.5 E -.15(ve)-.15 G (d.).15 E(Finally)108 247.2 Q 3.086(,a)-.65 G .886 -.15(ny p)-3.086 H .586(re\214x and suf).15 F .587(\214x speci\214ed with the)-.25 F F1 3.087 E F0(and)3.087 E F13.087 E F0 .587 (options are added to each member of the com-)3.087 F(pletion list, and\ the result is returned to the readline completion code as the list of \ possible completions.)108 259.2 Q .247(If the pre)108 276 R .247 (viously-applied actions do not generate an)-.25 F 2.747(ym)-.15 G .247 (atches, and the)-2.747 F F1 .247(\255o dir)2.747 F(names)-.15 E F0 .247 (option w)2.747 F .246(as supplied to)-.1 F F1(complete)108 288 Q F0 (when the compspec w)2.5 E (as de\214ned, directory name completion is attempted.)-.1 E .559 (By def)108 304.8 R .559(ault, if a compspec is found, whate)-.1 F -.15 (ve)-.25 G 3.059(ri).15 G 3.059(tg)-3.059 G .56 (enerates is returned to the completion code as the full set)-3.059 F .632(of possible completions.)108 316.8 R .632(The def)5.632 F(ault)-.1 E F1(bash)3.132 E F0 .631 (completions are not attempted, and the readline def)3.131 F .631 (ault of \214le-)-.1 F .8(name completion is disabled.)108 328.8 R .8 (If the)5.8 F F1 .801(-o default)3.3 F F0 .801(option w)3.301 F .801 (as supplied to)-.1 F F1(complete)3.301 E F0 .801(when the compspec w) 3.301 F(as)-.1 E(de\214ned, readline')108 340.8 Q 2.5(sd)-.55 G(ef)-2.5 E(ault completion will be performed if the compspec generates no matche\ s.)-.1 E/F3 10.95/Times-Bold@0 SF(HIST)72 357.6 Q(OR)-.197 E(Y)-.383 E F0 .372(When the)108 369.6 R F1 .372(\255o history)2.872 F F0 .372 (option to the)2.872 F F1(set)2.872 E F0 -.2(bu)2.872 G .372 (iltin is enabled, the shell pro).2 F .371(vides access to the)-.15 F/F4 10/Times-Italic@0 SF .371(command history)2.871 F F0(,)A .031 (the list of commands pre)108 381.6 R .031(viously typed.)-.25 F .031 (The v)5.031 F .031(alue of the)-.25 F F1(HISTSIZE)2.531 E F0 -.25(va) 2.531 G .031(riable is used as the number of com-).25 F .43(mands to sa) 108 393.6 R .73 -.15(ve i)-.2 H 2.93(nah).15 G .43(istory list.)-2.93 F .43(The te)5.43 F .429(xt of the last)-.15 F F2(HISTSIZE)2.929 E F0 .429 (commands \(def)2.679 F .429(ault 500\) is sa)-.1 F -.15(ve)-.2 G 2.929 (d. The).15 F(shell)2.929 E .287 (stores each command in the history list prior to parameter and v)108 405.6 R .287(ariable e)-.25 F .287(xpansion \(see)-.15 F F2(EXP)2.787 E (ANSION)-.666 E F0(abo)2.537 E -.15(ve)-.15 G(\)).15 E -.2(bu)108 417.6 S 4.066(ta).2 G 1.565(fter history e)-4.066 F 1.565 (xpansion is performed, subject to the v)-.15 F 1.565 (alues of the shell v)-.25 F(ariables)-.25 E F2(HISTIGNORE)4.065 E F0 (and)3.815 E F2(HISTCONTR)108 429.6 Q(OL)-.27 E/F5 9/Times-Roman@0 SF(.) A F0 .082 (On startup, the history is initialized from the \214le named by the v) 108 446.4 R(ariable)-.25 E F2(HISTFILE)2.583 E F0(\(def)2.333 E(ault)-.1 E F4(~/.bash_history)2.583 E F0(\).)A .315(The \214le named by the v)108 458.4 R .315(alue of)-.25 F F2(HISTFILE)2.815 E F0 .315 (is truncated, if necessary)2.565 F 2.815(,t)-.65 G 2.815(oc)-2.815 G .315(ontain no more than the number of)-2.815 F .952 (lines speci\214ed by the v)108 470.4 R .953(alue of)-.25 F F2 (HISTFILESIZE)3.453 E F5(.)A F0 .953(When an interacti)5.453 F 1.253 -.15(ve s)-.25 H .953(hell e).15 F .953(xits, the last)-.15 F F2 ($HISTSIZE)3.453 E F0(lines)3.203 E .65 (are copied from the history list to)108 482.4 R F2($HISTFILE)3.15 E F5 (.)A F0 .65(If the)5.15 F F1(histappend)3.15 E F0 .649 (shell option is enabled \(see the descrip-)3.15 F .141(tion of)108 494.4 R F1(shopt)2.641 E F0(under)2.641 E F2 .141(SHELL B)2.641 F(UIL) -.09 E .141(TIN COMMANDS)-.828 F F0(belo)2.391 E .141 (w\), the lines are appended to the history \214le, other)-.25 F(-)-.2 E .573(wise the history \214le is o)108 506.4 R -.15(ve)-.15 G 3.073 (rwritten. If).15 F F2(HISTFILE)3.073 E F0 .573 (is unset, or if the history \214le is unwritable, the history is)2.823 F 1.141(not sa)108 518.4 R -.15(ve)-.2 G 3.641(d. After).15 F(sa)3.641 E 1.141(ving the history)-.2 F 3.641(,t)-.65 G 1.142 (he history \214le is truncated to contain no more than)-3.641 F F2 (HISTFILESIZE)3.642 E F0 2.5(lines. If)108 530.4 R F2(HISTFILESIZE)2.5 E F0(is not set, no truncation is performed.)2.25 E 1.294(The b)108 547.2 R 1.294(uiltin command)-.2 F F1(fc)3.794 E F0(\(see)3.794 E F2 1.293 (SHELL B)3.794 F(UIL)-.09 E 1.293(TIN COMMANDS)-.828 F F0(belo)3.543 E 1.293(w\) may be used to list or edit and re-)-.25 F -.15(exe)108 559.2 S .673(cute a portion of the history list.).15 F(The)5.673 E F1(history) 3.173 E F0 -.2(bu)3.173 G .673 (iltin may be used to display or modify the history list).2 F .28 (and manipulate the history \214le.)108 571.2 R .279 (When using command-line editing, search commands are a)5.279 F -.25(va) -.2 G .279(ilable in each).25 F(editing mode that pro)108 583.2 Q (vide access to the history list.)-.15 E 1.485(The shell allo)108 600 R 1.485(ws control o)-.25 F -.15(ve)-.15 G 3.986(rw).15 G 1.486 (hich commands are sa)-3.986 F -.15(ve)-.2 G 3.986(do).15 G 3.986(nt) -3.986 G 1.486(he history list.)-3.986 F(The)6.486 E F2(HISTCONTR)3.986 E(OL)-.27 E F0(and)3.736 E F2(HISTIGNORE)108 612 Q F0 -.25(va)2.708 G .458(riables may be set to cause the shell to sa).25 F .757 -.15(ve o) -.2 H .457(nly a subset of the commands entered.).15 F(The)5.457 E F1 (cmdhist)108 624 Q F0 .75 (shell option, if enabled, causes the shell to attempt to sa)3.25 F 1.05 -.15(ve e)-.2 H .75(ach line of a multi-line command in).15 F 1.077 (the same history entry)108 636 R 3.577(,a)-.65 G 1.077 (dding semicolons where necessary to preserv)-3.577 F 3.577(es)-.15 G 1.077(yntactic correctness.)-3.577 F(The)6.077 E F1(lithist)3.576 E F0 .373(shell option causes the shell to sa)108 648 R .674 -.15(ve t)-.2 H .374(he command with embedded ne).15 F .374 (wlines instead of semicolons.)-.25 F .374(See the)5.374 F .319 (description of the)108 660 R F1(shopt)2.819 E F0 -.2(bu)2.819 G .318 (iltin belo).2 F 2.818(wu)-.25 G(nder)-2.818 E F2 .318(SHELL B)2.818 F (UIL)-.09 E .318(TIN COMMANDS)-.828 F F0 .318 (for information on setting and)2.568 F(unsetting shell options.)108 672 Q F3(HIST)72 688.8 Q(OR)-.197 E 2.738(YE)-.383 G(XP)-2.738 E(ANSION)-.81 E F0 .61(The shell supports a history e)108 700.8 R .611 (xpansion feature that is similar to the history e)-.15 F .611 (xpansion in)-.15 F F1(csh.)3.111 E F0 .611(This section)5.611 F .871 (describes what syntax features are a)108 712.8 R -.25(va)-.2 G 3.371 (ilable. This).25 F .871(feature is enabled by def)3.371 F .87 (ault for interacti)-.1 F 1.17 -.15(ve s)-.25 H .87(hells, and).15 F 2.013(can be disabled using the)108 724.8 R F1(+H)4.514 E F0 2.014 (option to the)4.514 F F1(set)4.514 E F0 -.2(bu)4.514 G 2.014 (iltin command \(see).2 F F2 2.014(SHELL B)4.514 F(UIL)-.09 E 2.014 (TIN COMMANDS)-.828 F F0(GNU Bash-2.05a)72 768 Q(2001 No)126.115 E -.15 (ve)-.15 G(mber 13).15 E(38)185.545 E EP %%Page: 39 39 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\)) -.35 E(belo)108 84 Q 2.5(w\). Non-interacti)-.25 F .3 -.15(ve s)-.25 H (hells do not perform history e).15 E(xpansion by def)-.15 E(ault.)-.1 E 1.306(History e)108 100.8 R 1.306(xpansions introduce w)-.15 F 1.306(or\ ds from the history list into the input stream, making it easy to repea\ t)-.1 F .209(commands, insert the ar)108 112.8 R .209(guments to a pre) -.18 F .21 (vious command into the current input line, or \214x errors in pre)-.25 F(vious)-.25 E(commands quickly)108 124.8 Q(.)-.65 E 1.164(History e)108 141.6 R 1.163(xpansion is performed immediately after a complete line i\ s read, before the shell breaks it into)-.15 F -.1(wo)108 153.6 S 3.2 (rds. It).1 F(tak)3.2 E .7(es place in tw)-.1 F 3.2(op)-.1 G 3.2 (arts. The)-3.2 F .7 (\214rst is to determine which line from the history list to use during) 3.2 F 4.368(substitution. The)108 165.6 R 1.868(second is to select por\ tions of that line for inclusion into the current one.)4.368 F 1.867 (The line)6.867 F .662(selected from the history is the)108 177.6 R/F1 10/Times-Italic@0 SF -.15(ev)3.162 G(ent).15 E F0 3.162(,a)C .663 (nd the portions of that line that are acted upon are)-3.162 F F1(wor) 3.163 E(ds)-.37 E F0 5.663(.V)C(arious)-6.773 E F1(modi\214er)108 189.6 Q(s)-.1 E F0 .227(are a)2.727 F -.25(va)-.2 G .227 (ilable to manipulate the selected w).25 F 2.727(ords. The)-.1 F .226 (line is brok)2.726 F .226(en into w)-.1 F .226(ords in the same f)-.1 F (ashion)-.1 E .351(as when reading input, so that se)108 201.6 R -.15 (ve)-.25 G(ral).15 E F1(metac)2.852 E(har)-.15 E(acter)-.15 E F0 .352 (-separated w)B .352(ords surrounded by quotes are considered)-.1 F .625 (one w)108 213.6 R 3.125(ord. History)-.1 F -.15(ex)3.125 G .624 (pansions are introduced by the appearance of the history e).15 F .624 (xpansion character)-.15 F 3.124(,w)-.4 G(hich)-3.124 E(is)108 225.6 Q /F2 10/Times-Bold@0 SF(!)3.333 E F0(by def)3.333 E 2.5(ault. Only)-.1 F (backslash \()2.5 E F2(\\).833 E F0 2.5(\)a).833 G (nd single quotes can quote the history e)-2.5 E(xpansion character)-.15 E(.)-.55 E(Se)108 242.4 Q -.15(ve)-.25 G .109 (ral shell options settable with the).15 F F2(shopt)2.609 E F0 -.2(bu) 2.609 G .11(iltin may be used to tailor the beha).2 F .11 (vior of history e)-.2 F(xpansion.)-.15 E 1.259(If the)108 254.4 R F2 (histv)3.759 E(erify)-.1 E F0 1.259 (shell option is enabled \(see the description of the)3.759 F F2(shopt) 3.759 E F0 -.2(bu)3.759 G 1.259(iltin\), and).2 F F2 -.18(re)3.758 G (adline).18 E F0 1.258(is being)3.758 F 1.497(used, history substitutio\ ns are not immediately passed to the shell parser)108 266.4 R 6.498(.I) -.55 G 1.498(nstead, the e)-6.498 F 1.498(xpanded line is)-.15 F 2.228 (reloaded into the)108 278.4 R F2 -.18(re)4.728 G(adline).18 E F0 2.228 (editing b)4.728 F(uf)-.2 E 2.228(fer for further modi\214cation.)-.25 F (If)7.228 E F2 -.18(re)4.728 G(adline).18 E F0 2.228 (is being used, and the)4.728 F F2(histr)108 290.4 Q(eedit)-.18 E F0 1.202(shell option is enabled, a f)3.702 F 1.202 (ailed history substitution will be reloaded into the)-.1 F F2 -.18(re) 3.702 G(adline).18 E F0(editing)3.702 E -.2(bu)108 302.4 S -.25(ff).2 G 1.161(er for correction.).25 F(The)6.161 E F23.661 E F0 1.161 (option to the)3.661 F F2(history)3.661 E F0 -.2(bu)3.661 G 1.16 (iltin command may be used to see what a history).2 F -.15(ex)108 314.4 S .055(pansion will do before using it.).15 F(The)5.055 E F22.555 E F0 .055(option to the)2.555 F F2(history)2.556 E F0 -.2(bu)2.556 G .056(iltin may be used to add commands to the).2 F (end of the history list without actually e)108 326.4 Q -.15(xe)-.15 G (cuting them, so that the).15 E 2.5(ya)-.15 G(re a)-2.5 E -.25(va)-.2 G (ilable for subsequent recall.).25 E 2.2(The shell allo)108 343.2 R 2.2 (ws control of the v)-.25 F 2.2(arious characters used by the history e) -.25 F 2.2(xpansion mechanism \(see the)-.15 F(description of)108 355.2 Q F2(histchars)2.5 E F0(abo)2.5 E .3 -.15(ve u)-.15 H(nder).15 E F2 (Shell V)2.5 E(ariables)-.92 E F0(\).)A F2(Ev)87 372 Q(ent Designators) -.1 E F0(An e)108 384 Q -.15(ve)-.25 G(nt designator is a reference to \ a command line entry in the history list.).15 E F2(!)108 400.8 Q F0 (Start a history substitution, e)32.67 E(xcept when follo)-.15 E (wed by a)-.25 E F2(blank)2.5 E F0 2.5(,n)C -.25(ew)-2.5 G (line, = or \(.).25 E F2(!)108 412.8 Q F1(n)A F0(Refer to command line) 27.67 E F1(n)2.5 E F0(.).24 E F2<21ad>108 424.8 Q F1(n)A F0 (Refer to the current command line minus)21.97 E F1(n)2.5 E F0(.).24 E F2(!!)108 436.8 Q F0(Refer to the pre)29.34 E(vious command.)-.25 E (This is a synon)5 E(ym for `!\2551'.)-.15 E F2(!)108 448.8 Q F1(string) A F0(Refer to the most recent command starting with)9.33 E F1(string)2.5 E F0(.).22 E F2(!?)108 460.8 Q F1(string)A F2([?])A F0 1.057 (Refer to the most recent command containing)144 472.8 R F1(string)3.557 E F0 6.057(.T).22 G 1.057(he trailing)-6.057 F F2(?)3.557 E F0 1.057 (may be omitted if)3.557 F F1(string)3.557 E F0(is)3.557 E(follo)144 484.8 Q(wed immediately by a ne)-.25 E(wline.)-.25 E/F3 12/Times-Bold@0 SF(^)108 501.8 Q F1(string1)-5 I F3(^)5 I F1(string2)-5 I F3(^)5 I F0 2.66(Quick substitution.)144 508.8 R 2.66 (Repeat the last command, replacing)7.66 F F1(string1)5.16 E F0(with) 5.16 E F1(string2)5.16 E F0 7.66(.E).02 G(qui)-7.66 E -.25(va)-.25 G 2.66(lent to).25 F -.74(``)144 520.8 S(!!:s/).74 E F1(string1)A F0(/)A F1(string2)A F0(/')A 2.5('\()-.74 G(see)-2.5 E F2(Modi\214ers)2.5 E F0 (belo)2.5 E(w\).)-.25 E F2(!#)108 532.8 Q F0 (The entire command line typed so f)27.67 E(ar)-.1 E(.)-.55 E F2 -.75 (Wo)87 549.6 S(rd Designators).75 E F0 -.8(Wo)108 561.6 S 1.313 (rd designators are used to select desired w).8 F 1.314(ords from the e) -.1 F -.15(ve)-.25 G 3.814(nt. A).15 F F2(:)3.814 E F0 1.314 (separates the e)3.814 F -.15(ve)-.25 G 1.314(nt speci\214cation).15 F .53(from the w)108 573.6 R .529(ord designator)-.1 F 5.529(.I)-.55 G 3.029(tm)-5.529 G .529(ay be omitted if the w)-3.029 F .529 (ord designator be)-.1 F .529(gins with a)-.15 F F2(^)3.029 E F0(,)A F2 ($)3.029 E F0(,)A F2(*)3.029 E F0(,)A F23.029 E F0 3.029(,o)C(r) -3.029 E F2(%)3.029 E F0 5.529(.W)C(ords)-6.329 E 1.3 (are numbered from the be)108 585.6 R 1.3 (ginning of the line, with the \214rst w)-.15 F 1.301 (ord being denoted by 0 \(zero\).)-.1 F -.8(Wo)6.301 G 1.301(rds are).8 F(inserted into the current line separated by single spaces.)108 597.6 Q F2 2.5(0\()108 614.4 S(zer)-2.5 E(o\))-.18 E F0(The zeroth w)144 626.4 Q 2.5(ord. F)-.1 F(or the shell, this is the command w)-.15 E(ord.)-.1 E F1(n)108 638.4 Q F0(The)31 E F1(n)2.5 E F0(th w)A(ord.)-.1 E F2(^)108 650.4 Q F0(The \214rst ar)32.67 E 2.5(gument. That)-.18 F(is, w)2.5 E (ord 1.)-.1 E F2($)108 662.4 Q F0(The last ar)31 E(gument.)-.18 E F2(%) 108 674.4 Q F0(The w)26 E(ord matched by the most recent `?)-.1 E F1 (string)A F0(?' search.)A F1(x)108 686.4 Q F2A F1(y)A F0 2.5(Ar) 21.42 G(ange of w)-2.5 E(ords; `\255)-.1 E F1(y)A F0 2.5('a)C(bbre)-2.5 E(viates `0\255)-.25 E F1(y)A F0('.)A F2(*)108 698.4 Q F0 .316 (All of the w)31 F .316(ords b)-.1 F .316(ut the zeroth.)-.2 F .315 (This is a synon)5.315 F .315(ym for `)-.15 F F1(1\255$)A F0 2.815 ('. It)B .315(is not an error to use)2.815 F F2(*)2.815 E F0 .315 (if there is)2.815 F(just one w)144 710.4 Q(ord in the e)-.1 E -.15(ve) -.25 G(nt; the empty string is returned in that case.).15 E (GNU Bash-2.05a)72 768 Q(2001 No)126.115 E -.15(ve)-.15 G(mber 13).15 E (39)185.545 E EP %%Page: 40 40 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\)) -.35 E/F1 10/Times-Bold@0 SF(x*)108 84 Q F0(Abbre)26 E(viates)-.25 E/F2 10/Times-Italic@0 SF(x\255$)2.5 E F0(.)A F1<78ad>108 96 Q F0(Abbre)25.3 E(viates)-.25 E F2(x\255$)2.5 E F0(lik)2.5 E(e)-.1 E F1(x*)2.5 E F0 2.5 (,b)C(ut omits the last w)-2.7 E(ord.)-.1 E(If a w)108 112.8 Q (ord designator is supplied without an e)-.1 E -.15(ve)-.25 G (nt speci\214cation, the pre).15 E(vious command is used as the e)-.25 E -.15(ve)-.25 G(nt.).15 E F1(Modi\214ers)87 129.6 Q F0 .183 (After the optional w)108 141.6 R .183(ord designator)-.1 F 2.683(,t)-.4 G .184(here may appear a sequence of one or more of the follo)-2.683 F .184(wing modi\214ers,)-.25 F(each preceded by a `:'.)108 153.6 Q F1(h) 108 170.4 Q F0(Remo)30.44 E .3 -.15(ve a t)-.15 H (railing \214le name component, lea).15 E(ving only the head.)-.2 E F1 (t)108 182.4 Q F0(Remo)32.67 E .3 -.15(ve a)-.15 H (ll leading \214le name components, lea).15 E(ving the tail.)-.2 E F1(r) 108 194.4 Q F0(Remo)31.56 E .3 -.15(ve a t)-.15 H(railing suf).15 E (\214x of the form)-.25 E F2(.xxx)2.5 E F0 2.5(,l)C(ea)-2.5 E (ving the basename.)-.2 E F1(e)108 206.4 Q F0(Remo)31.56 E .3 -.15(ve a) -.15 H(ll b).15 E(ut the trailing suf)-.2 E(\214x.)-.25 E F1(p)108 218.4 Q F0(Print the ne)30.44 E 2.5(wc)-.25 G(ommand b)-2.5 E(ut do not e)-.2 E -.15(xe)-.15 G(cute it.).15 E F1(q)108 230.4 Q F0 (Quote the substituted w)30.44 E(ords, escaping further substitutions.) -.1 E F1(x)108 242.4 Q F0(Quote the substituted w)31 E(ords as with)-.1 E F1(q)2.5 E F0 2.5(,b)C(ut break into w)-2.7 E(ords at)-.1 E F1(blanks) 2.5 E F0(and ne)2.5 E(wlines.)-.25 E F1(s/)108 254.4 Q F2(old)A F1(/)A F2(ne)A(w)-.15 E F1(/)A F0(Substitute)144 266.4 Q F2(ne)2.814 E(w)-.15 E F0 .314(for the \214rst occurrence of)2.814 F F2(old)2.814 E F0 .314 (in the e)2.814 F -.15(ve)-.25 G .314(nt line.).15 F(An)5.314 E 2.814 (yd)-.15 G .314(elimiter can be used in place)-2.814 F .616(of /.)144 278.4 R .617 (The \214nal delimiter is optional if it is the last character of the e) 5.616 F -.15(ve)-.25 G .617(nt line.).15 F .617(The delimiter may)5.617 F .75(be quoted in)144 290.4 R F2(old)3.25 E F0(and)3.25 E F2(ne)3.25 E (w)-.15 E F0 .75(with a single backslash.)3.25 F .749(If & appears in) 5.75 F F2(ne)3.249 E(w)-.15 E F0 3.249(,i).31 G 3.249(ti)-3.249 G 3.249 (sr)-3.249 G .749(eplaced by)-3.249 F F2(old)3.249 E F0 5.749(.A).77 G .369(single backslash will quote the &.)144 302.4 R(If)5.369 E F2(old) 2.869 E F0 .37(is null, it is set to the last)2.869 F F2(old)2.87 E F0 .37(substituted, or)2.87 F 2.87(,i)-.4 G 2.87(fn)-2.87 G 2.87(op)-2.87 G (re)-2.87 E(vi-)-.25 E(ous history substitutions took place, the last) 144 314.4 Q F2(string)2.5 E F0(in a)2.5 E F1(!?)2.5 E F2(string)A F1 ([?])A F0(search.)5 E F1(&)108 326.4 Q F0(Repeat the pre)27.67 E (vious substitution.)-.25 E F1(g)108 338.4 Q F0 .398 (Cause changes to be applied o)31 F -.15(ve)-.15 G 2.898(rt).15 G .398 (he entire e)-2.898 F -.15(ve)-.25 G .398(nt line.).15 F .397 (This is used in conjunction with `)5.398 F F1(:s)A F0 2.897('\()C (e.g.,)-2.897 E(`)144 350.4 Q F1(:gs/)A F2(old)A F1(/)A F2(ne)A(w)-.15 E F1(/)A F0 1.218('\) or `)B F1(:&)A F0 3.718('. If)B 1.218(used with `) 3.718 F F1(:s)A F0 1.218(', an)B 3.718(yd)-.15 G 1.219 (elimiter can be used in place of /, and the \214nal)-3.718 F (delimiter is optional if it is the last character of the e)144 362.4 Q -.15(ve)-.25 G(nt line.).15 E/F3 10.95/Times-Bold@0 SF(SHELL B)72 379.2 Q(UIL)-.11 E(TIN COMMANDS)-1.007 E F0 .063 (Unless otherwise noted, each b)108 391.2 R .062(uiltin command documen\ ted in this section as accepting options preceded by)-.2 F F1108 403.2 Q F0(accepts)2.5 E F12.5 E F0 (to signify the end of the options.)2.5 E F1(:)108 421.2 Q F0([)2.5 E F2 (ar)A(guments)-.37 E F0(])A .501(No ef)144 433.2 R .501 (fect; the command does nothing be)-.25 F .502(yond e)-.15 F(xpanding) -.15 E F2(ar)3.002 E(guments)-.37 E F0 .502(and performing an)3.002 F 3.002(ys)-.15 G(peci\214ed)-3.002 E 2.5(redirections. A)144 445.2 R (zero e)2.5 E(xit code is returned.)-.15 E F1(.)110.5 462 Q F2 (\214lename)6.666 E F0([)2.5 E F2(ar)A(guments)-.37 E F0(])A F1(sour)108 474 Q(ce)-.18 E F2(\214lename)2.5 E F0([)2.5 E F2(ar)A(guments)-.37 E F0 (])A 1.17(Read and e)144 486 R -.15(xe)-.15 G 1.17(cute commands from) .15 F F2(\214lename)3.669 E F0 1.169(in the current shell en)3.669 F 1.169(vironment and return the e)-.4 F(xit)-.15 E 1.819 (status of the last command e)144 498 R -.15(xe)-.15 G 1.819(cuted from) .15 F F2(\214lename)4.319 E F0 6.819(.I).18 G(f)-6.819 E F2(\214lename) 4.319 E F0 1.82(does not contain a slash, \214le)4.319 F .608(names in) 144 510 R/F4 9/Times-Bold@0 SF -.666(PA)3.108 G(TH)-.189 E F0 .608 (are used to \214nd the directory containing)2.858 F F2(\214lename)3.108 E F0 5.608(.T).18 G .608(he \214le searched for in)-5.608 F F4 -.666(PA) 3.108 G(TH)-.189 E F0 .832(need not be e)144 522 R -.15(xe)-.15 G 3.332 (cutable. When).15 F F1(bash)3.332 E F0 .832(is not in)3.332 F F2 .832 (posix mode)3.332 F F0 3.332(,t)C .833 (he current directory is searched if no)-3.332 F .982 (\214le is found in)144 534 R F4 -.666(PA)3.481 G(TH)-.189 E/F5 9 /Times-Roman@0 SF(.)A F0 .981(If the)5.481 F F1(sour)3.481 E(cepath)-.18 E F0 .981(option to the)3.481 F F1(shopt)3.481 E F0 -.2(bu)3.481 G .981 (iltin command is turned of).2 F .981(f, the)-.25 F F4 -.666(PA)144 546 S(TH)-.189 E F0 .112(is not searched.)2.362 F .112(If an)5.112 F(y)-.15 E F2(ar)2.612 E(guments)-.37 E F0 .112(are supplied, the)2.612 F 2.612 (yb)-.15 G .112(ecome the positional parameters when)-2.612 F F2 (\214lename)144 558 Q F0 .342(is e)2.842 F -.15(xe)-.15 G 2.842 (cuted. Otherwise).15 F .342(the positional parameters are unchanged.) 2.842 F .341(The return status is the)5.341 F .716 (status of the last command e)144 570 R .716 (xited within the script \(0 if no commands are e)-.15 F -.15(xe)-.15 G .716(cuted\), and f).15 F .716(alse if)-.1 F F2(\214lename)144 582 Q F0 (is not found or cannot be read.)2.5 E F1(alias)108 598.8 Q F0([)2.5 E F1A F0 2.5(][)C F2(name)-2.5 E F0([=)A F2(value)A F0 2.5(].)C(..]) -2.5 E F1(Alias)144 610.8 Q F0 2.725(with no ar)5.225 F 2.724 (guments or with the)-.18 F F15.224 E F0 2.724 (option prints the list of aliases in the form)5.224 F F1(alias)5.224 E F2(name)144 622.8 Q F0(=)A F2(value)A F0 .58(on standard output.)3.08 F .58(When ar)5.58 F .58 (guments are supplied, an alias is de\214ned for each)-.18 F F2(name) 3.08 E F0(whose)144 634.8 Q F2(value)2.895 E F0 .395(is gi)2.895 F -.15 (ve)-.25 G 2.895(n. A).15 F .395(trailing space in)2.895 F F2(value) 5.395 E F0 .395(causes the ne)2.895 F .395(xt w)-.15 F .395 (ord to be check)-.1 F .395(ed for alias sub-)-.1 F .054 (stitution when the alias is e)144 646.8 R 2.554(xpanded. F)-.15 F .054 (or each)-.15 F F2(name)2.554 E F0 .054(in the ar)2.554 F .054 (gument list for which no)-.18 F F2(value)2.554 E F0 .054(is sup-)2.554 F 1.314(plied, the name and v)144 658.8 R 1.314 (alue of the alias is printed.)-.25 F F1(Alias)6.314 E F0 1.314 (returns true unless a)3.814 F F2(name)3.814 E F0 1.313(is gi)3.814 F -.15(ve)-.25 G 3.813(nf).15 G(or)-3.813 E (which no alias has been de\214ned.)144 670.8 Q F1(bg)108 687.6 Q F0([) 2.5 E F2(jobspec)A F0(])A .356(Resume the suspended job)144 699.6 R F2 (jobspec)2.856 E F0 .357 (in the background, as if it had been started with)2.856 F F1(&)2.857 E F0 5.357(.I)C(f)-5.357 E F2(jobspec)2.857 E F0 .587 (is not present, the shell')144 711.6 R 3.087(sn)-.55 G .587 (otion of the)-3.087 F F2(curr)3.087 E .587(ent job)-.37 F F0 .587 (is used.)3.087 F F1(bg)5.587 E F2(jobspec)3.086 E F0 .586 (returns 0 unless run when)3.086 F .663(job control is disabled or)144 723.6 R 3.163(,w)-.4 G .663(hen run with job control enabled, if)-3.163 F F2(jobspec)3.163 E F0 -.1(wa)3.163 G 3.163(sn).1 G .663 (ot found or started)-3.163 F(GNU Bash-2.05a)72 768 Q(2001 No)126.115 E -.15(ve)-.15 G(mber 13).15 E(40)185.545 E EP %%Page: 41 41 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\)) -.35 E(without job control.)144 84 Q/F1 10/Times-Bold@0 SF(bind)108 100.8 Q F0([)2.5 E F1A/F2 10/Times-Italic@0 SF -.1(ke)2.5 G(ymap) -.2 E F0 2.5(][)C F1(\255lpsvPSV)-2.5 E F0(])A F1(bind)108 112.8 Q F0([) 2.5 E F1A F2 -.1(ke)2.5 G(ymap)-.2 E F0 2.5(][)C F1-2.5 E F2 (function)2.5 E F0 2.5(][)C F1-2.5 E F2(function)2.5 E F0 2.5(][)C F1-2.5 E F2 -.1(ke)2.5 G(yseq)-.2 E F0(])A F1(bind)108 124.8 Q F0 ([)2.5 E F1A F2 -.1(ke)2.5 G(ymap)-.2 E F0(])A F12.5 E F2 (\214lename)2.5 E F1(bind)108 136.8 Q F0([)2.5 E F1A F2 -.1(ke)2.5 G(ymap)-.2 E F0(])A F12.5 E F2 -.1(ke)2.5 G(yseq)-.2 E F0(:)A F2 (shell\255command)A F1(bind)108 148.8 Q F0([)2.5 E F1A F2 -.1(ke) 2.5 G(ymap)-.2 E F0(])A F2 -.1(ke)2.5 G(yseq)-.2 E F0(:)A F2 (function\255name)A F0 .239(Display current)144 160.8 R F1 -.18(re)2.739 G(adline).18 E F0 -.1(ke)2.739 G 2.739(ya)-.05 G .239 (nd function bindings, or bind a k)-2.739 F .538 -.15(ey s)-.1 H .238 (equence to a).15 F F1 -.18(re)2.738 G(adline).18 E F0(function)2.738 E .88(or macro.)144 172.8 R .88 (The binding syntax accepted is identical to that of)5.88 F F2(.inputr) 3.38 E(c)-.37 E F0 3.38(,b).31 G .88(ut each binding must be)-3.58 F 1.334(passed as a separate ar)144 184.8 R 1.334 (gument; e.g., '"\\C\255x\\C\255r": re\255read\255init\255\214le'.)-.18 F 1.333(Options, if supplied, ha)6.333 F -.15(ve)-.2 G(the follo)144 196.8 Q(wing meanings:)-.25 E F1144 208.8 Q F2 -.1(ke)2.5 G(ymap) -.2 E F0(Use)180 220.8 Q F2 -.1(ke)5.174 G(ymap)-.2 E F0 2.674(as the k) 5.174 F -.15(ey)-.1 G 2.674(map to be af).15 F 2.674 (fected by the subsequent bindings.)-.25 F(Acceptable)7.675 E F2 -.1(ke) 180 232.8 S(ymap)-.2 E F0 3.217(names are)5.717 F F2 3.216 (emacs, emacs\255standar)5.716 F 3.216 (d, emacs\255meta, emacs\255ctlx, vi, vi\255mo)-.37 F(ve)-.1 E(,)-.1 E (vi\255command)180 244.8 Q F0 4.429(,a)C(nd)-4.429 E F2(vi\255insert) 4.429 E F0(.).68 E F2(vi)6.929 E F0 1.929(is equi)4.429 F -.25(va)-.25 G 1.929(lent to).25 F F2(vi\255command)4.429 E F0(;)A F2(emacs)4.429 E F0 1.929(is equi)4.429 F -.25(va)-.25 G 1.93(lent to).25 F F2 (emacs\255standar)180 256.8 Q(d)-.37 E F0(.)A F1144 268.8 Q F0 (List the names of all)27.52 E F1 -.18(re)2.5 G(adline).18 E F0 (functions.)2.5 E F1144 280.8 Q F0(Display)24.74 E F1 -.18(re)2.5 G(adline).18 E F0(function names and bindings in such a w)2.5 E (ay that the)-.1 E 2.5(yc)-.15 G(an be re-read.)-2.5 E F1144 292.8 Q F0(List current)24.19 E F1 -.18(re)2.5 G(adline).18 E F0 (function names and bindings.)2.5 E F1144 304.8 Q F0(Display)25.3 E F1 -.18(re)2.5 G(adline).18 E F0 -.25(va)2.5 G(riable names and v).25 E(alues in such a w)-.25 E(ay that the)-.1 E 2.5(yc)-.15 G (an be re-read.)-2.5 E F1144 316.8 Q F0(List current)23.08 E F1 -.18(re)2.5 G(adline).18 E F0 -.25(va)2.5 G(riable names and v).25 E (alues.)-.25 E F1144 328.8 Q F0(Display)26.41 E F1 -.18(re)3.655 G (adline).18 E F0 -.1(ke)3.655 G 3.655(ys)-.05 G 1.155 (equences bound to macros and the strings the)-3.655 F 3.655(yo)-.15 G 1.155(utput in such a)-3.655 F -.1(wa)180 340.8 S 2.5(yt).1 G(hat the) -2.5 E 2.5(yc)-.15 G(an be re-read.)-2.5 E F1144 352.8 Q F0 (Display)24.74 E F1 -.18(re)2.5 G(adline).18 E F0 -.1(ke)2.5 G 2.5(ys) -.05 G(equences bound to macros and the strings the)-2.5 E 2.5(yo)-.15 G (utput.)-2.5 E F1144 364.8 Q F2(\214lename)2.5 E F0(Read k)180 376.8 Q .3 -.15(ey b)-.1 H(indings from).15 E F2(\214lename)2.5 E F0(.)A F1144 388.8 Q F2(function)2.5 E F0(Query about which k)180 400.8 Q -.15(ey)-.1 G 2.5(si).15 G -1.9 -.4(nv o)-2.5 H .2 -.1(ke t).4 H (he named).1 E F2(function)2.5 E F0(.)A F1144 412.8 Q F2(function) 2.5 E F0(Unbind all k)180 424.8 Q -.15(ey)-.1 G 2.5(sb).15 G (ound to the named)-2.5 E F2(function)2.5 E F0(.)A F1144 436.8 Q F2 -.1(ke)2.5 G(yseq)-.2 E F0(Remo)180 448.8 Q .3 -.15(ve a)-.15 H .3 -.15(ny c).15 H(urrent binding for).15 E F2 -.1(ke)2.5 G(yseq)-.2 E F0 (.)A F1144 460.8 Q F2 -.1(ke)2.5 G(yseq)-.2 E F1(:)A F2 (shell\255command)A F0(Cause)180 472.8 Q F2(shell\255command)2.5 E F0 (to be e)2.5 E -.15(xe)-.15 G(cuted whene).15 E -.15(ve)-.25 G(r).15 E F2 -.1(ke)2.5 G(yseq)-.2 E F0(is entered.)2.5 E(The return v)144 489.6 Q (alue is 0 unless an unrecognized option is gi)-.25 E -.15(ve)-.25 G 2.5 (no).15 G 2.5(ra)-2.5 G 2.5(ne)-2.5 G(rror occurred.)-2.5 E F1(br)108 506.4 Q(eak)-.18 E F0([)2.5 E F2(n)A F0(])A .083(Exit from within a)144 518.4 R F1 -.25(fo)2.583 G(r).25 E F0(,)A F1(while)2.583 E F0(,)A F1 (until)2.583 E F0 2.583(,o)C(r)-2.583 E F1(select)2.583 E F0 2.583 (loop. If)2.583 F F2(n)2.583 E F0 .083(is speci\214ed, break)2.583 F F2 (n)2.584 E F0(le)2.584 E -.15(ve)-.25 G(ls.).15 E F2(n)5.084 E F0 .084 (must be)2.584 F/F3 10/Symbol SF2.584 E F0(1.)2.584 E(If)144 530.4 Q F2(n)2.75 E F0 .25(is greater than the number of enclosing loops, all e\ nclosing loops are e)2.75 F 2.75(xited. The)-.15 F .25(return v)2.75 F (alue)-.25 E(is 0 unless the shell is not e)144 542.4 Q -.15(xe)-.15 G (cuting a loop when).15 E F1(br)2.5 E(eak)-.18 E F0(is e)2.5 E -.15(xe) -.15 G(cuted.).15 E F1 -.2(bu)108 559.2 S(iltin).2 E F2(shell\255b)2.5 E (uiltin)-.2 E F0([)2.5 E F2(ar)A(guments)-.37 E F0(])A(Ex)144 571.2 Q .792(ecute the speci\214ed shell b)-.15 F .792(uiltin, passing it)-.2 F F2(ar)3.293 E(guments)-.37 E F0 3.293(,a).27 G .793(nd return its e) -3.293 F .793(xit status.)-.15 F .793(This is useful)5.793 F .616 (when de\214ning a function whose name is the same as a shell b)144 583.2 R .615(uiltin, retaining the functionality of)-.2 F .57(the b)144 595.2 R .57(uiltin within the function.)-.2 F(The)5.57 E F1(cd)3.07 E F0 -.2(bu)3.07 G .57(iltin is commonly rede\214ned this w).2 F(ay)-.1 E 5.57(.T)-.65 G .57(he return status)-5.57 F(is f)144 607.2 Q(alse if)-.1 E F2(shell\255b)2.5 E(uiltin)-.2 E F0(is not a shell b)2.5 E (uiltin command.)-.2 E F1(cd)108 624 Q F0([)2.5 E F1(\255LP)A F0 2.5(][) C F2(dir)-2.5 E F0(])A .21(Change the current directory to)144 636 R F2 (dir)2.71 E F0 5.21(.T)C .21(he v)-5.21 F(ariable)-.25 E/F4 9 /Times-Bold@0 SF(HOME)2.71 E F0 .21(is the def)2.46 F(ault)-.1 E F2(dir) 2.71 E F0 5.21(.T).73 G .21(he v)-5.21 F(ariable)-.25 E F4(CDP)2.71 E -.855(AT)-.666 G(H).855 E F0 .776 (de\214nes the search path for the directory containing)144 648 R F2 (dir)3.276 E F0 5.777(.A).73 G(lternati)-5.777 E 1.077 -.15(ve d)-.25 H .777(irectory names in).15 F F4(CDP)3.277 E -.855(AT)-.666 G(H).855 E F0 .764(are separated by a colon \(:\).)144 660 R 3.264(An)5.764 G .764 (ull directory name in)-3.264 F F4(CDP)3.264 E -.855(AT)-.666 G(H).855 E F0 .764(is the same as the current direc-)3.014 F(tory)144 672 Q 3.027 (,i)-.65 G .527(.e., `)-3.027 F(`)-.74 E F1(.)A F0 -.74('')C 5.527(.I) .74 G(f)-5.527 E F2(dir)3.027 E F0(be)3.027 E .528 (gins with a slash \(/\), then)-.15 F F4(CDP)3.028 E -.855(AT)-.666 G(H) .855 E F0 .528(is not used. The)2.778 F F13.028 E F0 .528 (option says to use)3.028 F .58(the ph)144 684 R .58 (ysical directory structure instead of follo)-.05 F .579 (wing symbolic links \(see also the)-.25 F F13.079 E F0 .579 (option to the)3.079 F F1(set)144 696 Q F0 -.2(bu)3.383 G .883 (iltin command\); the).2 F F13.383 E F0 .884 (option forces symbolic links to be follo)3.384 F 3.384(wed. An)-.25 F (ar)3.384 E .884(gument of)-.18 F F13.384 E F0(is)3.384 E(equi)144 708 Q -.25(va)-.25 G .437(lent to).25 F F4($OLDPWD)2.937 E/F5 9 /Times-Roman@0 SF(.)A F0 .437(The return v)4.937 F .436 (alue is true if the directory w)-.25 F .436(as successfully changed; f) -.1 F(alse)-.1 E(otherwise.)144 720 Q(GNU Bash-2.05a)72 768 Q(2001 No) 126.115 E -.15(ve)-.15 G(mber 13).15 E(41)185.545 E EP %%Page: 42 42 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\)) -.35 E/F1 10/Times-Bold@0 SF(command)108 84 Q F0([)2.5 E F1(\255pVv)A F0 (])A/F2 10/Times-Italic@0 SF(command)2.5 E F0([)2.5 E F2(ar)A(g)-.37 E F0(...])2.5 E(Run)144 96 Q F2(command)2.877 E F0(with)2.877 E F2(ar) 2.877 E(gs)-.37 E F0 .378 (suppressing the normal shell function lookup. Only b)2.877 F .378 (uiltin commands or)-.2 F .559(commands found in the)144 108 R/F3 9 /Times-Bold@0 SF -.666(PA)3.059 G(TH)-.189 E F0 .559(are e)2.809 F -.15 (xe)-.15 G 3.059(cuted. If).15 F(the)3.059 E F13.059 E F0 .559 (option is gi)3.059 F -.15(ve)-.25 G .558(n, the search for).15 F F2 (command)3.058 E F0(is)3.058 E .231(performed using a def)144 120 R .231 (ault v)-.1 F .231(alue for)-.25 F F1 -.74(PA)2.731 G(TH)-.21 E F0 .231 (that is guaranteed to \214nd all of the standard utilities.)2.731 F(If) 5.232 E .232(either the)144 132 R F12.732 E F0(or)2.732 E F1 2.732 E F0 .232(option is supplied, a description of)2.732 F F2(command) 2.732 E F0 .232(is printed.)2.732 F(The)5.231 E F12.731 E F0 .231 (option causes)2.731 F 3.17(as)144 144 S .67(ingle w)-3.17 F .671 (ord indicating the command or \214le name used to in)-.1 F -.2(vo)-.4 G -.1(ke).2 G F2(command)3.271 E F0 .671(to be displayed; the)3.171 F F1 144 156 Q F0 .25(option produces a more v)2.75 F .25 (erbose description.)-.15 F .249(If the)5.25 F F12.749 E F0(or) 2.749 E F12.749 E F0 .249(option is supplied, the e)2.749 F .249 (xit status)-.15 F 1.055(is 0 if)144 168 R F2(command)3.555 E F0 -.1(wa) 3.555 G 3.556(sf).1 G 1.056(ound, and 1 if not.)-3.556 F 1.056 (If neither option is supplied and an error occurred or)6.056 F F2 (command)144 180 Q F0 1.664(cannot be found, the e)4.164 F 1.663 (xit status is 127.)-.15 F 1.663(Otherwise, the e)6.663 F 1.663 (xit status of the)-.15 F F1(command)4.163 E F0 -.2(bu)144 192 S (iltin is the e).2 E(xit status of)-.15 E F2(command)2.5 E F0(.).77 E F1 (compgen)108 208.8 Q F0([)2.5 E F2(option)A F0 2.5(][)C F2(wor)-2.5 E(d) -.37 E F0(])A .012(Generate possible completion matches for)144 220.8 R F2(wor)2.513 E(d)-.37 E F0 .013(according to the)2.513 F F2(option)2.513 E F0 .013(s, which may be an)B 2.513(yo)-.15 G(ption)-2.513 E .982 (accepted by the)144 232.8 R F1(complete)3.482 E F0 -.2(bu)3.481 G .981 (iltin with the e).2 F .981(xception of)-.15 F F13.481 E F0(and) 3.481 E F13.481 E F0 3.481(,a)C .981(nd write the matches to the) -3.481 F 1.415(standard output.)144 244.8 R 1.415(When using the)6.415 F F13.915 E F0(or)3.915 E F13.915 E F0 1.415(options, the v) 3.915 F 1.415(arious shell v)-.25 F 1.415(ariables set by the pro-)-.25 F(grammable completion f)144 256.8 Q(acilities, while a)-.1 E -.25(va) -.2 G(ilable, will not ha).25 E .3 -.15(ve u)-.2 H(seful v).15 E(alues.) -.25 E .352(The matches will be generated in the same w)144 280.8 R .352 (ay as if the programmable completion code had gen-)-.1 F .02(erated th\ em directly from a completion speci\214cation with the same \215ags.)144 292.8 R(If)5.02 E F2(wor)2.52 E(d)-.37 E F0 .02(is speci\214ed, only) 2.52 F(those completions matching)144 304.8 Q F2(wor)2.5 E(d)-.37 E F0 (will be displayed.)2.5 E(The return v)144 328.8 Q (alue is true unless an in)-.25 E -.25(va)-.4 G (lid option is supplied, or no matches were generated.).25 E F1 (complete)108 345.6 Q F0([)2.5 E F1(\255abcdefgjkvu)A F0 2.5(][)C F1 -2.5 E F2(comp-option)2.5 E F0 2.5(][)C F1-2.5 E F2(action) 2.5 E F0 2.5(][)C F1-2.5 E F2(globpat)2.5 E F0 2.5(][)C F1 -2.5 E F2(wor)2.5 E(dlist)-.37 E F0 2.5(][)C F1-2.5 E F2(pr)2.5 E (e\214x)-.37 E F0 2.5(][)C F1-2.5 E F2(suf-)2.5 E<8c78>108 357.6 Q F0(])A([)144 369.6 Q F1A F2(\214lterpat)2.5 E F0 2.5(][)C F1 -2.5 E F2(function)2.5 E F0 2.5(][)C F1-2.5 E F2(command)2.5 E F0 (])A F2(name)2.5 E F0([)2.5 E F2(name ...)A F0(])A F1(complete \255pr) 108 381.6 Q F0([)2.5 E F2(name)A F0(...])2.5 E .633(Specify ho)144 393.6 R 3.133(wa)-.25 G -.18(rg)-3.133 G .633(uments to each).18 F F2(name) 3.133 E F0 .633(should be completed.)3.133 F .634(If the)5.634 F F1 3.134 E F0 .634(option is supplied, or if no)3.134 F .14 (options are supplied, e)144 405.6 R .139 (xisting completion speci\214cations are printed in a w)-.15 F .139 (ay that allo)-.1 F .139(ws them to be)-.25 F .31(reused as input.)144 417.6 R(The)5.31 E F12.81 E F0 .31(option remo)2.81 F -.15(ve)-.15 G 2.81(sac).15 G .31(ompletion speci\214cation for each)-2.81 F F2(name) 2.81 E F0 2.81(,o)C 1.11 -.4(r, i)-2.81 H 2.81(fn).4 G(o)-2.81 E F2 (name)2.81 E F0(s)A(are supplied, all completion speci\214cations.)144 429.6 Q 1.438 (The process of applying these completion speci\214cations when w)144 453.6 R 1.437(ord completion is attempted is)-.1 F(described abo)144 465.6 Q .3 -.15(ve u)-.15 H(nder).15 E F1(Pr)2.5 E (ogrammable Completion)-.18 E F0(.)A .555 (Other options, if speci\214ed, ha)144 489.6 R .855 -.15(ve t)-.2 H .555 (he follo).15 F .555(wing meanings.)-.25 F .555(The ar)5.555 F .555 (guments to the)-.18 F F13.056 E F0(,)A F13.056 E F0 3.056 (,a)C(nd)-3.056 E F13.056 E F0 .723(options \(and, if necessary) 144 501.6 R 3.223(,t)-.65 G(he)-3.223 E F13.223 E F0(and)3.223 E F13.223 E F0 .722 (options\) should be quoted to protect them from e)3.223 F(xpan-)-.15 E (sion before the)144 513.6 Q F1(complete)2.5 E F0 -.2(bu)2.5 G (iltin is in).2 E -.2(vo)-.4 G -.1(ke).2 G(d.).1 E F1144 525.6 Q F2(comp-option)2.5 E F0(The)184 537.6 Q F2(comp-option)2.79 E F0 .291 (controls se)2.791 F -.15(ve)-.25 G .291(ral aspects of the compspec') .15 F 2.791(sb)-.55 G(eha)-2.791 E .291(vior be)-.2 F .291 (yond the simple)-.15 F(generation of completions.)184 549.6 Q F2 (comp-option)5 E F0(may be one of:)2.5 E F1(default)184 561.6 Q F0 (Use readline')10 E 2.5(sd)-.55 G(ef)-2.5 E (ault completion if the compspec generates no matches.)-.1 E F1(dir)184 573.6 Q(names)-.15 E F0(Perform directory name completion if the compsp\ ec generates no matches.)224 585.6 Q F1(\214lenames)184 597.6 Q F0 -.7 (Te)224 609.6 S .137(ll readline that the compspec generates \214lename\ s, so it can perform an).7 F 2.636<798c>-.15 G(le-)-2.636 E .496 (name\255speci\214c processing \(lik)224 621.6 R 2.996(ea)-.1 G .496 (dding a slash to directory names or suppress-)-2.996 F (ing trailing spaces\).)224 633.6 Q (Intended to be used with shell functions.)5 E F1144 645.6 Q F2 (action)2.5 E F0(The)184 657.6 Q F2(action)2.5 E F0 (may be one of the follo)2.5 E (wing to generate a list of possible completions:)-.25 E F1(alias)184 669.6 Q F0(Alias names.)20.55 E(May also be speci\214ed as)5 E F1 2.5 E F0(.)A F1(arrayv)184 681.6 Q(ar)-.1 E F0(Array v)224 693.6 Q (ariable names.)-.25 E F1 4.7(binding Readline)184 705.6 R F0 -.1(ke)2.5 G 2.5(yb)-.05 G(inding names.)-2.5 E F1 -.2(bu)184 717.6 S(iltin).2 E F0 (Names of shell b)11.85 E(uiltin commands.)-.2 E (May also be speci\214ed as)5 E F12.5 E F0(.)A(GNU Bash-2.05a)72 768 Q(2001 No)126.115 E -.15(ve)-.15 G(mber 13).15 E(42)185.545 E EP %%Page: 43 43 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\)) -.35 E/F1 10/Times-Bold@0 SF(command)184 84 Q F0(Command names.)224 96 Q (May also be speci\214ed as)5 E F12.5 E F0(.)A F1(dir)184 108 Q (ectory)-.18 E F0(Directory names.)224 120 Q(May also be speci\214ed as) 5 E F12.5 E F0(.)A F1(disabled)184 132 Q F0 (Names of disabled shell b)224 144 Q(uiltins.)-.2 E F1(enabled)184 156 Q F0(Names of enabled shell b)6.66 E(uiltins.)-.2 E F1(export)184 168 Q F0 (Names of e)12.23 E(xported shell v)-.15 E 2.5(ariables. May)-.25 F (also be speci\214ed as)2.5 E F12.5 E F0(.)A F1(\214le)184 180 Q F0(File names.)27.22 E(May also be speci\214ed as)5 E F12.5 E F0 (.)A F1(function)184 192 Q F0(Names of shell functions.)224 204 Q F1(gr) 184 216 Q(oup)-.18 E F0(Group names.)14.62 E(May also be speci\214ed as) 5 E F12.5 E F0(.)A F1(helptopic)184 228 Q F0 (Help topics as accepted by the)224 240 Q F1(help)2.5 E F0 -.2(bu)2.5 G (iltin.).2 E F1(hostname)184 252 Q F0(Hostnames, as tak)224 264 Q (en from the \214le speci\214ed by the)-.1 E/F2 9/Times-Bold@0 SF (HOSTFILE)2.5 E F0(shell v)2.25 E(ariable.)-.25 E F1(job)184 276 Q F0 (Job names, if job control is acti)26.11 E -.15(ve)-.25 G 5(.M).15 G (ay also be speci\214ed as)-5 E F12.5 E F0(.)A F1 -.1(ke)184 288 S (yw).1 E(ord)-.1 E F0(Shell reserv)224 300 Q(ed w)-.15 E 2.5(ords. May) -.1 F(also be speci\214ed as)2.5 E F12.5 E F0(.)A F1(running)184 312 Q F0(Names of running jobs, if job control is acti)5.54 E -.15(ve) -.25 G(.).15 E F1(setopt)184 324 Q F0 -1.11(Va)14.45 G(lid ar)1.11 E (guments for the)-.18 E F12.5 E F0(option to the)2.5 E F1(set)2.5 E F0 -.2(bu)2.5 G(iltin.).2 E F1(shopt)184 336 Q F0 (Shell option names as accepted by the)16.66 E F1(shopt)2.5 E F0 -.2(bu) 2.5 G(iltin.).2 E F1(signal)184 348 Q F0(Signal names.)14.99 E F1 (stopped)184 360 Q F0(Names of stopped jobs, if job control is acti)6.66 E -.15(ve)-.25 G(.).15 E F1(user)184 372 Q F0(User names.)21.67 E (May also be speci\214ed as)5 E F12.5 E F0(.)A F1 -.1(va)184 384 S (riable).1 E F0(Names of all shell v)5.1 E 2.5(ariables. May)-.25 F (also be speci\214ed as)2.5 E F12.5 E F0(.)A F1144 396 Q/F3 10/Times-Italic@0 SF(globpat)2.5 E F0 1.411(The \214lename e)184 408 R 1.411(xpansion pattern)-.15 F F3(globpat)3.911 E F0 1.411(is e)3.911 F 1.411(xpanded to generate the possible comple-)-.15 F(tions.)184 420 Q F1144 432 Q F3(wor)2.5 E(dlist)-.37 E F0(The)184 444 Q F3(wor) 3.639 E(dlist)-.37 E F0 1.14(is split using the characters in the)3.639 F F2(IFS)3.64 E F0 1.14(special v)3.39 F 1.14 (ariable as delimiters, and)-.25 F 2.008(each resultant w)184 456 R 2.008(ord is e)-.1 F 4.508(xpanded. The)-.15 F 2.007 (possible completions are the members of the)4.508 F (resultant list which match the w)184 468 Q(ord being completed.)-.1 E F1144 480 Q F3(command)2.5 E(command)184 492 Q F0 1.055(is e)3.555 F -.15(xe)-.15 G 1.055(cuted in a subshell en).15 F 1.056 (vironment, and its output is used as the possible)-.4 F(completions.) 184 504 Q F1144 516 Q F3(function)2.5 E F0 1.181 (The shell function)184 528 R F3(function)3.681 E F0 1.181(is e)3.681 F -.15(xe)-.15 G 1.181(cuted in the current shell en).15 F 3.68 (vironment. When)-.4 F 1.18(it \214n-)3.68 F .932 (ishes, the possible completions are retrie)184 540 R -.15(ve)-.25 G 3.432(df).15 G .932(rom the v)-3.432 F .932(alue of the)-.25 F F2 (COMPREPL)3.432 E(Y)-.828 E F0(array)3.182 E -.25(va)184 552 S(riable.) .25 E F1144 564 Q F3(\214lterpat)2.5 E(\214lterpat)184 576 Q F0 .733(is a pattern as used for \214lename e)3.234 F 3.233(xpansion. It) -.15 F .733(is applied to the list of possible)3.233 F 1.596 (completions generated by the preceding options and ar)184 588 R 1.596 (guments, and each completion)-.18 F(matching)184 600 Q F3(\214lterpat) 3.205 E F0 .705(is remo)3.205 F -.15(ve)-.15 G 3.205(df).15 G .704 (rom the list.)-3.205 F 3.204(Al)5.704 G(eading)-3.204 E F1(!)3.204 E F0 (in)3.204 E F3(\214lterpat)3.204 E F0(ne)3.204 E -.05(ga)-.15 G .704 (tes the pattern;).05 F(in this case, an)184 612 Q 2.5(yc)-.15 G (ompletion not matching)-2.5 E F3(\214lterpat)2.5 E F0(is remo)2.5 E -.15(ve)-.15 G(d.).15 E F1144 624 Q F3(pr)2.5 E(e\214x)-.37 E(pr) 184 636 Q(e\214x)-.37 E F0 .534(is added at the be)3.034 F .534 (ginning of each possible completion after all other options ha)-.15 F -.15(ve)-.2 G(been applied.)184 648 Q F1144 660 Q F3(suf)2.5 E 2.81(\214x suf)-.18 F<8c78>-.18 E F0 (is appended to each possible completion after all other options ha)2.5 E .3 -.15(ve b)-.2 H(een applied.).15 E .467(The return v)144 676.8 R .467(alue is true unless an in)-.25 F -.25(va)-.4 G .466 (lid option is supplied, an option other than).25 F F12.966 E F0 (or)2.966 E F12.966 E F0 .466(is sup-)2.966 F 1.361 (plied without a)144 688.8 R F3(name)3.861 E F0(ar)3.861 E 1.361 (gument, an attempt is made to remo)-.18 F 1.662 -.15(ve a c)-.15 H 1.362(ompletion speci\214cation for a).15 F F3(name)144 700.8 Q F0 (for which no speci\214cation e)2.5 E (xists, or an error occurs adding a completion speci\214cation.)-.15 E (GNU Bash-2.05a)72 768 Q(2001 No)126.115 E -.15(ve)-.15 G(mber 13).15 E (43)185.545 E EP %%Page: 44 44 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\)) -.35 E/F1 10/Times-Bold@0 SF(continue)108 84 Q F0([)2.5 E/F2 10 /Times-Italic@0 SF(n)A F0(])A 1.792(Resume the ne)144 96 R 1.792 (xt iteration of the enclosing)-.15 F F1 -.25(fo)4.291 G(r).25 E F0(,)A F1(while)4.291 E F0(,)A F1(until)4.291 E F0 4.291(,o)C(r)-4.291 E F1 (select)4.291 E F0 4.291(loop. If)4.291 F F2(n)4.291 E F0 1.791 (is speci\214ed,)4.291 F 1.272(resume at the)144 108 R F2(n)3.772 E F0 1.272(th enclosing loop.)B F2(n)6.272 E F0 1.272(must be)3.772 F/F3 10 /Symbol SF3.772 E F0 3.772(1. If)3.772 F F2(n)3.772 E F0 1.272 (is greater than the number of enclosing)3.772 F .668 (loops, the last enclosing loop \(the `)144 120 R(`top-le)-.74 E -.15 (ve)-.25 G(l').15 E 3.168('l)-.74 G .668(oop\) is resumed.)-3.168 F .667 (The return v)5.667 F .667(alue is 0 unless the)-.25 F(shell is not e) 144 132 Q -.15(xe)-.15 G(cuting a loop when).15 E F1(continue)2.5 E F0 (is e)2.5 E -.15(xe)-.15 G(cuted.).15 E F1(declar)108 148.8 Q(e)-.18 E F0([)2.5 E F1(\255afFirx)A F0 2.5(][)C F1-2.5 E F0 2.5(][)C F2 (name)-2.5 E F0([=)A F2(value)A F0(]])A F1(typeset)108 160.8 Q F0([)2.5 E F1(\255afFirx)A F0 2.5(][)C F1-2.5 E F0 2.5(][)C F2(name)-2.5 E F0([=)A F2(value)A F0(]])A 1.264(Declare v)144 172.8 R 1.264 (ariables and/or gi)-.25 F 1.564 -.15(ve t)-.25 H 1.264(hem attrib).15 F 3.765(utes. If)-.2 F(no)3.765 E F2(name)3.765 E F0 3.765(sa)C 1.265 (re gi)-3.765 F -.15(ve)-.25 G 3.765(nt).15 G 1.265(hen display the v) -3.765 F 1.265(alues of)-.25 F -.25(va)144 184.8 S 3.327(riables. The) .25 F F13.327 E F0 .826(option will display the attrib)3.327 F .826(utes and v)-.2 F .826(alues of each)-.25 F F2(name)3.326 E F0 5.826 (.W).18 G(hen)-5.826 E F13.326 E F0 .826(is used,)3.326 F .22 (additional options are ignored.)144 196.8 R(The)5.22 E F12.72 E F0 .22(option inhibits the display of function de\214nitions; only the) 2.72 F .21(function name and attrib)144 208.8 R .21(utes are printed.) -.2 F(The)5.21 E F12.71 E F0 .21(option implies)2.71 F F1 2.71 E F0 5.21(.T)C .21(he follo)-5.21 F .21(wing options can be)-.25 F (used to restrict output to v)144 220.8 Q (ariables with the speci\214ed attrib)-.25 E(ute or to gi)-.2 E .3 -.15 (ve v)-.25 H(ariables attrib)-.1 E(utes:)-.2 E F1144 232.8 Q F0 (Each)25.3 E F2(name)2.5 E F0(is an array v)2.5 E(ariable \(see)-.25 E F1(Arrays)2.5 E F0(abo)2.5 E -.15(ve)-.15 G(\).).15 E F1144 244.8 Q F0(Use function names only)26.97 E(.)-.65 E F1144 256.8 Q F0 .557(The v)27.52 F .558(ariable is treated as an inte)-.25 F .558 (ger; arithmetic e)-.15 F -.25(va)-.25 G .558(luation \(see).25 F/F4 9 /Times-Bold@0 SF .558(ARITHMETIC EV)3.058 F(ALU)-1.215 E(A-)-.54 E (TION \))180 268.8 Q F0(is performed when the v)2.25 E (ariable is assigned a v)-.25 E(alue.)-.25 E F1144 280.8 Q F0(Mak) 25.86 E(e)-.1 E F2(name)5.047 E F0 5.047(sr)C(eadonly)-5.047 E 7.547(.T) -.65 G 2.546(hese names cannot then be assigned v)-7.547 F 2.546 (alues by subsequent)-.25 F(assignment statements or unset.)180 292.8 Q F1144 304.8 Q F0(Mark)25.3 E F2(name)2.5 E F0 2.5(sf)C(or e)-2.5 E (xport to subsequent commands via the en)-.15 E(vironment.)-.4 E .336 (Using `+' instead of `\255' turns of)144 321.6 R 2.837(ft)-.25 G .337 (he attrib)-2.837 F .337(ute instead, with the e)-.2 F .337 (xception that)-.15 F F1(+a)2.837 E F0 .337(may not be used)2.837 F .793 (to destro)144 333.6 R 3.293(ya)-.1 G 3.293(na)-3.293 G .793(rray v) -3.293 F 3.293(ariable. When)-.25 F .793(used in a function, mak)3.293 F .793(es each)-.1 F F2(name)3.293 E F0 .793(local, as with the)3.293 F F1 (local)3.292 E F0 3.645(command. The)144 345.6 R 1.145(return v)3.645 F 1.145(alue is 0 unless an in)-.25 F -.25(va)-.4 G 1.146 (lid option is encountered, an attempt is made to).25 F .092 (de\214ne a function using)144 357.6 R/F5 10/Courier@0 SF .091 (\255f foo=bar)2.591 F F0 2.591(,a)C 2.591(na)-2.591 G .091 (ttempt is made to assign a v)-2.591 F .091(alue to a readonly v)-.25 F (ariable,)-.25 E .513(an attempt is made to assign a v)144 369.6 R .513 (alue to an array v)-.25 F .513 (ariable without using the compound assignment)-.25 F .135(syntax \(see) 144 381.6 R F1(Arrays)2.635 E F0(abo)2.635 E -.15(ve)-.15 G .135 (\), one of the).15 F F2(names)2.635 E F0 .135(is not a v)2.635 F .135 (alid shell v)-.25 F .135(ariable name, an attempt is made)-.25 F .125 (to turn of)144 393.6 R 2.625(fr)-.25 G .126 (eadonly status for a readonly v)-2.625 F .126 (ariable, an attempt is made to turn of)-.25 F 2.626(fa)-.25 G .126 (rray status for an)-2.626 F(array v)144 405.6 Q (ariable, or an attempt is made to display a non-e)-.25 E (xistent function with)-.15 E F12.5 E F0(.)A F1 (dirs [\255clpv] [+)108 422.4 Q F2(n)A F1 2.5(][)C-2.5 E F2(n)A F1 (])A F0 -.4(Wi)144 434.4 S .329 (thout options, displays the list of currently remembered directories.) .4 F .328(The def)5.328 F .328(ault display is on a)-.1 F 1.238 (single line with directory names separated by spaces.)144 446.4 R 1.238 (Directories are added to the list with the)6.238 F F1(pushd)144 458.4 Q F0(command; the)2.5 E F1(popd)2.5 E F0(command remo)2.5 E -.15(ve)-.15 G 2.5(se).15 G(ntries from the list.)-2.5 E F1(+)144 470.4 Q F2(n)A F0 1.565(Displays the)25.3 F F2(n)4.065 E F0 1.565 (th entry counting from the left of the list sho)B 1.564(wn by)-.25 F F1 (dirs)4.064 E F0 1.564(when in)4.064 F -.2(vo)-.4 G -.1(ke).2 G(d).1 E (without options, starting with zero.)180 482.4 Q F1144 494.4 Q F2 (n)A F0 1.194(Displays the)25.3 F F2(n)3.694 E F0 1.194 (th entry counting from the right of the list sho)B 1.194(wn by)-.25 F F1(dirs)3.694 E F0 1.194(when in)3.694 F -.2(vo)-.4 G -.1(ke).2 G(d).1 E (without options, starting with zero.)180 506.4 Q F1144 518.4 Q F0 (Clears the directory stack by deleting all of the entries.)25.86 E F1 144 530.4 Q F0 .324(Produces a longer listing; the def)27.52 F .324(ault listing format uses a tilde to denote the home direc-)-.1 F (tory)180 542.4 Q(.)-.65 E F1144 554.4 Q F0 (Print the directory stack with one entry per line.)24.74 E F1144 566.4 Q F0 .272(Print the directory stack with one entry per line, pre\ \214xing each entry with its inde)25.3 F 2.773(xi)-.15 G 2.773(nt)-2.773 G(he)-2.773 E(stack.)180 578.4 Q .258(The return v)144 595.2 R .258 (alue is 0 unless an in)-.25 F -.25(va)-.4 G .258 (lid option is supplied or).25 F F2(n)2.758 E F0(inde)2.758 E -.15(xe) -.15 G 2.758(sb).15 G -.15(ey)-2.758 G .258(ond the end of the direc-) .15 F(tory stack.)144 607.2 Q F1(diso)108 624 Q(wn)-.1 E F0([)2.5 E F1 (\255ar)A F0 2.5(][)C F1-2.5 E F0 2.5(][)C F2(jobspec)-2.5 E F0 (...])2.5 E -.4(Wi)144 636 S .451(thout options, each).4 F F2(jobspec) 2.951 E F0 .451(is remo)2.951 F -.15(ve)-.15 G 2.951(df).15 G .451 (rom the table of acti)-2.951 F .751 -.15(ve j)-.25 H 2.951(obs. If).15 F(the)2.951 E F12.951 E F0 .452(option is gi)2.952 F -.15(ve)-.25 G(n,).15 E(each)144 648 Q F2(jobspec)2.883 E F0 .383(is not remo)2.883 F -.15(ve)-.15 G 2.883(df).15 G .383(rom the table, b)-2.883 F .383 (ut is mark)-.2 F .383(ed so that)-.1 F F4(SIGHUP)2.883 E F0 .382 (is not sent to the job if)2.633 F .331(the shell recei)144 660 R -.15 (ve)-.25 G 2.831(sa).15 G F4(SIGHUP)A/F6 9/Times-Roman@0 SF(.)A F0 .332 (If no)4.832 F F2(jobspec)2.832 E F0 .332(is present, and neither the) 2.832 F F12.832 E F0 .332(nor the)2.832 F F12.832 E F0 .332 (option is sup-)2.832 F .068(plied, the)144 672 R F2(curr)2.568 E .068 (ent job)-.37 F F0 .068(is used.)2.568 F .068(If no)5.068 F F2(jobspec) 2.567 E F0 .067(is supplied, the)2.567 F F12.567 E F0 .067 (option means to remo)2.567 F .367 -.15(ve o)-.15 H 2.567(rm).15 G .067 (ark all)-2.567 F 1.505(jobs; the)144 684 R F14.005 E F0 1.505 (option without a)4.005 F F2(jobspec)4.005 E F0(ar)4.005 E 1.505 (gument restricts operation to running jobs.)-.18 F 1.505(The return) 6.505 F -.25(va)144 696 S(lue is 0 unless a).25 E F2(jobspec)2.5 E F0 (does not specify a v)2.5 E(alid job)-.25 E(.)-.4 E(GNU Bash-2.05a)72 768 Q(2001 No)126.115 E -.15(ve)-.15 G(mber 13).15 E(44)185.545 E EP %%Page: 45 45 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\)) -.35 E/F1 10/Times-Bold@0 SF(echo)108 84 Q F0([)2.5 E F1(\255neE)A F0 2.5(][)C/F2 10/Times-Italic@0 SF(ar)-2.5 E(g)-.37 E F0(...])2.5 E .395 (Output the)144 96 R F2(ar)2.895 E(g)-.37 E F0 .395 (s, separated by spaces, follo)B .395(wed by a ne)-.25 F 2.895 (wline. The)-.25 F .394(return status is al)2.895 F -.1(wa)-.1 G .394 (ys 0.).1 F(If)5.394 E F12.894 E F0 .548 (is speci\214ed, the trailing ne)144 108 R .548(wline is suppressed.) -.25 F .548(If the)5.548 F F13.048 E F0 .548(option is gi)3.048 F -.15(ve)-.25 G .548(n, interpretation of the fol-).15 F(lo)144 120 Q .053(wing backslash-escaped characters is enabled.)-.25 F(The)5.053 E F1 2.553 E F0 .052(option disables the interpretation of these)2.552 F 1.502(escape characters, e)144 132 R -.15(ve)-.25 G 4.002(no).15 G 4.002(ns)-4.002 G 1.502(ystems where the)-4.002 F 4.002(ya)-.15 G 1.502 (re interpreted by def)-4.002 F 4.003(ault. The)-.1 F F1(xpg_echo)4.003 E F0(shell)4.003 E .009 (option may be used to dynamically determine whether or not)144 144 R F1 (echo)2.509 E F0 -.15(ex)2.509 G .009(pands these escape characters).15 F .659(by def)144 156 R(ault.)-.1 E F1(echo)5.659 E F0 .659 (does not interpret)3.159 F F13.159 E F0 .659 (to mean the end of options.)3.159 F F1(echo)5.66 E F0 .66 (interprets the follo)3.16 F(wing)-.25 E(escape sequences:)144 168 Q F1 (\\a)144 180 Q F0(alert \(bell\))28.22 E F1(\\b)144 192 Q F0(backspace) 27.66 E F1(\\c)144 204 Q F0(suppress trailing ne)28.78 E(wline)-.25 E F1 (\\e)144 216 Q F0(an escape character)28.78 E F1(\\f)144 228 Q F0 (form feed)29.89 E F1(\\n)144 240 Q F0(ne)27.66 E 2.5(wl)-.25 G(ine)-2.5 E F1(\\r)144 252 Q F0(carriage return)28.78 E F1(\\t)144 264 Q F0 (horizontal tab)29.89 E F1(\\v)144 276 Q F0 -.15(ve)28.22 G(rtical tab) .15 E F1(\\\\)144 288 Q F0(backslash)30.44 E F1(\\)144 300 Q F2(nnn)A F0 (the eight-bit character whose v)18.22 E(alue is the octal v)-.25 E (alue)-.25 E F2(nnn)2.5 E F0(\(one to three digits\))2.5 E F1(\\x)144 312 Q F2(HH)A F0(the eight-bit character whose v)13.78 E(alue is the he) -.25 E(xadecimal v)-.15 E(alue)-.25 E F2(HH)2.5 E F0(\(one or tw)2.5 E 2.5(oh)-.1 G .3 -.15(ex d)-2.5 H(igits\)).15 E F1(enable)108 328.8 Q F0 ([)2.5 E F1(\255adnps)A F0 2.5(][)C F1-2.5 E F2(\214lename)2.5 E F0 2.5(][)C F2(name)-2.5 E F0(...])2.5 E .278(Enable and disable b)144 340.8 R .278(uiltin shell commands.)-.2 F .278(Disabling a b)5.278 F .278(uiltin allo)-.2 F .278(ws a disk command which has)-.25 F .833 (the same name as a shell b)144 352.8 R .834(uiltin to be e)-.2 F -.15 (xe)-.15 G .834(cuted without specifying a full pathname, e).15 F -.15 (ve)-.25 G 3.334(nt).15 G(hough)-3.334 E .99 (the shell normally searches for b)144 364.8 R .989 (uiltins before disk commands.)-.2 F(If)5.989 E F13.489 E F0 .989 (is used, each)3.489 F F2(name)3.489 E F0 .989(is dis-)3.489 F 1.581 (abled; otherwise,)144 376.8 R F2(names)4.082 E F0 1.582(are enabled.) 4.082 F -.15(Fo)6.582 G 4.082(re).15 G 1.582(xample, to use the)-4.232 F F1(test)4.082 E F0 1.582(binary found via the)4.082 F/F3 9/Times-Bold@0 SF -.666(PA)4.082 G(TH)-.189 E F0 .081(instead of the shell b)144 388.8 R .081(uiltin v)-.2 F .081(ersion, run)-.15 F/F4 10/Courier@0 SF .081 (enable -n test)2.581 F F0 5.081(.T)C(he)-5.081 E F12.58 E F0 .08 (option means to load the ne)2.58 F(w)-.25 E -.2(bu)144 400.8 S 1.569 (iltin command).2 F F2(name)4.069 E F0 1.569(from shared object)4.069 F F2(\214lename)4.069 E F0 4.069(,o).18 G 4.069(ns)-4.069 G 1.569 (ystems that support dynamic loading.)-4.069 F(The)144 412.8 Q F1 2.867 E F0 .367(option will delete a b)2.867 F .367(uiltin pre)-.2 F .367(viously loaded with)-.25 F F12.866 E F0 5.366(.I)C 2.866(fn) -5.366 G(o)-2.866 E F2(name)2.866 E F0(ar)2.866 E .366(guments are gi) -.18 F -.15(ve)-.25 G .366(n, or).15 F .398(if the)144 424.8 R F1 2.898 E F0 .399(option is supplied, a list of shell b)2.899 F .399 (uiltins is printed.)-.2 F -.4(Wi)5.399 G .399(th no other option ar).4 F .399(guments, the)-.18 F .099(list consists of all enabled shell b)144 436.8 R 2.598(uiltins. If)-.2 F F12.598 E F0 .098 (is supplied, only disabled b)2.598 F .098(uiltins are printed.)-.2 F (If)5.098 E F12.598 E F0 1.916 (is supplied, the list printed includes all b)144 448.8 R 1.916 (uiltins, with an indication of whether or not each is)-.2 F 2.879 (enabled. If)144 460.8 R F12.879 E F0 .379 (is supplied, the output is restricted to the POSIX)2.879 F F2(special) 2.879 E F0 -.2(bu)2.878 G 2.878(iltins. The).2 F .378(return v)2.878 F (alue)-.25 E 1.02(is 0 unless a)144 472.8 R F2(name)3.52 E F0 1.02 (is not a shell b)3.52 F 1.02(uiltin or there is an error loading a ne) -.2 F 3.52(wb)-.25 G 1.02(uiltin from a shared)-3.72 F(object.)144 484.8 Q F1 -2.3 -.15(ev a)108 501.6 T(l).15 E F0([)2.5 E F2(ar)A(g)-.37 E F0 (...])2.5 E(The)144 513.6 Q F2(ar)3.171 E(g)-.37 E F0 3.171(sa)C .671 (re read and concatenated together into a single command.)-3.171 F .67 (This command is then read)5.67 F .495(and e)144 525.6 R -.15(xe)-.15 G .495(cuted by the shell, and its e).15 F .495 (xit status is returned as the v)-.15 F .495(alue of)-.25 F F1 -2.3 -.15 (ev a)2.995 H(l).15 E F0 5.495(.I)C 2.995(ft)-5.495 G .495(here are no) -2.995 F F2(ar)2.995 E(gs)-.37 E F0(,).27 E(or only null ar)144 537.6 Q (guments,)-.18 E F1 -2.3 -.15(ev a)2.5 H(l).15 E F0(returns 0.)2.5 E F1 (exec)108 554.4 Q F0([)2.5 E F1(\255cl)A F0 2.5(][)C F1-2.5 E F2 (name)2.5 E F0 2.5(][)C F2(command)-2.5 E F0([)2.5 E F2(ar)A(guments) -.37 E F0(]])A(If)144 566.4 Q F2(command)2.91 E F0 .41 (is speci\214ed, it replaces the shell.)2.91 F .41(No ne)5.41 F 2.91(wp) -.25 G .41(rocess is created.)-2.91 F(The)5.41 E F2(ar)2.91 E(guments) -.37 E F0(become)2.91 E .176(the ar)144 578.4 R .176(guments to)-.18 F F2(command)2.676 E F0 5.176(.I)C 2.676(ft)-5.176 G(he)-2.676 E F1 2.676 E F0 .176(option is supplied, the shell places a dash at the be) 2.676 F .177(ginning of)-.15 F .22(the zeroth ar)144 590.4 R 2.72(gp) -.18 G .22(assed to)-2.72 F F2(command)2.72 E F0 5.22(.T).77 G .22 (his is what)-5.22 F F2(lo)2.72 E(gin)-.1 E F0 .22(\(1\) does.).24 F (The)5.22 E F12.72 E F0 .22(option causes)2.72 F F2(command)2.72 E F0(to)2.72 E 1.229(be e)144 602.4 R -.15(xe)-.15 G 1.229 (cuted with an empty en).15 F 3.729(vironment. If)-.4 F F13.729 E F0 1.229(is supplied, the shell passes)3.729 F F2(name)3.73 E F0 1.23 (as the zeroth)3.73 F(ar)144 614.4 Q .09(gument to the e)-.18 F -.15(xe) -.15 G .09(cuted command.).15 F(If)5.089 E F2(command)2.589 E F0 .089 (cannot be e)2.589 F -.15(xe)-.15 G .089 (cuted for some reason, a non-inter).15 F(-)-.2 E(acti)144 626.4 Q 1.066 -.15(ve s)-.25 H .766(hell e).15 F .766(xits, unless the shell option) -.15 F F1(execfail)3.266 E F0 .766 (is enabled, in which case it returns f)3.266 F 3.267(ailure. An)-.1 F (interacti)144 638.4 Q 1.584 -.15(ve s)-.25 H 1.284(hell returns f).15 F 1.283(ailure if the \214le cannot be e)-.1 F -.15(xe)-.15 G 3.783 (cuted. If).15 F F2(command)3.783 E F0 1.283(is not speci\214ed, an) 3.783 F(y)-.15 E .133(redirections tak)144 650.4 R 2.633(ee)-.1 G -.25 (ff)-2.633 G .134(ect in the current shell, and the return status is 0.) .25 F .134(If there is a redirection error)5.134 F(,)-.4 E (the return status is 1.)144 662.4 Q F1(exit)108 679.2 Q F0([)2.5 E F2 (n)A F0 6.29(]C)C .123(ause the shell to e)-6.29 F .123 (xit with a status of)-.15 F F2(n)2.623 E F0 5.123(.I)C(f)-5.123 E F2(n) 2.623 E F0 .123(is omitted, the e)2.623 F .122 (xit status is that of the last command)-.15 F -.15(exe)144 691.2 S 2.5 (cuted. A).15 F(trap on)2.5 E F3(EXIT)2.5 E F0(is e)2.25 E -.15(xe)-.15 G(cuted before the shell terminates.).15 E(GNU Bash-2.05a)72 768 Q (2001 No)126.115 E -.15(ve)-.15 G(mber 13).15 E(45)185.545 E EP %%Page: 46 46 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\)) -.35 E/F1 10/Times-Bold@0 SF(export)108 84 Q F0([)2.5 E F1(\255fn)A F0 2.5(][).833 G/F2 10/Times-Italic@0 SF(name)-2.5 E F0([=)A F2(wor)A(d) -.37 E F0(]] ...)A F1(export \255p)108 96 Q F0 .305(The supplied)144 108 R F2(names)2.805 E F0 .305(are mark)2.805 F .305(ed for automatic e)-.1 F .306(xport to the en)-.15 F .306(vironment of subsequently e)-.4 F -.15(xe)-.15 G(cuted).15 E 2.694(commands. If)144 120 R(the)2.694 E F1 2.694 E F0 .193(option is gi)2.693 F -.15(ve)-.25 G .193(n, the) .15 F F2(names)2.693 E F0 .193(refer to functions.)2.693 F .193(If no) 5.193 F F2(names)2.693 E F0 .193(are gi)2.693 F -.15(ve)-.25 G .193 (n, or if the).15 F F1144 132 Q F0 .659 (option is supplied, a list of all names that are e)3.159 F .66 (xported in this shell is printed.)-.15 F(The)5.66 E F13.16 E F0 (option)3.16 E .481(causes the e)144 144 R .481 (xport property to be remo)-.15 F -.15(ve)-.15 G 2.981(df).15 G .481 (rom the named v)-2.981 F(ariables.)-.25 E F1(export)5.48 E F0 .48 (returns an e)2.98 F .48(xit status)-.15 F .13(of 0 unless an in)144 156 R -.25(va)-.4 G .13(lid option is encountered, one of the).25 F F2 (names)2.631 E F0 .131(is not a v)2.631 F .131(alid shell v)-.25 F .131 (ariable name, or)-.25 F F1144 168 Q F0(is supplied with a)2.5 E F2(name)2.5 E F0(that is not a function.)2.5 E F1(fc)108 184.8 Q F0([) 2.5 E F1A F2(ename)2.5 E F0 2.5(][)C F1(\255nlr)-2.5 E F0 2.5(][)C F2<8c72>-2.5 E(st)-.1 E F0 2.5(][)C F2(last)-2.5 E F0(])A F1(fc \255s) 108 196.8 Q F0([)2.5 E F2(pat)A F0(=)A F2 -.37(re)C(p).37 E F0 2.5(][)C F2(cmd)-2.5 E F0(])A .665(Fix Command.)144 208.8 R .665 (In the \214rst form, a range of commands from)5.665 F F2<8c72>3.164 E (st)-.1 E F0(to)3.164 E F2(last)3.164 E F0 .664 (is selected from the his-)3.164 F .967(tory list.)144 220.8 R F2 -.45 (Fi)5.967 G -.1(rs).45 G(t).1 E F0(and)3.467 E F2(last)3.467 E F0 .967 (may be speci\214ed as a string \(to locate the last command be)3.467 F .968(ginning with)-.15 F .797(that string\) or as a number \(an inde)144 232.8 R 3.297(xi)-.15 G .797(nto the history list, where a ne)-3.297 F -.05(ga)-.15 G(ti).05 E 1.097 -.15(ve n)-.25 H .796(umber is used as an) .15 F(of)144 244.8 Q .321(fset from the current command number\).)-.25 F (If)5.322 E F2(last)2.822 E F0 .322 (is not speci\214ed it is set to the current command)2.822 F .365 (for listing \(so that)144 256.8 R/F3 10/Courier@0 SF .365 (fc \255l \25510)2.865 F F0 .365(prints the last 10 commands\) and to) 2.865 F F2<8c72>2.865 E(st)-.1 E F0 2.864(otherwise. If)2.864 F F2<8c72> 2.864 E(st)-.1 E F0 .364(is not)2.864 F (speci\214ed it is set to the pre)144 268.8 Q (vious command for editing and \25516 for listing.)-.25 E(The)144 292.8 Q F12.522 E F0 .022 (option suppresses the command numbers when listing.)2.522 F(The)5.022 E F12.522 E F0 .022(option re)2.522 F -.15(ve)-.25 G .022 (rses the order of).15 F .438(the commands.)144 304.8 R .438(If the) 5.438 F F12.938 E F0 .438(option is gi)2.938 F -.15(ve)-.25 G .438 (n, the commands are listed on standard output.).15 F(Otherwise,)5.438 E .378(the editor gi)144 316.8 R -.15(ve)-.25 G 2.878(nb).15 G(y)-2.878 E F2(ename)2.878 E F0 .378(is in)2.878 F -.2(vo)-.4 G -.1(ke).2 G 2.878 (do).1 G 2.878(na\214)-2.878 G .378(le containing those commands.)-2.878 F(If)5.378 E F2(ename)2.879 E F0 .379(is not gi)2.879 F -.15(ve)-.25 G (n,).15 E .631(the v)144 328.8 R .631(alue of the)-.25 F/F4 9 /Times-Bold@0 SF(FCEDIT)3.131 E F0 -.25(va)2.881 G .631 (riable is used, and the v).25 F .631(alue of)-.25 F F4(EDIT)3.131 E(OR) -.162 E F0(if)2.881 E F4(FCEDIT)3.13 E F0 .63(is not set.)2.88 F .63 (If nei-)5.63 F .95(ther v)144 340.8 R .95(ariable is set,)-.25 F F2(vi) 5.116 E F0 .95(is used.)5.116 F .951 (When editing is complete, the edited commands are echoed and)5.95 F -.15(exe)144 352.8 S(cuted.).15 E .04(In the second form,)144 376.8 R F2 (command)2.54 E F0 .04(is re-e)2.54 F -.15(xe)-.15 G .039 (cuted after each instance of).15 F F2(pat)2.539 E F0 .039 (is replaced by)2.539 F F2 -.37(re)2.539 G(p).37 E F0 5.039(.A)C(useful) -2.5 E .406(alias to use with this is)144 388.8 R F3 .406(r='fc \255s') 2.906 F F0 2.906(,s)C 2.906(ot)-2.906 G .406(hat typing)-2.906 F F3 6.406(rc)2.906 G(c)-6.406 E F0 .406(runs the last command be)2.906 F .407(ginning with)-.15 F F3(cc)144 400.8 Q F0(and typing)2.5 E F3(r)2.5 E F0(re-e)2.5 E -.15(xe)-.15 G(cutes the last command.).15 E .31 (If the \214rst form is used, the return v)144 424.8 R .31 (alue is 0 unless an in)-.25 F -.25(va)-.4 G .31 (lid option is encountered or).25 F F2<8c72>2.81 E(st)-.1 E F0(or)2.81 E F2(last)2.81 E F0 .454(specify history lines out of range.)144 436.8 R .454(If the)5.454 F F12.954 E F0 .454 (option is supplied, the return v)2.954 F .455(alue is the v)-.25 F .455 (alue of the)-.25 F .788(last command e)144 448.8 R -.15(xe)-.15 G .788 (cuted or f).15 F .787 (ailure if an error occurs with the temporary \214le of commands.)-.1 F .787(If the)5.787 F 1.196 (second form is used, the return status is that of the command re-e)144 460.8 R -.15(xe)-.15 G 1.197(cuted, unless).15 F F2(cmd)3.697 E F0 1.197 (does not)3.697 F(specify a v)144 472.8 Q (alid history line, in which case)-.25 E F1(fc)2.5 E F0(returns f)2.5 E (ailure.)-.1 E F1(fg)108 489.6 Q F0([)2.5 E F2(jobspec)A F0(])A(Resume) 144 501.6 Q F2(jobspec)4.17 E F0 1.67(in the fore)4.17 F 1.67 (ground, and mak)-.15 F 4.169(ei)-.1 G 4.169(tt)-4.169 G 1.669 (he current job)-4.169 F 6.669(.I)-.4 G(f)-6.669 E F2(jobspec)4.169 E F0 1.669(is not present, the)4.169 F(shell')144 513.6 Q 3.116(sn)-.55 G .616(otion of the)-3.116 F F2(curr)3.116 E .616(ent job)-.37 F F0 .617 (is used.)3.116 F .617(The return v)5.617 F .617 (alue is that of the command placed into the)-.25 F(fore)144 525.6 Q .363(ground, or f)-.15 F .363 (ailure if run when job control is disabled or)-.1 F 2.862(,w)-.4 G .362 (hen run with job control enabled, if)-2.862 F F2(jobspec)144 537.6 Q F0 .245(does not specify a v)2.745 F .245(alid job or)-.25 F F2(jobspec) 2.745 E F0 .245(speci\214es a job that w)2.745 F .246 (as started without job control.)-.1 F F1(getopts)108 554.4 Q F2 (optstring name)2.5 E F0([)2.5 E F2(ar)A(gs)-.37 E F0(])A F1(getopts)144 566.4 Q F0 .828 (is used by shell procedures to parse positional parameters.)3.328 F F2 (optstring)5.827 E F0 .827(contains the option)3.327 F .149 (characters to be recognized; if a character is follo)144 578.4 R .15 (wed by a colon, the option is e)-.25 F .15(xpected to ha)-.15 F .45 -.15(ve a)-.2 H(n).15 E(ar)144 590.4 Q .579 (gument, which should be separated from it by white space.)-.18 F .578 (The colon and question mark char)5.579 F(-)-.2 E 1.665 (acters may not be used as option characters.)144 602.4 R 1.665 (Each time it is in)6.665 F -.2(vo)-.4 G -.1(ke).2 G(d,).1 E F1(getopts) 4.165 E F0 1.665(places the ne)4.165 F(xt)-.15 E .827 (option in the shell v)144 614.4 R(ariable)-.25 E F2(name)3.327 E F0 3.327(,i).18 G(nitializing)-3.327 E F2(name)3.327 E F0 .827 (if it does not e)3.327 F .826(xist, and the inde)-.15 F 3.326(xo)-.15 G 3.326(ft)-3.326 G .826(he ne)-3.326 F(xt)-.15 E(ar)144 626.4 Q .085 (gument to be processed into the v)-.18 F(ariable)-.25 E F4(OPTIND)2.585 E/F5 9/Times-Roman@0 SF(.)A F4(OPTIND)4.585 E F0 .085 (is initialized to 1 each time the shell)2.335 F .846 (or a shell script is in)144 638.4 R -.2(vo)-.4 G -.1(ke).2 G 3.345 (d. When).1 F .845(an option requires an ar)3.345 F(gument,)-.18 E F1 (getopts)3.345 E F0 .845(places that ar)3.345 F(gument)-.18 E .803 (into the v)144 650.4 R(ariable)-.25 E F4(OPT)3.303 E(ARG)-.81 E F5(.)A F0 .803(The shell does not reset)5.303 F F4(OPTIND)3.303 E F0 .804 (automatically; it must be manually)3.054 F .294 (reset between multiple calls to)144 662.4 R F1(getopts)2.793 E F0 .293 (within the same shell in)2.793 F -.2(vo)-.4 G .293(cation if a ne).2 F 2.793(ws)-.25 G .293(et of parameters)-2.793 F(is to be used.)144 674.4 Q 2.043(When the end of options is encountered,)144 698.4 R F1(getopts) 4.543 E F0 -.15(ex)4.543 G 2.043(its with a return v).15 F 2.044 (alue greater than zero.)-.25 F F1(OPTIND)144 710.4 Q F0 (is set to the inde)2.5 E 2.5(xo)-.15 G 2.5(ft)-2.5 G (he \214rst non-option ar)-2.5 E(gument, and)-.18 E F1(name)2.5 E F0 (is set to ?.)2.5 E(GNU Bash-2.05a)72 768 Q(2001 No)126.115 E -.15(ve) -.15 G(mber 13).15 E(46)185.545 E EP %%Page: 47 47 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\)) -.35 E/F1 10/Times-Bold@0 SF(getopts)144 84 Q F0 2.393 (normally parses the positional parameters, b)4.893 F 2.392 (ut if more ar)-.2 F 2.392(guments are gi)-.18 F -.15(ve)-.25 G 4.892 (ni).15 G(n)-4.892 E/F2 10/Times-Italic@0 SF(ar)4.892 E(gs)-.37 E F0(,) .27 E F1(getopts)144 96 Q F0(parses those instead.)2.5 E F1(getopts)144 120 Q F0 1.251(can report errors in tw)3.751 F 3.752(ow)-.1 G 3.752 (ays. If)-3.852 F 1.252(the \214rst character of)3.752 F F2(optstring) 3.752 E F0 1.252(is a colon,)3.752 F F2(silent)3.752 E F0(error)3.752 E 1.264(reporting is used.)144 132 R 1.263 (In normal operation diagnostic messages are printed when in)6.263 F -.25(va)-.4 G 1.263(lid options or).25 F .393(missing option ar)144 144 R .393(guments are encountered.)-.18 F .394(If the v)5.394 F(ariable) -.25 E/F3 9/Times-Bold@0 SF(OPTERR)2.894 E F0 .394 (is set to 0, no error messages)2.644 F(will be displayed, e)144 156 Q -.15(ve)-.25 G 2.5(ni).15 G 2.5(ft)-2.5 G(he \214rst character of)-2.5 E F2(optstring)2.5 E F0(is not a colon.)2.5 E .697(If an in)144 180 R -.25 (va)-.4 G .697(lid option is seen,).25 F F1(getopts)3.197 E F0 .697 (places ? into)3.197 F F2(name)3.197 E F0 .696 (and, if not silent, prints an error message)3.197 F .399(and unsets)144 192 R F3(OPT)2.899 E(ARG)-.81 E/F4 9/Times-Roman@0 SF(.)A F0(If)4.899 E F1(getopts)2.899 E F0 .399 (is silent, the option character found is placed in)2.899 F F3(OPT)2.899 E(ARG)-.81 E F0 .4(and no)2.65 F(diagnostic message is printed.)144 204 Q 1.242(If a required ar)144 228 R 1.242(gument is not found, and)-.18 F F1(getopts)3.741 E F0 1.241(is not silent, a question mark \()3.741 F F1 (?).833 E F0 3.741(\)i).833 G 3.741(sp)-3.741 G 1.241(laced in)-3.741 F F2(name)144 240 Q F0(,).18 E F3(OPT)2.734 E(ARG)-.81 E F0 .234 (is unset, and a diagnostic message is printed.)2.484 F(If)5.234 E F1 (getopts)2.734 E F0 .235(is silent, then a colon \()2.734 F F1(:).833 E F0(\)).833 E(is placed in)144 252 Q F2(name)2.5 E F0(and)2.5 E F3(OPT) 2.5 E(ARG)-.81 E F0(is set to the option character found.)2.25 E F1 (getopts)144 276 Q F0 .902 (returns true if an option, speci\214ed or unspeci\214ed, is found.) 3.402 F .902(It returns f)5.902 F .901(alse if the end of)-.1 F (options is encountered or an error occurs.)144 288 Q F1(hash)108 304.8 Q F0([)2.5 E F1A F0 2.5(][)C F1-2.5 E F2(\214lename)2.5 E F0 2.5(][)C F1-2.5 E F0 2.5(][)C F2(name)-2.5 E F0(])A -.15(Fo)144 316.8 S 3.554(re).15 G(ach)-3.554 E F2(name)3.554 E F0 3.554(,t).18 G 1.054(he full \214le name of the command is determined by searching the\ directories in)-3.554 F F1($P)144 328.8 Q -.95(AT)-.74 G(H).95 E F0 .489(and remembered.)2.989 F .489(If the)5.489 F F12.989 E F0 .489 (option is supplied, no path search is performed, and)2.989 F F2 (\214lename)2.988 E F0 .452 (is used as the full \214le name of the command.)144 340.8 R(The)5.452 E F12.952 E F0 .452(option causes the shell to for)2.952 F .453 (get all remem-)-.18 F .249(bered locations.)144 352.8 R .248(If the) 5.249 F F12.748 E F0 .248 (option is supplied, the full pathname to which each)2.748 F F2(name) 2.748 E F0 .248(corresponds is)2.748 F 3.314(printed. If)144 364.8 R (multiple)3.314 E F2(name)3.314 E F0(ar)3.314 E .814 (guments are supplied with)-.18 F F13.314 E F0 3.314(,t)C(he) -3.314 E F2(name)3.314 E F0 .814(is printed before the hashed)3.314 F 1.11(full pathname.)144 376.8 R 1.109(If no ar)6.11 F 1.109 (guments are gi)-.18 F -.15(ve)-.25 G 1.109 (n, information about remembered commands is printed.).15 F (The return status is true unless a)144 388.8 Q F2(name)2.5 E F0 (is not found or an in)2.5 E -.25(va)-.4 G(lid option is supplied.).25 E F1(help)108 405.6 Q F0([)2.5 E F1A F0 2.5(][)C F2(pattern)-2.5 E F0(])A .99(Display helpful information about b)144 417.6 R .991 (uiltin commands.)-.2 F(If)5.991 E F2(pattern)3.491 E F0 .991 (is speci\214ed,)3.491 F F1(help)3.491 E F0(gi)3.491 E -.15(ve)-.25 G 3.491(sd).15 G(etailed)-3.491 E .307(help on all commands matching)144 429.6 R F2(pattern)2.807 E F0 2.807(;o).24 G .307 (therwise help for all the b)-2.807 F .306 (uiltins and shell control struc-)-.2 F .596(tures is printed.)144 441.6 R(The)5.596 E F13.096 E F0 .596 (option restricts the information displayed to a short usage synopsis.) 3.096 F(The)5.596 E(return status is 0 unless no command matches)144 453.6 Q F2(pattern)2.5 E F0(.).24 E F1(history [)108 470.4 Q F2(n)A F1 (])A(history \255c)108 482.4 Q(history \255d)108 494.4 Q F2(of)2.5 E (fset)-.18 E F1(history \255anrw)108 506.4 Q F0([)2.5 E F2(\214lename)A F0(])A F1(history \255p)108 518.4 Q F2(ar)2.5 E(g)-.37 E F0([)2.5 E F2 (ar)A 2.5(g.)-.37 G(..)-2.5 E F0(])A F1(history \255s)108 530.4 Q F2(ar) 2.5 E(g)-.37 E F0([)2.5 E F2(ar)A 2.5(g.)-.37 G(..)-2.5 E F0(])A -.4(Wi) 144 542.4 S .752 (th no options, display the command history list with line numbers.).4 F .752(Lines listed with a)5.752 F F1(*)3.251 E F0(ha)3.251 E -.15(ve)-.2 G .764(been modi\214ed.)144 554.4 R .764(An ar)5.764 F .764(gument of) -.18 F F2(n)3.264 E F0 .765(lists only the last)3.265 F F2(n)3.265 E F0 3.265(lines. If)3.265 F F2(\214lename)3.265 E F0 .765 (is supplied, it is used as)3.265 F .567 (the name of the history \214le; if not, the v)144 566.4 R .566(alue of) -.25 F F3(HISTFILE)3.066 E F0 .566(is used.)2.816 F .566 (Options, if supplied, ha)5.566 F .866 -.15(ve t)-.2 H(he).15 E(follo) 144 578.4 Q(wing meanings:)-.25 E F1144 590.4 Q F0 (Clear the history list by deleting all the entries.)25.86 E F1144 602.4 Q F2(of)2.5 E(fset)-.18 E F0(Delete the history entry at position) 180 614.4 Q F2(of)2.5 E(fset)-.18 E F0(.)A F1144 626.4 Q F0 .598 (Append the `)25.3 F(`ne)-.74 E(w')-.25 E 3.098('h)-.74 G .598 (istory lines \(history lines entered since the be)-3.098 F .599 (ginning of the current)-.15 F F1(bash)180 638.4 Q F0 (session\) to the history \214le.)2.5 E F1144 650.4 Q F0 .854(Rea\ d the history lines not already read from the history \214le into the c\ urrent history list.)24.74 F .772 (These are lines appended to the history \214le since the be)180 662.4 R .773(ginning of the current)-.15 F F1(bash)3.273 E F0(ses-)3.273 E (sion.)180 674.4 Q F1144 686.4 Q F0(Read the contents of the hist\ ory \214le and use them as the current history)25.86 E(.)-.65 E F1 144 698.4 Q F0(Write the current history to the history \214le, o)23.08 E -.15(ve)-.15 G(rwriting the history \214le').15 E 2.5(sc)-.55 G (ontents.)-2.5 E F1144 710.4 Q F0 .626 (Perform history substitution on the follo)24.74 F(wing)-.25 E F2(ar) 3.125 E(gs)-.37 E F0 .625(and display the result on the standard)3.125 F 2.975(output. Does)180 722.4 R .475 (not store the results in the history list.)2.975 F(Each)5.475 E F2(ar) 2.975 E(g)-.37 E F0 .475(must be quoted to disable)2.975 F (GNU Bash-2.05a)72 768 Q(2001 No)126.115 E -.15(ve)-.15 G(mber 13).15 E (47)185.545 E EP %%Page: 48 48 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\)) -.35 E(normal history e)180 84 Q(xpansion.)-.15 E/F1 10/Times-Bold@0 SF 144 96 Q F0 .397(Store the)26.41 F/F2 10/Times-Italic@0 SF(ar) 2.897 E(gs)-.37 E F0 .396(in the history list as a single entry)2.896 F 5.396(.T)-.65 G .396(he last command in the history list is)-5.396 F (remo)180 108 Q -.15(ve)-.15 G 2.5(db).15 G(efore the)-2.5 E F2(ar)2.5 E (gs)-.37 E F0(are added.)2.5 E .051(The return v)144 124.8 R .051 (alue is 0 unless an in)-.25 F -.25(va)-.4 G .051 (lid option is encountered, an error occurs while reading or writ-).25 F .082(ing the history \214le, an in)144 136.8 R -.25(va)-.4 G(lid).25 E F2(of)2.582 E(fset)-.18 E F0 .082(is supplied as an ar)2.582 F .082 (gument to)-.18 F F12.581 E F0 2.581(,o)C 2.581(rt)-2.581 G .081 (he history e)-2.581 F .081(xpansion sup-)-.15 F(plied as an ar)144 148.8 Q(gument to)-.18 E F12.5 E F0 -.1(fa)2.5 G(ils.).1 E F1 (jobs)108 165.6 Q F0([)2.5 E F1(\255lnprs)A F0 2.5(][)C F2(jobspec)A F0 (... ])2.5 E F1(jobs \255x)108 177.6 Q F2(command)2.5 E F0([)2.5 E F2 (ar)2.5 E(gs)-.37 E F0(... ])2.5 E(The \214rst form lists the acti)144 189.6 Q .3 -.15(ve j)-.25 H 2.5(obs. The).15 F(options ha)2.5 E .3 -.15 (ve t)-.2 H(he follo).15 E(wing meanings:)-.25 E F1144 201.6 Q F0 (List process IDs in addition to the normal information.)27.52 E F1 144 213.6 Q F0(List only the process ID of the job')24.74 E 2.5 (sp)-.55 G(rocess group leader)-2.5 E(.)-.55 E F1144 225.6 Q F0 .193(Display information only about jobs that ha)24.74 F .494 -.15(ve c) -.2 H .194(hanged status since the user w).15 F .194(as last noti-)-.1 F (\214ed of their status.)180 237.6 Q F1144 249.6 Q F0 (Restrict output to running jobs.)25.86 E F1144 261.6 Q F0 (Restrict output to stopped jobs.)26.41 E(If)144 278.4 Q F2(jobspec) 2.935 E F0 .434(is gi)2.935 F -.15(ve)-.25 G .434 (n, output is restricted to information about that job).15 F 5.434(.T) -.4 G .434(he return status is 0 unless)-5.434 F(an in)144 290.4 Q -.25 (va)-.4 G(lid option is encountered or an in).25 E -.25(va)-.4 G(lid).25 E F2(jobspec)2.5 E F0(is supplied.)2.5 E .607(If the)144 307.2 R F1 3.107 E F0 .607(option is supplied,)3.107 F F1(jobs)3.107 E F0 .607(replaces an)3.107 F(y)-.15 E F2(jobspec)3.107 E F0 .607(found in) 3.107 F F2(command)3.107 E F0(or)3.107 E F2(ar)3.107 E(gs)-.37 E F0 .607 (with the corre-)3.107 F(sponding process group ID, and e)144 319.2 Q -.15(xe)-.15 G(cutes).15 E F2(command)2.5 E F0(passing it)2.5 E F2(ar) 2.5 E(gs)-.37 E F0 2.5(,r).27 G(eturning its e)-2.5 E(xit status.)-.15 E F1(kill)108 336 Q F0([)2.5 E F1A F2(sigspec)2.5 E F0(|)2.5 E F1 2.5 E F2(signum)2.5 E F0(|)2.5 E F12.5 E F2(sigspec)A F0 2.5 (][)C F2(pid)-2.5 E F0(|)2.5 E F2(jobspec)2.5 E F0 2.5(].)C(..)-2.5 E F1 (kill \255l)108 348 Q F0([)2.5 E F2(sigspec)A F0(|)2.5 E F2 -.2(ex)2.5 G (it_status).2 E F0(])A .354(Send the signal named by)144 360 R F2 (sigspec)2.854 E F0(or)2.854 E F2(signum)2.854 E F0 .353 (to the processes named by)2.854 F F2(pid)2.853 E F0(or)2.853 E F2 (jobspec)2.853 E F0(.).31 E F2(sigspec)5.353 E F0(is)2.853 E .12 (either a signal name such as)144 372 R/F3 9/Times-Bold@0 SF(SIGKILL) 2.62 E F0 .12(or a signal number;)2.37 F F2(signum)2.62 E F0 .12 (is a signal number)2.62 F 5.121(.I)-.55 G(f)-5.121 E F2(sigspec)2.621 E F0(is)2.621 E 3.431(as)144 384 S .93(ignal name, the name may be gi) -3.431 F -.15(ve)-.25 G 3.43(nw).15 G .93(ith or without the)-3.43 F F3 (SIG)3.43 E F0 3.43(pre\214x. If)3.18 F F2(sigspec)3.43 E F0 .93 (is not present,)3.43 F(then)144 396 Q F3(SIGTERM)3.072 E F0 .572 (is assumed.)2.822 F .572(An ar)5.572 F .572(gument of)-.18 F F1 3.072 E F0 .572(lists the signal names.)3.072 F .572(If an)5.572 F 3.072 (ya)-.15 G -.18(rg)-3.072 G .572(uments are sup-).18 F .268(plied when) 144 408 R F12.767 E F0 .267(is gi)2.767 F -.15(ve)-.25 G .267 (n, the names of the signals corresponding to the ar).15 F .267 (guments are listed, and the)-.18 F .287(return status is 0.)144 420 R (The)5.287 E F2 -.2(ex)2.787 G(it_status).2 E F0(ar)2.787 E .288 (gument to)-.18 F F12.788 E F0 .288 (is a number specifying either a signal number or)2.788 F .552(the e)144 432 R .551(xit status of a process terminated by a signal.)-.15 F F1 (kill)5.551 E F0 .551(returns true if at least one signal w)3.051 F .551 (as suc-)-.1 F(cessfully sent, or f)144 444 Q (alse if an error occurs or an in)-.1 E -.25(va)-.4 G (lid option is encountered.).25 E F1(let)108 460.8 Q F2(ar)2.5 E(g)-.37 E F0([)2.5 E F2(ar)A(g)-.37 E F0(...])2.5 E(Each)144 472.8 Q F2(ar)3.676 E(g)-.37 E F0 1.177(is an arithmetic e)3.676 F 1.177(xpression to be e) -.15 F -.25(va)-.25 G 1.177(luated \(see).25 F F3 1.177(ARITHMETIC EV) 3.677 F(ALU)-1.215 E -.855(AT)-.54 G(ION).855 E/F4 9/Times-Roman@0 SF (\).)A F0 1.177(If the)5.677 F(last)144 484.8 Q F2(ar)2.5 E(g)-.37 E F0 -.25(eva)2.5 G(luates to 0,).25 E F1(let)2.5 E F0 (returns 1; 0 is returned otherwise.)2.5 E F1(local)108 501.6 Q F0([)2.5 E F2(option)A F0 2.5(][)C F2(name)-2.5 E F0([=)A F2(value)A F0 2.5(].)C (..])-2.5 E -.15(Fo)144 513.6 S 2.594(re).15 G .094(ach ar)-2.594 F .094 (gument, a local v)-.18 F .094(ariable named)-.25 F F2(name)2.594 E F0 .094(is created, and assigned)2.594 F F2(value)2.594 E F0 5.093(.T).18 G (he)-5.093 E F2(option)2.593 E F0 .093(can be)2.593 F(an)144 525.6 Q 3.152(yo)-.15 G 3.152(ft)-3.152 G .652(he options accepted by)-3.152 F F1(declar)3.152 E(e)-.18 E F0 5.652(.W)C(hen)-5.652 E F1(local)3.152 E F0 .653(is used within a function, it causes the v)3.152 F(ari-)-.25 E (able)144 537.6 Q F2(name)3.395 E F0 .895(to ha)3.395 F 1.195 -.15 (ve a v)-.2 H .894 (isible scope restricted to that function and its children.).15 F -.4 (Wi)5.894 G .894(th no operands,).4 F F1(local)144 549.6 Q F0 1.164 (writes a list of local v)3.664 F 1.165 (ariables to the standard output.)-.25 F 1.165(It is an error to use) 6.165 F F1(local)3.665 E F0 1.165(when not)3.665 F .263 (within a function.)144 561.6 R .263(The return status is 0 unless)5.263 F F1(local)2.763 E F0 .263(is used outside a function, an in)2.763 F -.25(va)-.4 G(lid).25 E F2(name)2.762 E F0(is)2.762 E(supplied, or)144 573.6 Q F2(name)2.5 E F0(is a readonly v)2.5 E(ariable.)-.25 E F1 (logout)108 590.4 Q F0(Exit a login shell.)9.33 E F1(popd)108 607.2 Q F0 <5bad>2.5 E F1(n)A F0 2.5(][)C(+)-2.5 E F2(n)A F0 2.5(][)C-2.5 E F2 (n)A F0(])A(Remo)144 619.2 Q -.15(ve)-.15 G 2.799(se).15 G .299 (ntries from the directory stack.)-2.799 F -.4(Wi)5.299 G .299(th no ar) .4 F .299(guments, remo)-.18 F -.15(ve)-.15 G 2.799(st).15 G .3 (he top directory from the)-2.799 F 1.479(stack, and performs a)144 631.2 R F1(cd)3.979 E F0 1.479(to the ne)3.979 F 3.979(wt)-.25 G 1.479 (op directory)-3.979 F 6.479(.A)-.65 G -.18(rg)-6.479 G 1.478 (uments, if supplied, ha).18 F 1.778 -.15(ve t)-.2 H 1.478(he follo).15 F(wing)-.25 E(meanings:)144 643.2 Q F1(+)144 655.2 Q F2(n)A F0(Remo)25.3 E -.15(ve)-.15 G 2.64(st).15 G(he)-2.64 E F2(n)2.64 E F0 .14 (th entry counting from the left of the list sho)B .14(wn by)-.25 F F1 (dirs)2.64 E F0 2.64(,s)C .14(tarting with zero.)-2.64 F -.15(Fo)180 667.2 S 2.5(re).15 G(xample:)-2.65 E/F5 10/Courier@0 SF(popd +0)2.5 E F0 (remo)2.5 E -.15(ve)-.15 G 2.5(st).15 G(he \214rst directory)-2.5 E(,) -.65 E F5(popd +1)2.5 E F0(the second.)2.5 E F1144 679.2 Q F2(n)A F0 (Remo)25.3 E -.15(ve)-.15 G 3.76(st).15 G(he)-3.76 E F2(n)3.76 E F0 1.259(th entry counting from the right of the list sho)B 1.259(wn by) -.25 F F1(dirs)3.759 E F0 3.759(,s)C 1.259(tarting with)-3.759 F 2.5 (zero. F)180 691.2 R(or e)-.15 E(xample:)-.15 E F5(popd -0)2.5 E F0 (remo)2.5 E -.15(ve)-.15 G 2.5(st).15 G(he last directory)-2.5 E(,)-.65 E F5(popd -1)2.5 E F0(the ne)2.5 E(xt to last.)-.15 E F1144 703.2 Q F0 .551(Suppresses the normal change of directory when remo)24.74 F .551(ving directories from the stack, so)-.15 F (that only the stack is manipulated.)180 715.2 Q(GNU Bash-2.05a)72 768 Q (2001 No)126.115 E -.15(ve)-.15 G(mber 13).15 E(48)185.545 E EP %%Page: 49 49 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\)) -.35 E .644(If the)144 84 R/F1 10/Times-Bold@0 SF(popd)3.144 E F0 .644 (command is successful, a)3.144 F F1(dirs)3.143 E F0 .643 (is performed as well, and the return status is 0.)3.143 F F1(popd)5.643 E F0 .415(returns f)144 96 R .415(alse if an in)-.1 F -.25(va)-.4 G .415 (lid option is encountered, the directory stack is empty).25 F 2.916 (,an)-.65 G(on-e)-2.916 E .416(xistent direc-)-.15 F (tory stack entry is speci\214ed, or the directory change f)144 108 Q (ails.)-.1 E F1(printf)108 124.8 Q/F2 10/Times-Italic@0 SF(format)2.5 E F0([)2.5 E F2(ar)A(guments)-.37 E F0(])A .372(Write the formatted)144 136.8 R F2(ar)2.872 E(guments)-.37 E F0 .372 (to the standard output under the control of the)2.872 F F2(format)2.872 E F0 5.372(.T)C(he)-5.372 E F2(format)2.872 E F0 1.804(is a character s\ tring which contains three types of objects: plain characters, which ar\ e simply)144 148.8 R .159 (copied to standard output, character escape sequences, which are con) 144 160.8 R -.15(ve)-.4 G .158(rted and copied to the stan-).15 F .499(\ dard output, and format speci\214cations, each of which causes printing\ of the ne)144 172.8 R .5(xt successi)-.15 F -.15(ve)-.25 G F2(ar)3.15 E (gu-)-.37 E(ment)144 184.8 Q F0 5.424(.I)C 2.924(na)-5.424 G .424 (ddition to the standard)-2.924 F F2(printf)2.924 E F0 .424 (\(1\) formats,)B F1(%b)2.924 E F0(causes)2.923 E F1(printf)2.923 E F0 .423(to e)2.923 F .423(xpand backslash escape)-.15 F 1.993 (sequences in the corresponding)144 196.8 R F2(ar)4.493 E(gument)-.37 E F0 4.493(,a)C(nd)-4.493 E F1(%q)4.493 E F0(causes)4.493 E F1(printf) 4.493 E F0 1.994(to output the corresponding)4.494 F F2(ar)144 208.8 Q (gument)-.37 E F0(in a format that can be reused as shell input.)2.5 E (The)144 232.8 Q F2(format)3.424 E F0 .923 (is reused as necessary to consume all of the)3.424 F F2(ar)3.423 E (guments)-.37 E F0 5.923(.I)C 3.423(ft)-5.923 G(he)-3.423 E F2(format) 3.423 E F0 .923(requires more)3.423 F F2(ar)144 244.8 Q(guments)-.37 E F0 .033(than are supplied, the e)2.533 F .033 (xtra format speci\214cations beha)-.15 F .333 -.15(ve a)-.2 H 2.533(si) .15 G 2.533(faz)-2.533 G .033(ero v)-2.533 F .034(alue or null string,) -.25 F(as appropriate, had been supplied.)144 256.8 Q(The return v)5 E (alue is zero on success, non-zero on f)-.25 E(ailure.)-.1 E F1(pushd) 108 273.6 Q F0([)2.5 E F1A F0 2.5(][)C F2(dir)-2.5 E F0(])A F1 (pushd)108 285.6 Q F0([)2.5 E F1A F0 2.5(][)C(+)-2.5 E F2(n)A F0 2.5(][)C-2.5 E F2(n)A F0(])A .64(Adds a directory to the top of the\ directory stack, or rotates the stack, making the ne)144 297.6 R 3.139 (wt)-.25 G .639(op of the)-3.139 F 1.315(stack the current w)144 309.6 R 1.315(orking directory)-.1 F 6.315(.W)-.65 G 1.315(ith no ar)-6.715 F 1.315(guments, e)-.18 F 1.316(xchanges the top tw)-.15 F 3.816(od)-.1 G 1.316(irectories and)-3.816 F .872 (returns 0, unless the directory stack is empty)144 321.6 R 5.871(.A) -.65 G -.18(rg)-5.871 G .871(uments, if supplied, ha).18 F 1.171 -.15 (ve t)-.2 H .871(he follo).15 F .871(wing mean-)-.25 F(ings:)144 333.6 Q F1(+)144 345.6 Q F2(n)A F0 1.267(Rotates the stack so that the)25.3 F F2 (n)3.767 E F0 1.268 (th directory \(counting from the left of the list sho)B 1.268(wn by) -.25 F F1(dirs)180 357.6 Q F0 2.5(,s)C (tarting with zero\) is at the top.)-2.5 E F1144 369.6 Q F2(n)A F0 .92(Rotates the stack so that the)25.3 F F2(n)3.42 E F0 .92 (th directory \(counting from the right of the list sho)B .92(wn by)-.25 F F1(dirs)180 381.6 Q F0 2.5(,s)C(tarting with zero\) is at the top.) -2.5 E F1144 393.6 Q F0 .902(Suppresses the normal change of dire\ ctory when adding directories to the stack, so that)24.74 F (only the stack is manipulated.)180 405.6 Q F2(dir)144 417.6 Q F0(Adds) 24.33 E F2(dir)2.5 E F0 (to the directory stack at the top, making it the ne)2.5 E 2.5(wc)-.25 G (urrent w)-2.5 E(orking directory)-.1 E(.)-.65 E .489(If the)144 434.4 R F1(pushd)2.989 E F0 .489(command is successful, a)2.989 F F1(dirs)2.988 E F0 .488(is performed as well.)2.988 F .488 (If the \214rst form is used,)5.488 F F1(pushd)2.988 E F0 1.103 (returns 0 unless the cd to)144 446.4 R F2(dir)3.603 E F0 -.1(fa)3.603 G 3.603(ils. W).1 F 1.103(ith the second form,)-.4 F F1(pushd)3.603 E F0 1.103(returns 0 unless the directory)3.603 F .847(stack is empty)144 458.4 R 3.347(,an)-.65 G(on-e)-3.347 E .847(xistent directory stack ele\ ment is speci\214ed, or the directory change to the)-.15 F (speci\214ed ne)144 470.4 Q 2.5(wc)-.25 G(urrent directory f)-2.5 E (ails.)-.1 E F1(pwd)108 487.2 Q F0([)2.5 E F1(\255LP)A F0(])A .844 (Print the absolute pathname of the current w)144 499.2 R .845 (orking directory)-.1 F 5.845(.T)-.65 G .845 (he pathname printed contains no)-5.845 F .182(symbolic links if the)144 511.2 R F12.681 E F0 .181(option is supplied or the)2.681 F F1 .181(\255o ph)2.681 F(ysical)-.15 E F0 .181(option to the)2.681 F F1 (set)2.681 E F0 -.2(bu)2.681 G .181(iltin command is).2 F 3.263 (enabled. If)144 523.2 R(the)3.263 E F13.263 E F0 .763 (option is used, the pathname printed may contain symbolic links.)3.263 F .764(The return)5.764 F 1.36(status is 0 unless an error occurs while\ reading the name of the current directory or an in)144 535.2 R -.25(va) -.4 G(lid).25 E(option is supplied.)144 547.2 Q F1 -.18(re)108 564 S(ad) .18 E F0([)2.5 E F1(\255ers)A F0 2.5(][)C F1-2.5 E F2(timeout)2.5 E F0 2.5(][)C F1-2.5 E F2(aname)2.5 E F0 2.5(][)C F1-2.5 E F2(pr)2.5 E(ompt)-.45 E F0 2.5(][)C F1-2.5 E F2(nc)2.5 E(har)-.15 E(s)-.1 E F0 2.5(][)C F1-2.5 E F2(delim)2.5 E F0 2.5(][)C F2(name) -2.5 E F0(...])2.5 E .036 (One line is read from the standard input, and the \214rst w)144 576 R .037(ord is assigned to the \214rst)-.1 F F2(name)2.537 E F0 2.537(,t) .18 G .037(he second)-2.537 F -.1(wo)144 588 S .27(rd to the second).1 F F2(name)2.77 E F0 2.77(,a).18 G .269(nd so on, with lefto)-2.77 F -.15 (ve)-.15 G 2.769(rw).15 G .269(ords and their interv)-2.869 F .269 (ening separators assigned)-.15 F .335(to the last)144 600 R F2(name) 2.836 E F0 5.336(.I).18 G 2.836(ft)-5.336 G .336(here are fe)-2.836 F .336(wer w)-.25 F .336 (ords read from the standard input than names, the remaining)-.1 F .304 (names are assigned empty v)144 612 R 2.804(alues. The)-.25 F .304 (characters in)2.804 F/F3 9/Times-Bold@0 SF(IFS)2.804 E F0 .304 (are used to split the line into w)2.554 F 2.803(ords. The)-.1 F .177 (backslash character \()144 624 R F1(\\)A F0 2.677(\)m)C .177 (ay be used to remo)-2.677 F .477 -.15(ve a)-.15 H .478 -.15(ny s).15 H .178(pecial meaning for the ne).15 F .178(xt character read and)-.15 F (for line continuation.)144 636 Q(Options, if supplied, ha)5 E .3 -.15 (ve t)-.2 H(he follo).15 E(wing meanings:)-.25 E F1144 648 Q F2 (aname)2.5 E F0 1.05(The w)180 660 R 1.049 (ords are assigned to sequential indices of the array v)-.1 F(ariable) -.25 E F2(aname)3.549 E F0 3.549(,s).18 G 1.049(tarting at 0.)-3.549 F F2(aname)180 672 Q F0(is unset before an)2.5 E 2.5(yn)-.15 G .5 -.25 (ew va)-2.5 H(lues are assigned.).25 E(Other)5 E F2(name)2.5 E F0(ar)2.5 E(guments are ignored.)-.18 E F1144 684 Q F2(delim)2.5 E F0 (The \214rst character of)180 696 Q F2(delim)2.5 E F0 (is used to terminate the input line, rather than ne)2.5 E(wline.)-.25 E F1144 708 Q F0 .372 (If the standard input is coming from a terminal,)25.86 F F1 -.18(re) 2.873 G(adline).18 E F0(\(see)2.873 E F3(READLINE)2.873 E F0(abo)2.623 E -.15(ve)-.15 G 2.873(\)i).15 G 2.873(su)-2.873 G(sed)-2.873 E (to obtain the line.)180 720 Q(GNU Bash-2.05a)72 768 Q(2001 No)126.115 E -.15(ve)-.15 G(mber 13).15 E(49)185.545 E EP %%Page: 50 50 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\)) -.35 E/F1 10/Times-Bold@0 SF144 84 Q/F2 10/Times-Italic@0 SF(nc) 2.5 E(har)-.15 E(s)-.1 E F1 -.18(re)180 96 S(ad).18 E F0 1.395 (returns after reading)3.895 F F2(nc)3.895 E(har)-.15 E(s)-.1 E F0 1.395 (characters rather than w)3.895 F 1.394(aiting for a complete line of) -.1 F(input.)180 108 Q F1144 120 Q F2(pr)2.5 E(ompt)-.45 E F0 (Display)180 132 Q F2(pr)3.66 E(ompt)-.45 E F0 1.161(on standard error) 3.66 F 3.661(,w)-.4 G 1.161(ithout a trailing ne)-3.661 F 1.161 (wline, before attempting to read)-.25 F(an)180 144 Q 2.5(yi)-.15 G 2.5 (nput. The)-2.5 F (prompt is displayed only if input is coming from a terminal.)2.5 E F1 144 156 Q F0 .544(Backslash does not act as an escape character) 25.86 F 5.543(.T)-.55 G .543(he backslash is considered to be part of) -5.543 F(the line.)180 168 Q(In particular)5 E 2.5(,ab)-.4 G (ackslash-ne)-2.5 E(wline pair may not be used as a line continuation.) -.25 E F1144 180 Q F0(Silent mode.)26.41 E (If input is coming from a terminal, characters are not echoed.)5 E F1 144 192 Q F2(timeout)2.5 E F0(Cause)180 204 Q F1 -.18(re)3.548 G (ad).18 E F0 1.048(to time out and return f)3.548 F 1.048 (ailure if a complete line of input is not read within)-.1 F F2(timeout) 180 216 Q F0 2.92(seconds. This)2.92 F .42(option has no ef)2.92 F .42 (fect if)-.25 F F1 -.18(re)2.92 G(ad).18 E F0 .42 (is not reading input from the terminal)2.92 F(or a pipe.)180 228 Q .226 (If no)144 244.8 R F2(names)2.726 E F0 .226 (are supplied, the line read is assigned to the v)2.726 F(ariable)-.25 E /F3 9/Times-Bold@0 SF(REPL)2.727 E(Y)-.828 E/F4 9/Times-Roman@0 SF(.)A F0 .227(The return code is zero,)4.727 F (unless end-of-\214le is encountered or)144 256.8 Q F1 -.18(re)2.5 G(ad) .18 E F0(times out.)2.5 E F1 -.18(re)108 273.6 S(adonly).18 E F0([)2.5 E F1(\255apf)A F0 2.5(][)C F2(name)-2.5 E F0(...])2.5 E .81(The gi)144 285.6 R -.15(ve)-.25 G(n).15 E F2(names)3.31 E F0 .81(are mark)3.31 F .81(ed readonly; the v)-.1 F .809(alues of these)-.25 F F2(names)3.309 E F0 .809(may not be changed by subse-)3.309 F 1.096(quent assignment.)144 297.6 R 1.096(If the)6.096 F F13.596 E F0 1.097 (option is supplied, the functions corresponding to the)3.596 F F2 (names)3.597 E F0 1.097(are so)3.597 F(mark)144 309.6 Q 2.905(ed. The) -.1 F F12.905 E F0 .404(option restricts the v)2.904 F .404 (ariables to arrays.)-.25 F .404(If no)5.404 F F2(name)2.904 E F0(ar) 2.904 E .404(guments are gi)-.18 F -.15(ve)-.25 G .404(n, or if the).15 F F1144 321.6 Q F0 .796 (option is supplied, a list of all readonly names is printed.)3.296 F (The)5.796 E F13.296 E F0 .796(option causes output to be)3.296 F .103(displayed in a format that may be reused as input.)144 333.6 R .103 (The return status is 0 unless an in)5.103 F -.25(va)-.4 G .103 (lid option is).25 F .06(encountered, one of the)144 345.6 R F2(names) 2.56 E F0 .06(is not a v)2.56 F .06(alid shell v)-.25 F .06 (ariable name, or)-.25 F F12.56 E F0 .06(is supplied with a)2.56 F F2(name)2.56 E F0(that)2.56 E(is not a function.)144 357.6 Q F1 -.18(re) 108 374.4 S(tur).18 E(n)-.15 E F0([)2.5 E F2(n)A F0(])A .619 (Causes a function to e)144 386.4 R .619(xit with the return v)-.15 F .618(alue speci\214ed by)-.25 F F2(n)3.118 E F0 5.618(.I).24 G(f)-5.618 E F2(n)3.118 E F0 .618(is omitted, the return status is)3.118 F 1.335 (that of the last command e)144 398.4 R -.15(xe)-.15 G 1.335 (cuted in the function body).15 F 6.335(.I)-.65 G 3.835(fu)-6.335 G 1.335(sed outside a function, b)-3.835 F 1.335(ut during)-.2 F -.15(exe) 144 410.4 S .794(cution of a script by the).15 F F1(.)3.294 E F0(\() 5.794 E F1(sour)A(ce)-.18 E F0 3.294(\)c)C .794 (ommand, it causes the shell to stop e)-3.294 F -.15(xe)-.15 G .794 (cuting that script).15 F .277(and return either)144 422.4 R F2(n)2.777 E F0 .277(or the e)2.777 F .277(xit status of the last command e)-.15 F -.15(xe)-.15 G .278(cuted within the script as the e).15 F .278 (xit sta-)-.15 F .082(tus of the script.)144 434.4 R .082 (If used outside a function and not during e)5.082 F -.15(xe)-.15 G .082 (cution of a script by).15 F F1(.)2.582 E F0 2.581(,t).833 G .081 (he return sta-)-2.581 F(tus is f)144 446.4 Q(alse.)-.1 E F1(set)108 463.2 Q F0([)2.5 E F1(\255\255abefhkmnptuvxBCHP)A F0 2.5(][)C F1 -2.5 E F2(option)2.5 E F0 2.5(][)C F2(ar)-2.5 E(g)-.37 E F0(...])2.5 E -.4(Wi)144 475.2 S .835(thout options, the name and v).4 F .835 (alue of each shell v)-.25 F .836 (ariable are displayed in a format that can be)-.25 F .405 (reused as input.)144 487.2 R .405 (The output is sorted according to the current locale.)5.405 F .404 (When options are speci\214ed,)5.404 F(the)144 499.2 Q 3.895(ys)-.15 G 1.395(et or unset shell attrib)-3.895 F 3.895(utes. An)-.2 F 3.895(ya) -.15 G -.18(rg)-3.895 G 1.395 (uments remaining after the options are processed are).18 F 2.382 (treated as v)144 511.2 R 2.382 (alues for the positional parameters and are assigned, in order)-.25 F 4.882(,t)-.4 G(o)-4.882 E F1($1)4.882 E F0(,)A F1($2)4.882 E F0(,)A F1 4.881(... $)4.881 F F2(n)A F0(.)A(Options, if speci\214ed, ha)144 523.2 Q .3 -.15(ve t)-.2 H(he follo).15 E(wing meanings:)-.25 E F1144 535.2 Q F0 .539(Automatically mark v)29.3 F .539 (ariables and functions which are modi\214ed or created for e)-.25 F .54 (xport to)-.15 F(the en)184 547.2 Q(vironment of subsequent commands.) -.4 E F1144 559.2 Q F0 .132 (Report the status of terminated background jobs immediately)28.74 F 2.632(,r)-.65 G .131(ather than before the ne)-2.632 F(xt)-.15 E (primary prompt.)184 571.2 Q(This is ef)5 E(fecti)-.25 E .3 -.15(ve o) -.25 H(nly when job control is enabled.).15 E F1144 583.2 Q F0 1.693(Exit immediately if a)29.86 F F2 1.693(simple command)4.193 F F0 (\(see)4.193 E F3 1.693(SHELL GRAMMAR)4.193 F F0(abo)3.943 E -.15(ve) -.15 G 4.194(\)e).15 G 1.694(xits with a)-4.344 F .779(non-zero status.) 184 595.2 R .779(The shell does not e)5.779 F .778 (xit if the command that f)-.15 F .778(ails is part of an)-.1 F F2 (until)3.278 E F0(or)3.278 E F2(while)184 607.2 Q F0 .82 (loop, part of an)3.32 F F2(if)3.32 E F0 .82(statement, part of a)3.32 F F1(&&)3.321 E F0(or)3.321 E/F5 10/Symbol SF3.321 E F0 .821 (list, or if the command')3.321 F 3.321(sr)-.55 G(eturn)-3.321 E -.25 (va)184 619.2 S(lue is being in).25 E -.15(ve)-.4 G(rted via).15 E F1(!) 2.5 E F0 5(.A)C(trap on)-2.5 E F1(ERR)2.5 E F0 2.5(,i)C 2.5(fs)-2.5 G (et, is e)-2.5 E -.15(xe)-.15 G(cuted before the shell e).15 E(xits.) -.15 E F1144 631.2 Q F0(Disable pathname e)30.97 E(xpansion.)-.15 E F1144 643.2 Q F0 2.239(Remember the location of commands as the) 28.74 F 4.738(ya)-.15 G 2.238(re look)-4.738 F 2.238(ed up for e)-.1 F -.15(xe)-.15 G 4.738(cution. This).15 F(is)4.738 E(enabled by def)184 655.2 Q(ault.)-.1 E F1144 667.2 Q F0 .513(All ar)28.74 F .514 (guments in the form of assignment statements are placed in the en)-.18 F .514(vironment for a)-.4 F (command, not just those that precede the command name.)184 679.2 Q F1 144 691.2 Q F0 .149(Monitor mode.)25.97 F .149 (Job control is enabled.)5.149 F .148(This option is on by def)5.149 F .148(ault for interacti)-.1 F .448 -.15(ve s)-.25 H(hells).15 E .636 (on systems that support it \(see)184 703.2 R F3 .636(JOB CONTR)3.136 F (OL)-.27 E F0(abo)2.886 E -.15(ve)-.15 G 3.136(\). Background).15 F .637 (processes run in a)3.136 F .642 (separate process group and a line containing their e)184 715.2 R .641 (xit status is printed upon their com-)-.15 F(pletion.)184 727.2 Q (GNU Bash-2.05a)72 768 Q(2001 No)126.115 E -.15(ve)-.15 G(mber 13).15 E (50)185.545 E EP %%Page: 51 51 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\)) -.35 E/F1 10/Times-Bold@0 SF144 84 Q F0 .652(Read commands b)28.74 F .652(ut do not e)-.2 F -.15(xe)-.15 G .652(cute them.).15 F .653 (This may be used to check a shell script for)5.652 F(syntax errors.)184 96 Q(This is ignored by interacti)5 E .3 -.15(ve s)-.25 H(hells.).15 E F1144 108 Q/F2 10/Times-Italic@0 SF(option\255name)2.5 E F0(The) 184 120 Q F2(option\255name)2.5 E F0(can be one of the follo)2.5 E (wing:)-.25 E F1(allexport)184 132 Q F0(Same as)224 144 Q F12.5 E F0(.)A F1(braceexpand)184 156 Q F0(Same as)224 168 Q F12.5 E F0(.) A F1(emacs)184 180 Q F0 .089 (Use an emacs-style command line editing interf)13.9 F 2.589(ace. This) -.1 F .089(is enabled by def)2.589 F(ault)-.1 E .95 (when the shell is interacti)224 192 R -.15(ve)-.25 G 3.45(,u).15 G .95 (nless the shell is started with the)-3.45 F F1(\255\255noediting)3.45 E F0(option.)224 204 Q F1(err)184 216 Q(exit)-.18 E F0(Same as)11.31 E F1 2.5 E F0(.)A F1(hashall)184 228 Q F0(Same as)9.43 E F12.5 E F0(.)A F1(histexpand)184 240 Q F0(Same as)224 252 Q F12.5 E F0(.)A F1(history)184 264 Q F0 .587(Enable command history)10 F 3.087(,a)-.65 G 3.087(sd)-3.087 G .587(escribed abo)-3.087 F .887 -.15(ve u)-.15 H(nder) .15 E/F3 9/Times-Bold@0 SF(HIST)3.087 E(OR)-.162 E(Y)-.315 E/F4 9 /Times-Roman@0 SF(.)A F0 .587(This option is)5.087 F(on by def)224 276 Q (ault in interacti)-.1 E .3 -.15(ve s)-.25 H(hells.).15 E F1(ignor)184 288 Q(eeof)-.18 E F0 1.656(The ef)224 300 R 1.656 (fect is as if the shell command)-.25 F/F5 10/Courier@0 SF(IGNOREEOF=10) 4.157 E F0 1.657(had been e)4.157 F -.15(xe)-.15 G(cuted).15 E(\(see)224 312 Q F1(Shell V)2.5 E(ariables)-.92 E F0(abo)2.5 E -.15(ve)-.15 G(\).) .15 E F1 -.1(ke)184 324 S(yw).1 E(ord)-.1 E F0(Same as)224 336 Q F1 2.5 E F0(.)A F1(monitor)184 348 Q F0(Same as)5.56 E F12.5 E F0(.)A F1(noclob)184 360 Q(ber)-.1 E F0(Same as)224 372 Q F12.5 E F0(.)A F1(noexec)184 384 Q F0(Same as)11.12 E F12.5 E F0(.)A F1 (noglob)184 396 Q F0(Same as)11.1 E F12.5 E F0(.)A F1(nolog)5 E F0 (Currently ignored.)2.5 E F1(notify)184 408 Q F0(Same as)15 E F1 2.5 E F0(.)A F1(nounset)184 420 Q F0(Same as)6.66 E F12.5 E F0(.)A F1(onecmd)184 432 Q F0(Same as)6.67 E F12.5 E F0(.)A F1(ph)184 444 Q(ysical)-.15 E F0(Same as)5.14 E F12.5 E F0(.)A F1(posix)184 456 Q F0 2.091(Change the beha)17.77 F 2.091(vior of)-.2 F F1(bash)4.591 E F0 2.091(where the def)4.591 F 2.091(ault operation dif)-.1 F 2.091 (fers from the)-.25 F(POSIX 1003.2 standard to match the standard \()224 468 Q F2(posix mode)A F0(\).)A F1(pri)184 480 Q(vileged)-.1 E F0 (Same as)224 492 Q F12.5 E F0(.)A F1 -.1(ve)184 504 S(rbose).1 E F0(Same as)7.33 E F12.5 E F0(.)A F1(vi)184 516 Q F0 (Use a vi-style command line editing interf)32.22 E(ace.)-.1 E F1 (xtrace)184 528 Q F0(Same as)13.35 E F12.5 E F0(.)A(If)184 546 Q F13.052 E F0 .552(is supplied with no)3.052 F F2(option\255name) 3.053 E F0 3.053(,t)C .553(he v)-3.053 F .553 (alues of the current options are printed.)-.25 F(If)5.553 E F1(+o)184 558 Q F0 1.072(is supplied with no)3.572 F F2(option\255name)3.572 E F0 3.572(,a)C 1.071(series of)-.001 F F1(set)3.571 E F0 1.071 (commands to recreate the current)3.571 F (option settings is displayed on the standard output.)184 570 Q F1 144 582 Q F0 -.45(Tu)28.74 G 1.216(rn on).45 F F2(privile)3.716 E -.1 (ge)-.4 G(d).1 E F0 3.716(mode. In)3.716 F 1.216(this mode, the)3.716 F F3($ENV)3.716 E F0(and)3.466 E F3($B)3.716 E(ASH_ENV)-.27 E F0 1.216 (\214les are not pro-)3.466 F 1.705 (cessed, shell functions are not inherited from the en)184 594 R 1.705 (vironment, and the)-.4 F F3(SHELLOPTS)4.205 E F0 -.25(va)184 606 S .018 (riable, if it appears in the en).25 F .019(vironment, is ignored.)-.4 F .019(If the shell is started with the ef)5.019 F(fec-)-.25 E(ti)184 618 Q 1.159 -.15(ve u)-.25 H .859 (ser \(group\) id not equal to the real user \(group\) id, and the).15 F F13.359 E F0 .858(option is not sup-)3.359 F .293 (plied, these actions are tak)184 630 R .293(en and the ef)-.1 F(fecti) -.25 E .593 -.15(ve u)-.25 H .293(ser id is set to the real user id.).15 F .294(If the)5.294 F F12.794 E F0 1.196 (option is supplied at startup, the ef)184 642 R(fecti)-.25 E 1.495 -.15 (ve u)-.25 H 1.195(ser id is not reset.).15 F -.45(Tu)6.195 G 1.195 (rning this option of).45 F(f)-.25 E(causes the ef)184 654 Q(fecti)-.25 E .3 -.15(ve u)-.25 H (ser and group ids to be set to the real user and group ids.).15 E F1 144 666 Q F0(Exit after reading and e)30.97 E -.15(xe)-.15 G (cuting one command.).15 E F1144 678 Q F0 -.35(Tr)28.74 G .444 (eat unset v).35 F .444 (ariables as an error when performing parameter e)-.25 F 2.944 (xpansion. If)-.15 F -.15(ex)2.945 G .445(pansion is).15 F .52 (attempted on an unset v)184 690 R .519 (ariable, the shell prints an error message, and, if not interacti)-.25 F -.15(ve)-.25 G(,).15 E -.15(ex)184 702 S(its with a non-zero status.) .15 E F1144 714 Q F0(Print shell input lines as the)29.3 E 2.5(ya) -.15 G(re read.)-2.5 E(GNU Bash-2.05a)72 768 Q(2001 No)126.115 E -.15 (ve)-.15 G(mber 13).15 E(51)185.545 E EP %%Page: 52 52 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\)) -.35 E/F1 10/Times-Bold@0 SF144 84 Q F0 .521(After e)29.3 F .521 (xpanding each)-.15 F/F2 10/Times-Italic@0 SF .521(simple command)3.021 F F0 3.021(,d)C .521(isplay the e)-3.021 F .522(xpanded v)-.15 F .522 (alue of)-.25 F/F3 9/Times-Bold@0 SF(PS4)3.022 E/F4 9/Times-Roman@0 SF (,)A F0(follo)2.772 E .522(wed by)-.25 F(the command and its e)184 96 Q (xpanded ar)-.15 E(guments.)-.18 E F1144 108 Q F0 2.579 (The shell performs brace e)27.63 F 2.578(xpansion \(see)-.15 F F1 2.578 (Brace Expansion)5.078 F F0(abo)5.078 E -.15(ve)-.15 G 5.078(\). This) .15 F 2.578(is on by)5.078 F(def)184 120 Q(ault.)-.1 E F1144 132 Q F0 .213(If set,)27.08 F F1(bash)2.713 E F0 .213(does not o)2.713 F -.15 (ve)-.15 G .214(rwrite an e).15 F .214(xisting \214le with the)-.15 F F1 (>)2.714 E F0(,)A F1(>&)2.714 E F0 2.714(,a)C(nd)-2.714 E F1(<>)2.714 E F0 .214(redirection opera-)2.714 F 3.054(tors. This)184 144 R .553 (may be o)3.053 F -.15(ve)-.15 G .553 (rridden when creating output \214les by using the redirection opera-) .15 F(tor)184 156 Q F1(>|)2.5 E F0(instead of)2.5 E F1(>)2.5 E F0(.)A F1 144 168 Q F0(Enable)26.52 E F1(!)3.031 E F0 .531 (style history substitution.)5.531 F .531(This option is on by def)5.531 F .532(ault when the shell is inter)-.1 F(-)-.2 E(acti)184 180 Q -.15 (ve)-.25 G(.).15 E F1144 192 Q F0 1.165 (If set, the shell does not follo)28.19 F 3.664(ws)-.25 G 1.164 (ymbolic links when e)-3.664 F -.15(xe)-.15 G 1.164 (cuting commands such as).15 F F1(cd)3.664 E F0 2.821 (that change the current w)184 204 R 2.822(orking directory)-.1 F 7.822 (.I)-.65 G 5.322(tu)-7.822 G 2.822(ses the ph)-5.322 F 2.822 (ysical directory structure)-.05 F 2.686(instead. By)184 216 R(def)2.686 E(ault,)-.1 E F1(bash)2.686 E F0(follo)2.686 E .186 (ws the logical chain of directories when performing com-)-.25 F (mands which change the current directory)184 228 Q(.)-.65 E F1144 240 Q F0 .4(If no ar)28.6 F .401(guments follo)-.18 F 2.901(wt)-.25 G .401(his option, then the positional parameters are unset.)-2.901 F (Otherwise,)5.401 E(the positional parameters are set to the)184 252 Q F2(ar)2.5 E(g)-.37 E F0(s, e)A -.15(ve)-.25 G 2.5(ni).15 G 2.5(fs)-2.5 G (ome of them be)-2.5 E(gin with a)-.15 E F12.5 E F0(.)A F1144 264 Q F0 1.945(Signal the end of options, cause all remaining)34.3 F F2 (ar)4.444 E(g)-.37 E F0 4.444(st)C 4.444(ob)-4.444 G 4.444(ea)-4.444 G 1.944(ssigned to the positional)-4.444 F 3.445(parameters. The)184 276 R F13.445 E F0(and)3.445 E F13.445 E F0 .945 (options are turned of)3.445 F 3.445(f. If)-.25 F .946(there are no) 3.445 F F2(ar)3.446 E(g)-.37 E F0 .946(s, the positional)B (parameters remain unchanged.)184 288 Q .425(The options are of)144 304.8 R 2.925(fb)-.25 G 2.925(yd)-2.925 G(ef)-2.925 E .425 (ault unless otherwise noted.)-.1 F .425 (Using + rather than \255 causes these options)5.425 F .177 (to be turned of)144 316.8 R 2.677(f. The)-.25 F .178 (options can also be speci\214ed as ar)2.678 F .178(guments to an in) -.18 F -.2(vo)-.4 G .178(cation of the shell.).2 F(The)5.178 E .066 (current set of options may be found in)144 328.8 R F1<24ad>2.566 E F0 5.066(.T)C .066(he return status is al)-5.066 F -.1(wa)-.1 G .066 (ys true unless an in).1 F -.25(va)-.4 G .066(lid option).25 F (is encountered.)144 340.8 Q F1(shift)108 357.6 Q F0([)2.5 E F2(n)A F0 (])A .428(The positional parameters from)144 369.6 R F2(n)2.928 E F0 .429(+1 ... are renamed to)B F1 .429($1 ....)2.929 F F0 -.15(Pa)5.429 G .429(rameters represented by the num-).15 F(bers)144 381.6 Q F1($#)2.643 E F0(do)2.643 E .143(wn to)-.25 F F1($#)2.643 E F0A F2(n)A F0 .143 (+1 are unset.)B F2(n)5.143 E F0 .143(must be a non-ne)2.643 F -.05(ga) -.15 G(ti).05 E .442 -.15(ve n)-.25 H .142(umber less than or equal to) .15 F F1($#)2.642 E F0 5.142(.I)C(f)-5.142 E F2(n)2.642 E F0 .112 (is 0, no parameters are changed.)144 393.6 R(If)5.112 E F2(n)2.612 E F0 .112(is not gi)2.612 F -.15(ve)-.25 G .112(n, it is assumed to be 1.).15 F(If)5.112 E F2(n)2.612 E F0 .113(is greater than)2.612 F F1($#)2.613 E F0 2.613(,t)C(he)-2.613 E .179(positional parameters are not changed.) 144 405.6 R .179(The return status is greater than zero if)5.179 F F2(n) 2.679 E F0 .178(is greater than)2.679 F F1($#)2.678 E F0 (or less than zero; otherwise 0.)144 417.6 Q F1(shopt)108 434.4 Q F0([) 2.5 E F1(\255pqsu)A F0 2.5(][)C F1-2.5 E F0 2.5(][)C F2(optname) -2.5 E F0(...])2.5 E -.8(To)144 446.4 S .222(ggle the v).8 F .222 (alues of v)-.25 F .222(ariables controlling optional shell beha)-.25 F (vior)-.2 E 5.222(.W)-.55 G .222(ith no options, or with the)-5.622 F F1 2.722 E F0 .721(option, a list of all settable options is display\ ed, with an indication of whether or not each is set.)144 458.4 R(The) 144 470.4 Q F12.827 E F0 .327(option causes output to be displaye\ d in a form that may be reused as input.)2.827 F .328(Other options) 5.328 F(ha)144 482.4 Q .3 -.15(ve t)-.2 H(he follo).15 E(wing meanings:) -.25 E F1144 494.4 Q F0(Enable \(set\) each)26.41 E F2(optname)2.5 E F0(.)A F1144 506.4 Q F0(Disable \(unset\) each)24.74 E F2 (optname)2.5 E F0(.)A F1144 518.4 Q F0 .003(Suppresses normal out\ put \(quiet mode\); the return status indicates whether the)24.74 F F2 (optname)2.503 E F0(is)2.503 E .255(set or unset.)180 530.4 R .255 (If multiple)5.255 F F2(optname)2.755 E F0(ar)2.755 E .256 (guments are gi)-.18 F -.15(ve)-.25 G 2.756(nw).15 G(ith)-2.756 E F1 2.756 E F0 2.756(,t)C .256(he return status is zero if)-2.756 F (all)180 542.4 Q F2(optnames)2.5 E F0(are enabled; non-zero otherwise.) 2.5 E F1144 554.4 Q F0(Restricts the v)25.3 E(alues of)-.25 E F2 (optname)2.5 E F0(to be those de\214ned for the)2.5 E F12.5 E F0 (option to the)2.5 E F1(set)2.5 E F0 -.2(bu)2.5 G(iltin.).2 E .128 (If either)144 571.2 R F12.628 E F0(or)2.628 E F12.628 E F0 .127(is used with no)2.627 F F2(optname)2.627 E F0(ar)2.627 E .127 (guments, the display is limited to those options which)-.18 F 1.023 (are set or unset, respecti)144 583.2 R -.15(ve)-.25 G(ly).15 E 6.023 (.U)-.65 G 1.024(nless otherwise noted, the)-6.023 F F1(shopt)3.524 E F0 1.024(options are disabled \(unset\) by)3.524 F(def)144 595.2 Q(ault.) -.1 E 1.544(The return status when listing options is zero if all)144 612 R F2(optnames)4.044 E F0 1.544(are enabled, non-zero otherwise.) 4.044 F .696 (When setting or unsetting options, the return status is zero unless an) 144 624 R F2(optname)3.196 E F0 .696(is not a v)3.196 F .696(alid shell) -.25 F(option.)144 636 Q(The list of)144 652.8 Q F1(shopt)2.5 E F0 (options is:)2.5 E F1(cdable_v)144 670.8 Q(ars)-.1 E F0 .156 (If set, an ar)184 682.8 R .156(gument to the)-.18 F F1(cd)2.656 E F0 -.2(bu)2.656 G .155 (iltin command that is not a directory is assumed to be the).2 F (name of a v)184 694.8 Q(ariable whose v)-.25 E (alue is the directory to change to.)-.25 E F1(cdspell)144 706.8 Q F0 1.055 (If set, minor errors in the spelling of a directory component in a) 10.55 F F1(cd)3.555 E F0 1.055(command will be)3.555 F 3.988 (corrected. The)184 718.8 R 1.488(errors check)3.988 F 1.487 (ed for are transposed characters, a missing character)-.1 F 3.987(,a) -.4 G(nd)-3.987 E .552(one character too man)184 730.8 R 4.352 -.65 (y. I)-.15 H 3.052(fac).65 G .552 (orrection is found, the corrected \214le name is printed, and)-3.052 F (GNU Bash-2.05a)72 768 Q(2001 No)126.115 E -.15(ve)-.15 G(mber 13).15 E (52)185.545 E EP %%Page: 53 53 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\)) -.35 E(the command proceeds.)184 84 Q (This option is only used by interacti)5 E .3 -.15(ve s)-.25 H(hells.) .15 E/F1 10/Times-Bold@0 SF(checkhash)144 96 Q F0 2.08(If set,)184 108 R F1(bash)4.58 E F0 2.079(checks that a command found in the hash table e) 4.58 F 2.079(xists before trying to)-.15 F -.15(exe)184 120 S(cute it.) .15 E(If a hashed command no longer e)5 E (xists, a normal path search is performed.)-.15 E F1(checkwinsize)144 132 Q F0 .796(If set,)184 144 R F1(bash)3.296 E F0 .796 (checks the windo)3.296 F 3.296(ws)-.25 G .797 (ize after each command and, if necessary)-3.296 F 3.297(,u)-.65 G .797 (pdates the)-3.297 F -.25(va)184 156 S(lues of).25 E/F2 9/Times-Bold@0 SF(LINES)2.5 E F0(and)2.25 E F2(COLUMNS)2.5 E/F3 9/Times-Roman@0 SF(.)A F1(cmdhist)144 168 Q F0 1.202(If set,)6.11 F F1(bash)3.702 E F0 1.202 (attempts to sa)3.702 F 1.502 -.15(ve a)-.2 H 1.202 (ll lines of a multiple-line command in the same history).15 F(entry)184 180 Q 5(.T)-.65 G(his allo)-5 E (ws easy re-editing of multi-line commands.)-.25 E F1(dotglob)144 192 Q F0 .165(If set,)7.77 F F1(bash)2.665 E F0 .165(includes \214lenames be) 2.665 F .165(ginning with a `.)-.15 F 2.665('i)-.7 G 2.665(nt)-2.665 G .165(he results of pathname e)-2.665 F(xpansion.)-.15 E F1(execfail)144 204 Q F0 1.387(If set, a non-interacti)7.79 F 1.687 -.15(ve s)-.25 H 1.386(hell will not e).15 F 1.386(xit if it cannot e)-.15 F -.15(xe)-.15 G 1.386(cute the \214le speci\214ed as an).15 F(ar)184 216 Q (gument to the)-.18 E F1(exec)2.5 E F0 -.2(bu)2.5 G(iltin command.).2 E (An interacti)5 E .3 -.15(ve s)-.25 H(hell does not e).15 E(xit if)-.15 E F1(exec)2.5 E F0 -.1(fa)2.5 G(ils.).1 E F1(expand_aliases)144 228 Q F0 .716(If set, aliases are e)184 240 R .717(xpanded as described abo)-.15 F 1.017 -.15(ve u)-.15 H(nder).15 E F2(ALIASES)3.217 E F3(.)A F0 .717 (This option is enabled)5.217 F(by def)184 252 Q(ault for interacti)-.1 E .3 -.15(ve s)-.25 H(hells.).15 E F1(extglob)144 264 Q F0 .4 (If set, the e)8.89 F .4 (xtended pattern matching features described abo)-.15 F .7 -.15(ve u) -.15 H(nder).15 E F1 -.1(Pa)2.9 G .4(thname Expan-).1 F(sion)184 276 Q F0(are enabled.)2.5 E F1(histappend)144 288 Q F0 .383 (If set, the history list is appended to the \214le named by the v)184 300 R .384(alue of the)-.25 F F1(HISTFILE)2.884 E F0 -.25(va)2.884 G (ri-).25 E(able when the shell e)184 312 Q(xits, rather than o)-.15 E -.15(ve)-.15 G(rwriting the \214le.).15 E F1(histr)144 324 Q(eedit)-.18 E F0 .576(If set, and)184 336 R F1 -.18(re)3.076 G(adline).18 E F0 .575 (is being used, a user is gi)3.076 F -.15(ve)-.25 G 3.075(nt).15 G .575 (he opportunity to re-edit a f)-3.075 F .575(ailed his-)-.1 F (tory substitution.)184 348 Q F1(histv)144 360 Q(erify)-.1 E F0 .402 (If set, and)184 372 R F1 -.18(re)2.903 G(adline).18 E F0 .403 (is being used, the results of history substitution are not immediately) 2.903 F .662(passed to the shell parser)184 384 R 5.662(.I)-.55 G .661 (nstead, the resulting line is loaded into the)-5.662 F F1 -.18(re)3.161 G(adline).18 E F0(editing)3.161 E -.2(bu)184 396 S -.25(ff).2 G(er).25 E 2.5(,a)-.4 G(llo)-2.5 E(wing further modi\214cation.)-.25 E F1 (hostcomplete)144 408 Q F0 1.181(If set, and)184 420 R F1 -.18(re)3.681 G(adline).18 E F0 1.181(is being used,)3.681 F F1(bash)3.682 E F0 1.182 (will attempt to perform hostname completion)3.682 F 1.381(when a w)184 432 R 1.381(ord containing a)-.1 F F1(@)3.881 E F0 1.381 (is being completed \(see)3.881 F F1(Completing)3.88 E F0(under)3.88 E F2(READLINE)3.88 E F0(abo)184 444 Q -.15(ve)-.15 G 2.5(\). This).15 F (is enabled by def)2.5 E(ault.)-.1 E F1(huponexit)144 456 Q F0(If set,) 184 468 Q F1(bash)2.5 E F0(will send)2.5 E F2(SIGHUP)2.5 E F0 (to all jobs when an interacti)2.25 E .3 -.15(ve l)-.25 H(ogin shell e) .15 E(xits.)-.15 E F1(interacti)144 480 Q -.1(ve)-.1 G(_comments).1 E F0 .33(If set, allo)184 492 R 2.83(waw)-.25 G .33(ord be)-2.93 F .33 (ginning with)-.15 F F1(#)2.83 E F0 .33(to cause that w)2.83 F .33 (ord and all remaining characters on)-.1 F .967 (that line to be ignored in an interacti)184 504 R 1.267 -.15(ve s)-.25 H .967(hell \(see).15 F F2(COMMENTS)3.467 E F0(abo)3.217 E -.15(ve)-.15 G 3.467(\). This).15 F .967(option is)3.467 F(enabled by def)184 516 Q (ault.)-.1 E F1(lithist)144 528 Q F0 .654(If set, and the)15.55 F F1 (cmdhist)3.154 E F0 .654(option is enabled, multi-line commands are sa) 3.154 F -.15(ve)-.2 G 3.155(dt).15 G 3.155(ot)-3.155 G .655(he history) -3.155 F(with embedded ne)184 540 Q (wlines rather than using semicolon separators where possible.)-.25 E F1 (login_shell)144 552 Q F0 .486 (The shell sets this option if it is started as a login shell \(see)184 564 R F2(INV)2.986 E(OCA)-.405 E(TION)-.855 E F0(abo)2.736 E -.15(ve) -.15 G 2.986(\). The).15 F -.25(va)184 576 S(lue may not be changed.).25 E F1(mailwar)144 588 Q(n)-.15 E F0 .814(If set, and a \214le that)184 600 R F1(bash)3.314 E F0 .815 (is checking for mail has been accessed since the last time it)3.314 F -.1(wa)184 612 S 2.5(sc).1 G(heck)-2.5 E(ed, the message `)-.1 E (`The mail in)-.74 E/F4 10/Times-Italic@0 SF(mail\214le)2.5 E F0 (has been read')2.5 E 2.5('i)-.74 G 2.5(sd)-2.5 G(isplayed.)-2.5 E F1 (no_empty_cmd_completion)144 624 Q F0 .146(If set, and)184 636 R F1 -.18 (re)2.646 G(adline).18 E F0 .146(is being used,)2.646 F F1(bash)2.646 E F0 .145(will not attempt to search the)2.646 F F1 -.74(PA)2.645 G(TH) -.21 E F0 .145(for possible)2.645 F (completions when completion is attempted on an empty line.)184 648 Q F1 (nocaseglob)144 660 Q F0 .436(If set,)184 672 R F1(bash)2.936 E F0 .436 (matches \214lenames in a case\255insensiti)2.936 F .737 -.15(ve f)-.25 H .437(ashion when performing pathname).05 F -.15(ex)184 684 S (pansion \(see).15 E F1 -.1(Pa)2.5 G(thname Expansion).1 E F0(abo)2.5 E -.15(ve)-.15 G(\).).15 E F1(nullglob)144 696 Q F0 .855(If set,)184 708 R F1(bash)3.355 E F0(allo)3.355 E .855 (ws patterns which match no \214les \(see)-.25 F F1 -.1(Pa)3.354 G .854 (thname Expansion).1 F F0(abo)3.354 E -.15(ve)-.15 G 3.354(\)t).15 G(o) -3.354 E -.15(ex)184 720 S(pand to a null string, rather than themselv) .15 E(es.)-.15 E(GNU Bash-2.05a)72 768 Q(2001 No)126.115 E -.15(ve)-.15 G(mber 13).15 E(53)185.545 E EP %%Page: 54 54 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\)) -.35 E/F1 10/Times-Bold@0 SF(pr)144 84 Q(ogcomp)-.18 E F0 .676 (If set, the programmable completion f)184 96 R .677(acilities \(see)-.1 F F1(Pr)3.177 E .677(ogrammable Completion)-.18 F F0(abo)3.177 E -.15 (ve)-.15 G(\)).15 E(are enabled.)184 108 Q (This option is enabled by def)5 E(ault.)-.1 E F1(pr)144 120 Q(omptv) -.18 E(ars)-.1 E F0 .314(If set, prompt strings under)184 132 R .313 (go v)-.18 F .313(ariable and parameter e)-.25 F .313 (xpansion after being e)-.15 F .313(xpanded as)-.15 F(described in)184 144 Q/F2 9/Times-Bold@0 SF(PR)2.5 E(OMPTING)-.27 E F0(abo)2.25 E -.15 (ve)-.15 G 5(.T).15 G(his option is enabled by def)-5 E(ault.)-.1 E F1 -.18(re)144 156 S(stricted_shell).18 E F0 1.069 (The shell sets this option if it is started in restricted mode \(see) 184 168 R F2 1.069(RESTRICTED SHELL)3.569 F F0(belo)184 180 Q 4.178 (w\). The)-.25 F -.25(va)4.178 G 1.678(lue may not be changed.).25 F 1.678(This is not reset when the startup \214les are)6.678 F -.15(exe) 184 192 S(cuted, allo).15 E(wing the startup \214les to disco)-.25 E -.15(ve)-.15 G 2.5(rw).15 G(hether or not a shell is restricted.)-2.5 E F1(shift_v)144 204 Q(erbose)-.1 E F0 .501(If set, the)184 216 R F1 (shift)3.001 E F0 -.2(bu)3.001 G .501 (iltin prints an error message when the shift count e).2 F .502 (xceeds the number)-.15 F(of positional parameters.)184 228 Q F1(sour) 144 240 Q(cepath)-.18 E F0 .771(If set, the)184 252 R F1(sour)3.271 E (ce)-.18 E F0(\()3.271 E F1(.)A F0 3.271(\)b)C .771(uiltin uses the v) -3.471 F .771(alue of)-.25 F F2 -.666(PA)3.27 G(TH)-.189 E F0 .77 (to \214nd the directory containing the)3.02 F(\214le supplied as an ar) 184 264 Q 2.5(gument. This)-.18 F(option is enabled by def)2.5 E(ault.) -.1 E F1(xpg_echo)144 276 Q F0(If set, the)184 288 Q F1(echo)2.5 E F0 -.2(bu)2.5 G(iltin e).2 E(xpands backslash-escape sequences by def)-.15 E(ault.)-.1 E F1(suspend)108 300 Q F0([)2.5 E F1A F0(])A .492 (Suspend the e)144 312 R -.15(xe)-.15 G .492 (cution of this shell until it recei).15 F -.15(ve)-.25 G 2.992(sa).15 G F2(SIGCONT).001 E F0 2.993(signal. The)2.743 F F12.993 E F0 .493 (option says not to)2.993 F .759 (complain if this is a login shell; just suspend an)144 324 R(yw)-.15 E (ay)-.1 E 5.758(.T)-.65 G .758 (he return status is 0 unless the shell is a)-5.758 F(login shell and) 144 336 Q F12.5 E F0 (is not supplied, or if job control is not enabled.)2.5 E F1(test)108 348 Q/F3 10/Times-Italic@0 SF -.2(ex)2.5 G(pr).2 E F1([)108 360 Q F3 -.2 (ex)2.5 G(pr).2 E F1(])2.5 E F0 1.15 (Return a status of 0 or 1 depending on the e)6.77 F -.25(va)-.25 G 1.15 (luation of the conditional e).25 F(xpression)-.15 E F3 -.2(ex)3.65 G (pr).2 E F0 6.15(.E).73 G(ach)-6.15 E 1.188 (operator and operand must be a separate ar)144 372 R 3.688 (gument. Expressions)-.18 F 1.187(are composed of the primaries)3.688 F (described abo)144 384 Q .3 -.15(ve u)-.15 H(nder).15 E F2(CONDITION)2.5 E(AL EXPRESSIONS)-.18 E/F4 9/Times-Roman@0 SF(.)A F0 .785 (Expressions may be combined using the follo)144 402 R .786 (wing operators, listed in decreasing order of prece-)-.25 F(dence.)144 414 Q F1(!)144 426 Q F3 -.2(ex)2.5 G(pr).2 E F0 -.35(Tr)12.6 G(ue if).35 E F3 -.2(ex)2.5 G(pr).2 E F0(is f)2.5 E(alse.)-.1 E F1(\()144 438 Q F3 -.2(ex)2.5 G(pr).2 E F1(\))2.5 E F0 .26(Returns the v)6.77 F .26 (alue of)-.25 F F3 -.2(ex)2.76 G(pr).2 E F0 5.26(.T)C .26 (his may be used to o)-5.26 F -.15(ve)-.15 G .26 (rride the normal precedence of opera-).15 F(tors.)180 450 Q F3 -.2(ex) 144 462 S(pr1).2 E F02.5 E F1(a)A F3 -.2(ex)2.5 G(pr2).2 E F0 -.35 (Tr)180 474 S(ue if both).35 E F3 -.2(ex)2.5 G(pr1).2 E F0(and)2.5 E F3 -.2(ex)2.5 G(pr2).2 E F0(are true.)2.5 E F3 -.2(ex)144 486 S(pr1).2 E F0 2.5 E F1(o)A F3 -.2(ex)2.5 G(pr2).2 E F0 -.35(Tr)180 498 S (ue if either).35 E F3 -.2(ex)2.5 G(pr1).2 E F0(or)2.5 E F3 -.2(ex)2.5 G (pr2).2 E F0(is true.)2.5 E F1(test)144 514.8 Q F0(and)2.5 E F1([)2.5 E F0 -.25(eva)2.5 G(luate conditional e).25 E (xpressions using a set of rules based on the number of ar)-.15 E (guments.)-.18 E 2.5(0a)144 532.8 S -.18(rg)-2.5 G(uments).18 E(The e) 180 544.8 Q(xpression is f)-.15 E(alse.)-.1 E 2.5(1a)144 556.8 S -.18 (rg)-2.5 G(ument).18 E(The e)180 568.8 Q (xpression is true if and only if the ar)-.15 E(gument is not null.)-.18 E 2.5(2a)144 580.8 S -.18(rg)-2.5 G(uments).18 E .37(If the \214rst ar) 180 592.8 R .37(gument is)-.18 F F1(!)2.87 E F0 2.87(,t)C .37(he e)-2.87 F .37(xpression is true if and only if the second ar)-.15 F .37 (gument is null.)-.18 F .38(If the \214rst ar)180 604.8 R .38 (gument is one of the unary conditional operators listed abo)-.18 F .679 -.15(ve u)-.15 H(nder).15 E F2(CONDI-)2.879 E(TION)180 616.8 Q .552 (AL EXPRESSIONS)-.18 F F4(,)A F0 .552(the e)2.802 F .552 (xpression is true if the unary test is true.)-.15 F .552 (If the \214rst ar)5.552 F(gu-)-.18 E(ment is not a v)180 628.8 Q (alid unary conditional operator)-.25 E 2.5(,t)-.4 G(he e)-2.5 E (xpression is f)-.15 E(alse.)-.1 E 2.5(3a)144 640.8 S -.18(rg)-2.5 G (uments).18 E .024(If the second ar)180 652.8 R .023 (gument is one of the binary conditional operators listed abo)-.18 F .323 -.15(ve u)-.15 H(nder).15 E F2(CON-)2.523 E(DITION)180 664.8 Q 1.477(AL EXPRESSIONS)-.18 F F4(,)A F0 1.477(the result of the e)3.727 F 1.477(xpression is the result of the binary test)-.15 F .398 (using the \214rst and third ar)180 676.8 R .398(guments as operands.) -.18 F .398(If the \214rst ar)5.398 F .397(gument is)-.18 F F1(!)2.897 E F0 2.897(,t)C .397(he v)-2.897 F .397(alue is the)-.25 F(ne)180 688.8 Q -.05(ga)-.15 G .262(tion of the tw).05 F(o-ar)-.1 E .262 (gument test using the second and third ar)-.18 F 2.762(guments. If)-.18 F .263(the \214rst ar)2.762 F(gu-)-.18 E .206(ment is e)180 700.8 R (xactly)-.15 E F1(\()2.706 E F0 .205(and the third ar)2.706 F .205 (gument is e)-.18 F(xactly)-.15 E F1(\))2.705 E F0 2.705(,t)C .205 (he result is the one-ar)-2.705 F .205(gument test of)-.18 F 1.17 (the second ar)180 712.8 R 3.67(gument. Otherwise,)-.18 F 1.171(the e) 3.671 F 1.171(xpression is f)-.15 F 3.671(alse. The)-.1 F F13.671 E F0(and)3.671 E F13.671 E F0 1.171(operators are)3.671 F (considered binary operators in this case.)180 724.8 Q(GNU Bash-2.05a)72 768 Q(2001 No)126.115 E -.15(ve)-.15 G(mber 13).15 E(54)185.545 E EP %%Page: 55 55 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\)) -.35 E 2.5(4a)144 84 S -.18(rg)-2.5 G(uments).18 E .385 (If the \214rst ar)180 96 R .385(gument is)-.18 F/F1 10/Times-Bold@0 SF (!)2.885 E F0 2.885(,t)C .385(he result is the ne)-2.885 F -.05(ga)-.15 G .384(tion of the three-ar).05 F .384(gument e)-.18 F .384 (xpression com-)-.15 F 1.647(posed of the remaining ar)180 108 R 4.147 (guments. Otherwise,)-.18 F 1.647(the e)4.147 F 1.648 (xpression is parsed and e)-.15 F -.25(va)-.25 G(luated).25 E (according to precedence using the rules listed abo)180 120 Q -.15(ve) -.15 G(.).15 E 2.5(5o)144 132 S 2.5(rm)-2.5 G(ore ar)-2.5 E(guments)-.18 E 1.635(The e)180 144 R 1.635(xpression is parsed and e)-.15 F -.25(va) -.25 G 1.635(luated according to precedence using the rules listed).25 F (abo)180 156 Q -.15(ve)-.15 G(.).15 E F1(times)108 172.8 Q F0 1.229(Pri\ nt the accumulated user and system times for the shell and for processe\ s run from the shell.)13.23 F(The return status is 0.)144 184.8 Q F1 (trap)108 201.6 Q F0([)2.5 E F1(\255lp)A F0 2.5(][)C/F2 10 /Times-Italic@0 SF(ar)-2.5 E(g)-.37 E F0 2.5(][)C F2(sigspec)-2.5 E F0 (...])2.5 E .768(The command)144 213.6 R F2(ar)3.267 E(g)-.37 E F0 .767 (is to be read and e)3.267 F -.15(xe)-.15 G .767 (cuted when the shell recei).15 F -.15(ve)-.25 G 3.267(ss).15 G (ignal\(s\))-3.267 E F2(sigspec)3.267 E F0 5.767(.I).31 G(f)-5.767 E F2 (ar)3.267 E(g)-.37 E F0(is)3.267 E 2.163(absent or)144 225.6 R F1 4.663 E F0 4.663(,a)C 2.164 (ll speci\214ed signals are reset to their original v)-4.663 F 2.164 (alues \(the v)-.25 F 2.164(alues the)-.25 F 4.664(yh)-.15 G 2.164 (ad upon)-4.664 F .06(entrance to the shell\).)144 237.6 R(If)5.06 E F2 (ar)2.56 E(g)-.37 E F0 .06 (is the null string the signal speci\214ed by each)2.56 F F2(sigspec) 2.56 E F0 .06(is ignored by the)2.56 F .044 (shell and by the commands it in)144 249.6 R -.2(vo)-.4 G -.1(ke).2 G 2.545(s. If).1 F F2(ar)2.545 E(g)-.37 E F0 .045(is not present and)2.545 F F12.545 E F0 .045(has been supplied, then the trap)2.545 F .352 (commands associated with each)144 261.6 R F2(sigspec)2.852 E F0 .351 (are displayed.)2.852 F .351(If no ar)5.351 F .351 (guments are supplied or if only)-.18 F F12.851 E F0 1.206(is gi) 144 273.6 R -.15(ve)-.25 G(n,).15 E F1(trap)3.706 E F0 1.207 (prints the list of commands associated with each signal number)3.706 F 6.207(.E)-.55 G(ach)-6.207 E F2(sigspec)3.707 E F0(is)3.707 E .569 (either a signal name de\214ned in <)144 285.6 R F2(signal.h)A F0 .569 (>, or a signal number)B 5.569(.I)-.55 G 3.068(fa)-5.569 G F2(sigspec)A F0(is)3.068 E/F3 9/Times-Bold@0 SF(EXIT)3.068 E F0 .568(\(0\) the com-) 2.818 F(mand)144 297.6 Q F2(ar)2.763 E(g)-.37 E F0 .263(is e)2.763 F -.15(xe)-.15 G .263(cuted on e).15 F .263(xit from the shell.)-.15 F .263(If a)5.263 F F2(sigspec)2.763 E F0(is)2.763 E F3(DEB)2.763 E(UG) -.09 E/F4 9/Times-Roman@0 SF(,)A F0 .263(the command)2.513 F F2(ar)2.763 E(g)-.37 E F0 .264(is e)2.764 F -.15(xe)-.15 G(cuted).15 E .608(after e) 144 309.6 R -.15(ve)-.25 G(ry).15 E F2 .607(simple command)3.108 F F0 (\(see)3.107 E F3 .607(SHELL GRAMMAR)3.107 F F0(abo)2.857 E -.15(ve)-.15 G 3.107(\). If).15 F(a)3.107 E F2(sigspec)3.107 E F0(is)3.107 E F3(ERR) 3.107 E F4(,)A F0 .607(the command)2.857 F F2(ar)144 321.6 Q(g)-.37 E F0 1.5(is e)4 F -.15(xe)-.15 G 1.5(cuted whene).15 F -.15(ve)-.25 G 4(ras) .15 G 1.5(imple command has a non\255zero e)-4 F 1.5(xit status.)-.15 F (The)6.5 E F3(ERR)4 E F0 1.5(trap is not)3.75 F -.15(exe)144 333.6 S .684(cuted if the f).15 F .684(ailed command is part of an)-.1 F F2 (until)3.184 E F0(or)3.184 E F2(while)3.184 E F0 .684(loop, part of an) 3.184 F F2(if)3.184 E F0 .684(statement, part of a)3.184 F F1(&&)144 345.6 Q F0(or)3.093 E/F5 10/Symbol SF3.093 E F0 .593 (list, or if the command')3.093 F 3.093(sr)-.55 G .593(eturn v)-3.093 F .593(alue is being in)-.25 F -.15(ve)-.4 G .593(rted via).15 F F1(!) 3.093 E F0 5.593(.T)C(he)-5.593 E F13.093 E F0 .594 (option causes the)3.094 F .569 (shell to print a list of signal names and their corresponding numbers.) 144 357.6 R .568(Signals ignored upon entry)5.568 F .401 (to the shell cannot be trapped or reset.)144 369.6 R -.35(Tr)5.402 G .402(apped signals are reset to their original v).35 F .402 (alues in a child)-.25 F 1.685(process when it is created.)144 381.6 R 1.685(The return status is f)6.685 F 1.685(alse if an)-.1 F(y)-.15 E F2 (sigspec)4.185 E F0 1.685(is in)4.185 F -.25(va)-.4 G 1.685 (lid; otherwise).25 F F1(trap)4.185 E F0(returns true.)144 393.6 Q F1 (type)108 410.4 Q F0([)2.5 E F1(\255atp)A F0(])A F2(name)2.5 E F0([)2.5 E F2(name)A F0(...])2.5 E -.4(Wi)144 422.4 S .205 (th no options, indicate ho).4 F 2.705(we)-.25 G(ach)-2.705 E F2(name) 2.705 E F0 -.1(wo)2.705 G .205 (uld be interpreted if used as a command name.).1 F .206(If the)5.206 F F1144 434.4 Q F0 .959(option is used,)3.459 F F1(type)3.459 E F0 .959(prints a string which is one of)3.459 F F2(alias)3.459 E F0(,).27 E F2 -.1(ke)3.459 G(ywor)-.2 E(d)-.37 E F0(,).77 E F2(function)3.459 E F0 (,).24 E F2 -.2(bu)3.459 G(iltin).2 E F0 3.459(,o).24 G(r)-3.459 E F2 (\214le)3.458 E F0(if)3.458 E F2(name)144 446.4 Q F0 .15 (is an alias, shell reserv)2.65 F .15(ed w)-.15 F .15(ord, function, b) -.1 F .15(uiltin, or disk \214le, respecti)-.2 F -.15(ve)-.25 G(ly).15 E 5.15(.I)-.65 G 2.65(ft)-5.15 G(he)-2.65 E F2(name)2.65 E F0 .15(is not) 2.65 F .119(found, then nothing is printed, and an e)144 458.4 R .118 (xit status of f)-.15 F .118(alse is returned.)-.1 F .118(If the)5.118 F F12.618 E F0 .118(option is used,)2.618 F F1(type)2.618 E F0 .885 (either returns the name of the disk \214le that w)144 470.4 R .885 (ould be e)-.1 F -.15(xe)-.15 G .885(cuted if).15 F F2(name)3.385 E F0 .885(were speci\214ed as a com-)3.385 F 1.025(mand name, or nothing if) 144 482.4 R/F6 10/Courier@0 SF 1.025(type -t name)3.525 F F0 -.1(wo) 3.525 G 1.025(uld not return).1 F F2(\214le)3.525 E F0 6.025(.I).18 G 3.524(fac)-6.025 G 1.024(ommand is hashed,)-3.524 F F13.524 E F0 .158(prints the hashed v)144 494.4 R .159 (alue, not necessarily the \214le that appears \214rst in)-.25 F F3 -.666(PA)2.659 G(TH)-.189 E F4(.)A F0 .159(If the)4.659 F F12.659 E F0 .159(option is used,)2.659 F F1(type)144 506.4 Q F0 1.32 (prints all of the places that contain an e)3.82 F -.15(xe)-.15 G 1.32 (cutable named).15 F F2(name)3.82 E F0 6.32(.T).18 G 1.32 (his includes aliases and)-6.32 F .251(functions, if and only if the)144 518.4 R F12.751 E F0 .251(option is not also used.)2.751 F .251 (The table of hashed commands is not con-)5.251 F .2(sulted when using) 144 530.4 R F12.7 E F0(.)A F1(type)5.2 E F0 .2(returns true if an) 2.7 F 2.699(yo)-.15 G 2.699(ft)-2.699 G .199(he ar)-2.699 F .199 (guments are found, f)-.18 F .199(alse if none are found.)-.1 F F1 (ulimit)108 547.2 Q F0([)2.5 E F1(\255SHacd\215mnpstuv)A F0([)2.5 E F2 (limit)A F0(]])A(Pro)144 559.2 Q .243(vides control o)-.15 F -.15(ve) -.15 G 2.743(rt).15 G .243(he resources a)-2.743 F -.25(va)-.2 G .244 (ilable to the shell and to processes started by it, on systems).25 F .944(that allo)144 571.2 R 3.444(ws)-.25 G .944(uch control.)-3.444 F (The)5.944 E F13.444 E F0(and)3.444 E F13.444 E F0 .943 (options specify that the hard or soft limit is set for the)3.444 F(gi) 144 583.2 Q -.15(ve)-.25 G 2.737(nr).15 G 2.737(esource. A)-2.737 F .238 (hard limit cannot be increased once it is set; a soft limit may be inc\ reased up to)2.738 F .356(the v)144 595.2 R .356 (alue of the hard limit.)-.25 F .356(If neither)5.356 F F12.856 E F0(nor)2.856 E F12.856 E F0 .355 (is speci\214ed, both the soft and hard limits are set.)2.855 F .44 (The v)144 607.2 R .44(alue of)-.25 F F2(limit)2.94 E F0 .441(can be a \ number in the unit speci\214ed for the resource or one of the special v) 2.94 F(al-)-.25 E(ues)144 619.2 Q F1(hard)3.019 E F0(,)A F1(soft)3.019 E F0 3.019(,o)C(r)-3.019 E F1(unlimited)3.019 E F0 3.018(,w)C .518 (hich stand for the current hard limit, the current soft limit, and no) -3.018 F .398(limit, respecti)144 631.2 R -.15(ve)-.25 G(ly).15 E 5.398 (.I)-.65 G(f)-5.398 E F2(limit)2.898 E F0 .399 (is omitted, the current v)2.899 F .399 (alue of the soft limit of the resource is printed,)-.25 F .37 (unless the)144 643.2 R F12.87 E F0 .37(option is gi)2.87 F -.15 (ve)-.25 G 2.87(n. When).15 F .37 (more than one resource is speci\214ed, the limit name and unit)2.87 F (are printed before the v)144 655.2 Q 2.5(alue. Other)-.25 F (options are interpreted as follo)2.5 E(ws:)-.25 E F1144 667.2 Q F0(All current limits are reported)25.3 E F1144 679.2 Q F0 (The maximum size of core \214les created)25.86 E F1144 691.2 Q F0 (The maximum size of a process')24.74 E 2.5(sd)-.55 G(ata se)-2.5 E (gment)-.15 E F1144 703.2 Q F0 (The maximum size of \214les created by the shell)26.97 E F1144 715.2 Q F0(The maximum size that may be lock)27.52 E(ed into memory)-.1 E(GNU Bash-2.05a)72 768 Q(2001 No)126.115 E -.15(ve)-.15 G(mber 13).15 E (55)185.545 E EP %%Page: 56 56 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\)) -.35 E/F1 10/Times-Bold@0 SF144 84 Q F0 (The maximum resident set size)21.97 E F1144 96 Q F0 .791(The max\ imum number of open \214le descriptors \(most systems do not allo)24.74 F 3.291(wt)-.25 G .791(his v)-3.291 F .791(alue to)-.25 F(be set\))180 108 Q F1144 120 Q F0 (The pipe size in 512-byte blocks \(this may not be set\))24.74 E F1 144 132 Q F0(The maximum stack size)26.41 E F1144 144 Q F0 (The maximum amount of cpu time in seconds)26.97 E F1144 156 Q F0 (The maximum number of processes a)24.74 E -.25(va)-.2 G (ilable to a single user).25 E F1144 168 Q F0 (The maximum amount of virtual memory a)25.3 E -.25(va)-.2 G (ilable to the shell).25 E(If)144 184.8 Q/F2 10/Times-Italic@0 SF(limit) 2.882 E F0 .382(is gi)2.882 F -.15(ve)-.25 G .382(n, it is the ne).15 F 2.882(wv)-.25 G .381(alue of the speci\214ed resource \(the)-3.132 F F1 2.881 E F0 .381(option is display only\).)2.881 F .381(If no)5.381 F .175(option is gi)144 196.8 R -.15(ve)-.25 G .175(n, then).15 F F1 2.675 E F0 .175(is assumed.)2.675 F -1.11(Va)5.175 G .175 (lues are in 1024-byte increments, e)1.11 F .176(xcept for)-.15 F F1 2.676 E F0 2.676(,w)C .176(hich is in)-2.676 F(seconds,)144 208.8 Q F12.698 E F0 2.698(,w)C .198 (hich is in units of 512-byte blocks, and)-2.698 F F12.698 E F0 (and)2.698 E F12.697 E F0 2.697(,w)C .197(hich are unscaled v) -2.697 F 2.697(alues. The)-.25 F .404(return status is 0 unless an in) 144 220.8 R -.25(va)-.4 G .404(lid option or ar).25 F .404 (gument is supplied, or an error occurs while setting)-.18 F 2.5(an)144 232.8 S .5 -.25(ew l)-2.5 H(imit.).25 E F1(umask)108 249.6 Q F0([)2.5 E F1A F0 2.5(][)C F1-2.5 E F0 2.5(][)C F2(mode)-2.5 E F0(])A .23(The user \214le-creation mask is set to)144 261.6 R F2(mode)2.73 E F0 5.23(.I).18 G(f)-5.23 E F2(mode)2.73 E F0(be)2.729 E .229 (gins with a digit, it is interpreted as an octal)-.15 F .066(number; o\ therwise it is interpreted as a symbolic mode mask similar to that acce\ pted by)144 273.6 R F2 -.15(ch)2.566 G(mod).15 E F0(\(1\).).77 E(If)144 285.6 Q F2(mode)2.912 E F0 .412(is omitted, the current v)2.912 F .412 (alue of the mask is printed.)-.25 F(The)5.411 E F12.911 E F0 .411 (option causes the mask to be)2.911 F .547 (printed in symbolic form; the def)144 297.6 R .547 (ault output is an octal number)-.1 F 5.547(.I)-.55 G 3.047(ft)-5.547 G (he)-3.047 E F13.047 E F0 .547(option is supplied, and)3.047 F F2 (mode)144 309.6 Q F0 .578 (is omitted, the output is in a form that may be reused as input.)3.079 F .578(The return status is 0 if the)5.578 F(mode w)144 321.6 Q (as successfully changed or if no)-.1 E F2(mode)2.5 E F0(ar)2.5 E (gument w)-.18 E(as supplied, and f)-.1 E(alse otherwise.)-.1 E F1 (unalias)108 338.4 Q F0<5bad>2.5 E F1(a)A F0 2.5(][)C F2(name)-2.5 E F0 (...])2.5 E(Remo)144 350.4 Q 1.955 -.15(ve e)-.15 H(ach).15 E F2(name) 4.155 E F0 1.655(from the list of de\214ned aliases.)4.155 F(If)6.655 E F14.155 E F0 1.655(is supplied, all alias de\214nitions are)4.155 F(remo)144 362.4 Q -.15(ve)-.15 G 2.5(d. The).15 F(return v)2.5 E (alue is true unless a supplied)-.25 E F2(name)2.5 E F0 (is not a de\214ned alias.)2.5 E F1(unset)108 379.2 Q F0<5bad>2.5 E F1 (fv)A F0 2.5(][)C F2(name)-2.5 E F0(...])2.5 E -.15(Fo)144 391.2 S 3.107 (re).15 G(ach)-3.107 E F2(name)3.107 E F0 3.107(,r).18 G(emo)-3.107 E .907 -.15(ve t)-.15 H .607(he corresponding v).15 F .607 (ariable or function.)-.25 F .606(If no options are supplied, or the) 5.607 F F1144 403.2 Q F0 .336(option is gi)2.836 F -.15(ve)-.25 G .336(n, each).15 F F2(name)2.836 E F0 .336(refers to a shell v)2.836 F 2.837(ariable. Read-only)-.25 F -.25(va)2.837 G .337 (riables may not be unset.).25 F(If)5.337 E F1144 415.2 Q F0 .633 (is specifed, each)3.133 F F2(name)3.133 E F0 .632 (refers to a shell function, and the function de\214nition is remo)3.133 F -.15(ve)-.15 G 3.132(d. Each).15 F .902(unset v)144 427.2 R .902 (ariable or function is remo)-.25 F -.15(ve)-.15 G 3.402(df).15 G .902 (rom the en)-3.402 F .903(vironment passed to subsequent commands.)-.4 F (If)5.903 E(an)144 439.2 Q 4.285(yo)-.15 G(f)-4.285 E/F3 9/Times-Bold@0 SF(RANDOM)4.285 E/F4 9/Times-Roman@0 SF(,)A F3(SECONDS)4.035 E F4(,)A F3 (LINENO)4.035 E F4(,)A F3(HISTCMD)4.035 E F4(,)A F3(FUNCN)4.035 E(AME) -.18 E F4(,)A F3(GR)4.035 E(OUPS)-.27 E F4(,)A F0(or)4.035 E F3(DIRST) 4.284 E -.495(AC)-.81 G(K).495 E F0(are)4.034 E .328(unset, the)144 451.2 R 2.828(yl)-.15 G .328(ose their special properties, e)-2.828 F -.15(ve)-.25 G 2.828(ni).15 G 2.828(ft)-2.828 G(he)-2.828 E 2.828(ya) -.15 G .328(re subsequently reset.)-2.828 F .328(The e)5.328 F .329 (xit status is true)-.15 F(unless a)144 463.2 Q F2(name)2.5 E F0 (does not e)2.5 E(xist or is readonly)-.15 E(.)-.65 E F1(wait)108 480 Q F0([)2.5 E F2(n)A F0(])A -.8(Wa)144 492 S 1.061 (it for the speci\214ed process and return its termination status.).8 F F2(n)6.061 E F0 1.06(may be a process ID or a job)3.56 F .753 (speci\214cation; if a job spec is gi)144 504 R -.15(ve)-.25 G .754 (n, all processes in that job').15 F 3.254(sp)-.55 G .754(ipeline are w) -3.254 F .754(aited for)-.1 F 5.754(.I)-.55 G(f)-5.754 E F2(n)3.254 E F0 .754(is not)3.254 F(gi)144 516 Q -.15(ve)-.25 G .027 (n, all currently acti).15 F .327 -.15(ve c)-.25 H .027 (hild processes are w).15 F .027(aited for)-.1 F 2.526(,a)-.4 G .026 (nd the return status is zero.)-2.526 F(If)5.026 E F2(n)2.526 E F0 (speci\214es)2.526 E 2.595(an)144 528 S(on-e)-2.595 E .095 (xistent process or job, the return status is 127.)-.15 F .096 (Otherwise, the return status is the e)5.095 F .096(xit status)-.15 F (of the last process or job w)144 540 Q(aited for)-.1 E(.)-.55 E/F5 10.95/Times-Bold@0 SF(RESTRICTED SHELL)72 556.8 Q F0(If)108 568.8 Q F1 (bash)4.397 E F0 1.897(is started with the name)4.397 F F1(rbash)4.397 E F0 4.397(,o)C 4.397(rt)-4.397 G(he)-4.397 E F14.397 E F0 1.896 (option is supplied at in)4.397 F -.2(vo)-.4 G 1.896 (cation, the shell becomes).2 F 3.445(restricted. A)108 580.8 R .945 (restricted shell is used to set up an en)3.445 F .946 (vironment more controlled than the standard shell.)-.4 F(It)5.946 E (beha)108 592.8 Q -.15(ve)-.2 G 2.5(si).15 G(dentically to)-2.5 E F1 (bash)2.5 E F0(with the e)2.5 E(xception that the follo)-.15 E (wing are disallo)-.25 E(wed or not performed:)-.25 E 32.5<8363>108 609.6 S(hanging directories with)-32.5 E F1(cd)2.5 E F0 32.5<8373>108 626.4 S(etting or unsetting the v)-32.5 E(alues of)-.25 E F1(SHELL)2.5 E F0(,)A F1 -.74(PA)2.5 G(TH)-.21 E F0(,)A F1(ENV)2.5 E F0 2.5(,o)C(r)-2.5 E F1 -.3(BA)2.5 G(SH_ENV).3 E F0 32.5<8373>108 643.2 S (pecifying command names containing)-32.5 E F1(/)2.5 E F0 32.5<8373>108 660 S(pecifying a \214le name containing a)-32.5 E F1(/)2.5 E F0 (as an ar)2.5 E(gument to the)-.18 E F1(.)2.5 E F0 -.2(bu)5 G (iltin command).2 E 32.5<8353>108 676.8 S .351 (pecifying a \214lename containing a slash as an ar)-32.5 F .351 (gument to the)-.18 F F12.851 E F0 .351(option to the)2.851 F F1 (hash)2.851 E F0 -.2(bu)2.851 G .351(iltin com-).2 F(mand)144 688.8 Q 32.5<8369>108 705.6 S(mporting function de\214nitions from the shell en) -32.5 E(vironment at startup)-.4 E(GNU Bash-2.05a)72 768 Q(2001 No) 126.115 E -.15(ve)-.15 G(mber 13).15 E(56)185.545 E EP %%Page: 57 57 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\)) -.35 E 32.5<8370>108 84 S(arsing the v)-32.5 E(alue of)-.25 E/F1 10 /Times-Bold@0 SF(SHELLOPTS)2.5 E F0(from the shell en)2.5 E (vironment at startup)-.4 E 32.5<8372>108 100.8 S(edirecting output usi\ ng the >, >|, <>, >&, &>, and >> redirection operators)-32.5 E 32.5 <8375>108 117.6 S(sing the)-32.5 E F1(exec)2.5 E F0 -.2(bu)2.5 G (iltin command to replace the shell with another command).2 E 32.5<8361> 108 134.4 S(dding or deleting b)-32.5 E(uiltin commands with the)-.2 E F12.5 E F0(and)2.5 E F12.5 E F0(options to the)2.5 E F1 (enable)2.5 E F0 -.2(bu)2.5 G(iltin command).2 E 32.5<8373>108 151.2 S (pecifying the)-32.5 E F12.5 E F0(option to the)2.5 E F1(command) 2.5 E F0 -.2(bu)2.5 G(iltin command).2 E 32.5<8374>108 168 S(urning of) -32.5 E 2.5(fr)-.25 G(estricted mode with)-2.5 E F1(set +r)2.5 E F0(or) 2.5 E F1(set +o r)2.5 E(estricted)-.18 E F0(.)A (These restrictions are enforced after an)108 184.8 Q 2.5(ys)-.15 G (tartup \214les are read.)-2.5 E 1.566 (When a command that is found to be a shell script is e)108 201.6 R -.15 (xe)-.15 G 1.567(cuted \(see).15 F/F2 9/Times-Bold@0 SF 1.567 (COMMAND EXECUTION)4.067 F F0(abo)3.817 E -.15(ve)-.15 G(\),).15 E F1 (rbash)108 213.6 Q F0(turns of)2.5 E 2.5(fa)-.25 G .3 -.15(ny r)-2.5 H (estrictions in the shell spa).15 E(wned to e)-.15 E -.15(xe)-.15 G (cute the script.).15 E/F3 10.95/Times-Bold@0 SF(SEE ALSO)72 230.4 Q/F4 10/Times-Italic@0 SF(Bash Refer)108 242.4 Q(ence Manual)-.37 E F0 2.5 (,B)C(rian F)-2.5 E(ox and Chet Rame)-.15 E(y)-.15 E F4 (The Gnu Readline Libr)108 254.4 Q(ary)-.15 E F0 2.5(,B)C(rian F)-2.5 E (ox and Chet Rame)-.15 E(y)-.15 E F4(The Gnu History Libr)108 266.4 Q (ary)-.15 E F0 2.5(,B)C(rian F)-2.5 E(ox and Chet Rame)-.15 E(y)-.15 E F4 -.8(Po)108 278.4 S(rtable Oper).8 E (ating System Interface \(POSIX\) P)-.15 E(art 2: Shell and Utilities) -.8 E F0 2.5(,I)C(EEE)-2.5 E F4(sh)108 290.4 Q F0(\(1\),)A F4(ksh)2.5 E F0(\(1\),)A F4(csh)2.5 E F0(\(1\))A F4(emacs)108 302.4 Q F0(\(1\),)A F4 (vi)2.5 E F0(\(1\))A F4 -.37(re)108 314.4 S(adline).37 E F0(\(3\))A F3 (FILES)72 331.2 Q F4(/bin/bash)109.666 343.2 Q F0(The)144 355.2 Q F1 (bash)2.5 E F0 -.15(exe)2.5 G(cutable).15 E F4(/etc/pr)109.666 367.2 Q (o\214le)-.45 E F0(The systemwide initialization \214le, e)144 379.2 Q -.15(xe)-.15 G(cuted for login shells).15 E F4(~/.bash_pr)109.666 391.2 Q(o\214le)-.45 E F0(The personal initialization \214le, e)144 403.2 Q -.15(xe)-.15 G(cuted for login shells).15 E F4(~/.bashr)109.666 415.2 Q (c)-.37 E F0(The indi)144 427.2 Q(vidual per)-.25 E(-interacti)-.2 E -.15(ve)-.25 G(-shell startup \214le).15 E F4(~/.bash_lo)109.666 439.2 Q (gout)-.1 E F0(The indi)144 451.2 Q (vidual login shell cleanup \214le, e)-.25 E -.15(xe)-.15 G (cuted when a login shell e).15 E(xits)-.15 E F4(~/.inputr)109.666 463.2 Q(c)-.37 E F0(Indi)144 475.2 Q(vidual)-.25 E F4 -.37(re)2.5 G(adline).37 E F0(initialization \214le)2.5 E F3 -.548(AU)72 492 S(THORS).548 E F0 (Brian F)108 504 Q(ox, Free Softw)-.15 E(are F)-.1 E(oundation)-.15 E (bfox@gnu.or)108 516 Q(g)-.18 E(Chet Rame)108 532.8 Q 1.3 -.65(y, C)-.15 H(ase W).65 E(estern Reserv)-.8 E 2.5(eU)-.15 G(ni)-2.5 E -.15(ve)-.25 G (rsity).15 E(chet@ins.CWR)108 544.8 Q(U.Edu)-.4 E F3 -.11(BU)72 561.6 S 2.738(GR).11 G(EPOR)-2.738 E(TS)-.438 E F0 .568(If you \214nd a b)108 573.6 R .568(ug in)-.2 F F1(bash,)3.068 E F0 .568(you should report it.) 3.068 F .568(But \214rst, you should mak)5.568 F 3.068(es)-.1 G .568 (ure that it really is a b)-3.068 F .567(ug, and)-.2 F (that it appears in the latest v)108 585.6 Q(ersion of)-.15 E F1(bash) 2.5 E F0(that you ha)2.5 E -.15(ve)-.2 G(.).15 E .437(Once you ha)108 602.4 R .737 -.15(ve d)-.2 H .438(etermined that a b).15 F .438 (ug actually e)-.2 F .438(xists, use the)-.15 F F4(bashb)2.938 E(ug)-.2 E F0 .438(command to submit a b)2.938 F .438(ug report.)-.2 F(If)5.438 E .595(you ha)108 614.4 R .895 -.15(ve a \214)-.2 H .595 (x, you are encouraged to mail that as well!).15 F .594 (Suggestions and `philosophical' b)5.595 F .594(ug reports may)-.2 F (be mailed to)108 626.4 Q F4 -.2(bu)2.5 G(g-bash@gnu.or).2 E(g)-.37 E F0 (or posted to the Usenet ne)2.5 E(wsgroup)-.25 E F1(gnu.bash.b)2.5 E(ug) -.2 E F0(.)A(ALL b)108 643.2 Q(ug reports should include:)-.2 E(The v) 108 660 Q(ersion number of)-.15 E F1(bash)2.5 E F0(The hardw)108 672 Q (are and operating system)-.1 E(The compiler used to compile)108 684 Q 2.5(Ad)108 696 S(escription of the b)-2.5 E(ug beha)-.2 E(viour)-.2 E (GNU Bash-2.05a)72 768 Q(2001 No)126.115 E -.15(ve)-.15 G(mber 13).15 E (57)185.545 E EP %%Page: 58 58 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\)) -.35 E 2.5(As)108 84 S(hort script or `recipe' which e)-2.5 E -.15(xe) -.15 G(rcises the b).15 E(ug)-.2 E/F1 10/Times-Italic@0 SF(bashb)108 100.8 Q(ug)-.2 E F0 (inserts the \214rst three items automatically into the template it pro) 2.5 E(vides for \214ling a b)-.15 E(ug report.)-.2 E(Comments and b)108 117.6 Q(ug reports concerning this manual page should be directed to)-.2 E F1 -.15(ch)2.5 G(et@ins.CWR).15 E -.25(U.)-.4 G(Edu).25 E F0(.).25 E /F2 10.95/Times-Bold@0 SF -.11(BU)72 134.4 S(GS).11 E F0(It')108 146.4 Q 2.5(st)-.55 G(oo big and too slo)-2.5 E -.65(w.)-.25 G 1.868 (There are some subtle dif)108 163.2 R 1.868(ferences between)-.25 F/F3 10/Times-Bold@0 SF(bash)4.369 E F0 1.869(and traditional v)4.369 F 1.869 (ersions of)-.15 F F3(sh)4.369 E F0 4.369(,m)C 1.869 (ostly because of the)-4.369 F/F4 9/Times-Bold@0 SF(POSIX)108 175.2 Q F0 (speci\214cation.)2.25 E(Aliases are confusing in some uses.)108 192 Q (Shell b)108 208.8 Q (uiltin commands and functions are not stoppable/restartable.)-.2 E .178 (Compound commands and command sequences of the form `a ; b ; c' are no\ t handled gracefully when pro-)108 225.6 R .018 (cess suspension is attempted.)108 237.6 R .019 (When a process is stopped, the shell immediately e)5.018 F -.15(xe)-.15 G .019(cutes the ne).15 F .019(xt command)-.15 F .47(in the sequence.) 108 249.6 R .47(It suf)5.47 F .47(\214ces to place the sequence of comm\ ands between parentheses to force it into a sub-)-.25 F (shell, which may be stopped as a unit.)108 261.6 Q .955 (Commands inside of)108 278.4 R F3($\()3.455 E F0(...)A F3(\))A F0 .956 (command substitution are not parsed until substitution is attempted.) 3.455 F .956(This will)5.956 F (delay error reporting until some time after the command is entered.)108 290.4 Q(Array v)108 307.2 Q(ariables may not \(yet\) be e)-.25 E (xported.)-.15 E(GNU Bash-2.05a)72 768 Q(2001 No)126.115 E -.15(ve)-.15 G(mber 13).15 E(58)185.545 E EP %%Trailer end %%EOF doc/bashbug.ps100664 436 0 17553 6604470056 12063 0ustar chetwheel%!PS-Adobe-3.0 %%Creator: groff version 1.10 %%CreationDate: Wed Sep 30 13:53:50 1998 %%DocumentNeededResources: font Times-Roman %%+ font Times-Bold %%+ font Times-Italic %%DocumentSuppliedResources: procset grops 1.10 0 %%Pages: 1 %%PageOrder: Ascend %%Orientation: Portrait %%EndComments %%BeginProlog %%BeginResource: procset grops 1.10 0 /setpacking where{ pop currentpacking true setpacking }if /grops 120 dict dup begin /SC 32 def /A/show load def /B{0 SC 3 -1 roll widthshow}bind def /C{0 exch ashow}bind def /D{0 exch 0 SC 5 2 roll awidthshow}bind def /E{0 rmoveto show}bind def /F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def /G{0 rmoveto 0 exch ashow}bind def /H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def /I{0 exch rmoveto show}bind def /J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def /K{0 exch rmoveto 0 exch ashow}bind def /L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def /M{rmoveto show}bind def /N{rmoveto 0 SC 3 -1 roll widthshow}bind def /O{rmoveto 0 exch ashow}bind def /P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def /Q{moveto show}bind def /R{moveto 0 SC 3 -1 roll widthshow}bind def /S{moveto 0 exch ashow}bind def /T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def /SF{ findfont exch [exch dup 0 exch 0 exch neg 0 0]makefont dup setfont [exch/setfont cvx]cvx bind def }bind def /MF{ findfont [5 2 roll 0 3 1 roll neg 0 0]makefont dup setfont [exch/setfont cvx]cvx bind def }bind def /level0 0 def /RES 0 def /PL 0 def /LS 0 def /MANUAL{ statusdict begin/manualfeed true store end }bind def /PLG{ gsave newpath clippath pathbbox grestore exch pop add exch pop }bind def /BP{ /level0 save def 1 setlinecap 1 setlinejoin 72 RES div dup scale LS{ 90 rotate }{ 0 PL translate }ifelse 1 -1 scale }bind def /EP{ level0 restore showpage }bind def /DA{ newpath arcn stroke }bind def /SN{ transform .25 sub exch .25 sub exch round .25 add exch round .25 add exch itransform }bind def /DL{ SN moveto SN lineto stroke }bind def /DC{ newpath 0 360 arc closepath }bind def /TM matrix def /DE{ TM currentmatrix pop translate scale newpath 0 0 .5 0 360 arc closepath TM setmatrix }bind def /RC/rcurveto load def /RL/rlineto load def /ST/stroke load def /MT/moveto load def /CL/closepath load def /FL{ currentgray exch setgray fill setgray }bind def /BL/fill load def /LW/setlinewidth load def /RE{ findfont dup maxlength 1 index/FontName known not{1 add}if dict begin { 1 index/FID ne{def}{pop pop}ifelse }forall /Encoding exch def dup/FontName exch def currentdict end definefont pop }bind def /DEFS 0 def /EBEGIN{ moveto DEFS begin }bind def /EEND/end load def /CNT 0 def /level1 0 def /PBEGIN{ /level1 save def translate div 3 1 roll div exch scale neg exch neg exch translate 0 setgray 0 setlinecap 1 setlinewidth 0 setlinejoin 10 setmiterlimit []0 setdash /setstrokeadjust where{ pop false setstrokeadjust }if /setoverprint where{ pop false setoverprint }if newpath /CNT countdictstack def userdict begin /showpage{}def }bind def /PEND{ clear countdictstack CNT sub{end}repeat level1 restore }bind def end def /setpacking where{ pop setpacking }if %%EndResource %%IncludeResource: font Times-Roman %%IncludeResource: font Times-Bold %%IncludeResource: font Times-Italic grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72 def/PL 792 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron/Zcaron /scaron/zcaron/Ydieresis/trademark/quotesingle/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/space/exclam/quotedbl/numbersign/dollar/percent /ampersand/quoteright/parenleft/parenright/asterisk/plus/comma/hyphen /period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon /semicolon/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O /P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright/circumflex /underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y /z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase/guillemotleft /guillemotright/bullet/florin/fraction/perthousand/dagger/daggerdbl /endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut /dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash /quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen /brokenbar/section/dieresis/copyright/ordfeminine/guilsinglleft /logicalnot/minus/registered/macron/degree/plusminus/twosuperior /threesuperior/acute/mu/paragraph/periodcentered/cedilla/onesuperior /ordmasculine/guilsinglright/onequarter/onehalf/threequarters /questiondown/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE /Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex /Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis /multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn /germandbls/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla /egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis /eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide/oslash /ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis]def /Times-Italic@0 ENC0/Times-Italic RE/Times-Bold@0 ENC0/Times-Bold RE /Times-Roman@0 ENC0/Times-Roman RE %%EndProlog %%Page: 1 1 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF -.35(BA)72 48 S(SHB).35 E 347.52(UG\(1\) B)-.1 F (ASHB)-.35 E(UG\(1\))-.1 E/F1 9/Times-Bold@0 SF -.18(NA)72 84 S(ME).18 E F0(bashb)108 96 Q(ug \255 report a b)-.2 E(ug in bash)-.2 E F1(SYNOPSIS) 72 112.8 Q/F2 10/Times-Bold@0 SF(bashb)108 124.8 Q(ug)-.2 E F0([)2.5 E /F3 10/Times-Italic@0 SF(addr)A(ess)-.37 E F0(])A F1(DESCRIPTION)72 141.6 Q F2(bashb)108 153.6 Q(ug)-.2 E F0 .446 (is a shell script to help the user compose and mail b)2.947 F .446 (ug reports concerning bash in a standard for)-.2 F(-)-.2 E(mat.)108 165.6 Q F2(bashb)5.961 E(ug)-.2 E F0(in)3.461 E -.2(vo)-.4 G -.1(ke).2 G 3.461(st).1 G .962(he editor speci\214ed by the en)-3.461 F .962 (vironment v)-.4 F(ariable)-.25 E F1(EDIT)3.462 E(OR)-.162 E F0 .962 (on a temporary cop)3.212 F 3.462(yo)-.1 G(f)-3.462 E .374(the b)108 177.6 R .374(ug report format outline. The user must \214ll in the appr\ opriate \214elds and e)-.2 F .374(xit the editor)-.15 F(.)-.55 E F2 (bashb)5.373 E(ug)-.2 E F0(then)2.873 E .439 (mails the completed report to)108 189.6 R F3 -.2(bu)2.939 G (g-bash@gnu.or).2 E(g)-.37 E F0 2.939(,o)C(r)-2.939 E F3(addr)2.939 E (ess)-.37 E F0 5.439(.I)C 2.939(ft)-5.439 G .44 (he report cannot be mailed, it is sa)-2.939 F -.15(ve)-.2 G 2.94(di).15 G(n)-2.94 E(the \214le)108 201.6 Q F3(dead.bashb)2.5 E(ug)-.2 E F0 (in the in)2.5 E -.2(vo)-.4 G(king user').2 E 2.5(sh)-.55 G (ome directory)-2.5 E(.)-.65 E .354(The b)108 218.4 R .354 (ug report format outline consists of se)-.2 F -.15(ve)-.25 G .353 (ral sections.).15 F .353(The \214rst section pro)5.353 F .353 (vides information about the)-.15 F .37 (machine, operating system, the bash v)108 230.4 R .371 (ersion, and the compilation en)-.15 F 2.871(vironment. The)-.4 F .371 (second section should)2.871 F .209 (be \214lled in with a description of the b)108 242.4 R 2.709(ug. The) -.2 F .208(third section should be a description of ho)2.709 F 2.708(wt) -.25 G 2.708(or)-2.708 G .208(eproduce the)-2.708 F -.2(bu)108 254.4 S 2.5(g. The).2 F(optional fourth section is for a proposed \214x.)2.5 E (Fix)5 E(es are encouraged.)-.15 E F1(ENVIR)72 271.2 Q(ONMENT)-.27 E F2 (bashb)108 283.2 Q(ug)-.2 E F0(will utilize the follo)2.5 E(wing en)-.25 E(vironment v)-.4 E(ariables if the)-.25 E 2.5(ye)-.15 G(xist:)-2.65 E F2(EDIT)108 300 Q(OR)-.18 E F0(Speci\214es the preferred editor)144 312 Q 2.5(.I)-.55 G(f)-2.5 E F1(EDIT)2.5 E(OR)-.162 E F0(is not set,)2.25 E F2(bashb)2.5 E(ug)-.2 E F0(def)2.5 E(aults to)-.1 E F2(emacs)2.5 E F0(.) A F2(HOME)108 328.8 Q F0(Directory in which the f)144 340.8 Q(ailed b) -.1 E(ug report is sa)-.2 E -.15(ve)-.2 G 2.5(di).15 G 2.5(ft)-2.5 G (he mail f)-2.5 E(ails.)-.1 E 184.005(GNU 1998)72 768 R(July 30)2.5 E(1) 203.165 E EP %%Trailer end %%EOF doc/builtins.ps100664 436 0 371113 7374257266 12327 0ustar chetwheel%!PS-Adobe-3.0 %%Creator: groff version 1.16.1 %%CreationDate: Tue Nov 13 12:56:06 2001 %%DocumentNeededResources: font Times-Roman %%+ font Times-Bold %%+ font Times-Italic %%+ font Symbol %%+ font Courier %%DocumentSuppliedResources: procset grops 1.16 1 %%Pages: 17 %%PageOrder: Ascend %%Orientation: Portrait %%EndComments %%BeginProlog %%BeginResource: procset grops 1.16 1 /setpacking where{ pop currentpacking true setpacking }if /grops 120 dict dup begin /SC 32 def /A/show load def /B{0 SC 3 -1 roll widthshow}bind def /C{0 exch ashow}bind def /D{0 exch 0 SC 5 2 roll awidthshow}bind def /E{0 rmoveto show}bind def /F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def /G{0 rmoveto 0 exch ashow}bind def /H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def /I{0 exch rmoveto show}bind def /J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def /K{0 exch rmoveto 0 exch ashow}bind def /L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def /M{rmoveto show}bind def /N{rmoveto 0 SC 3 -1 roll widthshow}bind def /O{rmoveto 0 exch ashow}bind def /P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def /Q{moveto show}bind def /R{moveto 0 SC 3 -1 roll widthshow}bind def /S{moveto 0 exch ashow}bind def /T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def /SF{ findfont exch [exch dup 0 exch 0 exch neg 0 0]makefont dup setfont [exch/setfont cvx]cvx bind def }bind def /MF{ findfont [5 2 roll 0 3 1 roll neg 0 0]makefont dup setfont [exch/setfont cvx]cvx bind def }bind def /level0 0 def /RES 0 def /PL 0 def /LS 0 def /MANUAL{ statusdict begin/manualfeed true store end }bind def /PLG{ gsave newpath clippath pathbbox grestore exch pop add exch pop }bind def /BP{ /level0 save def 1 setlinecap 1 setlinejoin 72 RES div dup scale LS{ 90 rotate }{ 0 PL translate }ifelse 1 -1 scale }bind def /EP{ level0 restore showpage }bind def /DA{ newpath arcn stroke }bind def /SN{ transform .25 sub exch .25 sub exch round .25 add exch round .25 add exch itransform }bind def /DL{ SN moveto SN lineto stroke }bind def /DC{ newpath 0 360 arc closepath }bind def /TM matrix def /DE{ TM currentmatrix pop translate scale newpath 0 0 .5 0 360 arc closepath TM setmatrix }bind def /RC/rcurveto load def /RL/rlineto load def /ST/stroke load def /MT/moveto load def /CL/closepath load def /FL{ currentgray exch setgray fill setgray }bind def /BL/fill load def /LW/setlinewidth load def /RE{ findfont dup maxlength 1 index/FontName known not{1 add}if dict begin { 1 index/FID ne{def}{pop pop}ifelse }forall /Encoding exch def dup/FontName exch def currentdict end definefont pop }bind def /DEFS 0 def /EBEGIN{ moveto DEFS begin }bind def /EEND/end load def /CNT 0 def /level1 0 def /PBEGIN{ /level1 save def translate div 3 1 roll div exch scale neg exch neg exch translate 0 setgray 0 setlinecap 1 setlinewidth 0 setlinejoin 10 setmiterlimit []0 setdash /setstrokeadjust where{ pop false setstrokeadjust }if /setoverprint where{ pop false setoverprint }if newpath /CNT countdictstack def userdict begin /showpage{}def }bind def /PEND{ clear countdictstack CNT sub{end}repeat level1 restore }bind def end def /setpacking where{ pop setpacking }if %%EndResource %%IncludeResource: font Times-Roman %%IncludeResource: font Times-Bold %%IncludeResource: font Times-Italic %%IncludeResource: font Symbol %%IncludeResource: font Courier grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72 def/PL 792 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron/Zcaron /scaron/zcaron/Ydieresis/trademark/quotesingle/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/space/exclam/quotedbl/numbersign/dollar/percent /ampersand/quoteright/parenleft/parenright/asterisk/plus/comma/hyphen /period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon /semicolon/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O /P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright/circumflex /underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y /z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase/guillemotleft /guillemotright/bullet/florin/fraction/perthousand/dagger/daggerdbl /endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut /dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash /quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen /brokenbar/section/dieresis/copyright/ordfeminine/guilsinglleft /logicalnot/minus/registered/macron/degree/plusminus/twosuperior /threesuperior/acute/mu/paragraph/periodcentered/cedilla/onesuperior /ordmasculine/guilsinglright/onequarter/onehalf/threequarters /questiondown/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE /Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex /Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis /multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn /germandbls/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla /egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis /eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide/oslash /ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis]def /Courier@0 ENC0/Courier RE/Times-Italic@0 ENC0/Times-Italic RE /Times-Bold@0 ENC0/Times-Bold RE/Times-Roman@0 ENC0/Times-Roman RE %%EndProlog %%Page: 1 1 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF -.35(BA)72 48 S(SH_B).35 E(UIL)-.1 E 290.48 (TINS\(1\) B)-.92 F(ASH_B)-.35 E(UIL)-.1 E(TINS\(1\))-.92 E/F1 10.95 /Times-Bold@0 SF -.219(NA)72 84 S(ME).219 E F0 .663 (bash, :, ., [, alias, bg, bind, break, b)108 96 R .662 (uiltin, case, cd, command, compgen, complete, continue, declare, dirs,) -.2 F(diso)108 108 Q .386(wn, echo, enable, e)-.25 F -.25(va)-.25 G .386 (l, e).25 F -.15(xe)-.15 G .386(c, e).15 F .386(xit, e)-.15 F .387 (xport, fc, fg, for)-.15 F 2.887(,g)-.4 G .387 (etopts, hash, help, history)-2.887 F 2.887(,i)-.65 G .387 (f, jobs, kill, let, local,)-2.887 F .68 (logout, popd, printf, pushd, pwd, read, readonly)108 120 R 3.179(,r) -.65 G .679 (eturn, set, shift, shopt, source, suspend, test, times, trap,)-3.179 F (type, typeset, ulimit, umask, unalias, unset, until, w)108 132 Q (ait, while \255 bash b)-.1 E(uilt-in commands, see)-.2 E/F2 10 /Times-Bold@0 SF(bash)2.5 E F0(\(1\))A F1 -.329(BA)72 148.8 S(SH B).329 E(UIL)-.11 E(TIN COMMANDS)-1.007 E F0 .062 (Unless otherwise noted, each b)108 160.8 R .062(uiltin command documen\ ted in this section as accepting options preceded by)-.2 F F2108 172.8 Q F0(accepts)2.5 E F22.5 E F0 (to signify the end of the options.)2.5 E F2(:)108 190.8 Q F0([)2.5 E/F3 10/Times-Italic@0 SF(ar)A(guments)-.37 E F0(])A .502(No ef)144 202.8 R .502(fect; the command does nothing be)-.25 F .502(yond e)-.15 F (xpanding)-.15 E F3(ar)3.002 E(guments)-.37 E F0 .501(and performing an) 3.001 F 3.001(ys)-.15 G(peci\214ed)-3.001 E 2.5(redirections. A)144 214.8 R(zero e)2.5 E(xit code is returned.)-.15 E F2(.)110.5 231.6 Q F3 (\214lename)6.666 E F0([)2.5 E F3(ar)A(guments)-.37 E F0(])A F2(sour)108 243.6 Q(ce)-.18 E F3(\214lename)2.5 E F0([)2.5 E F3(ar)A(guments)-.37 E F0(])A 1.169(Read and e)144 255.6 R -.15(xe)-.15 G 1.169 (cute commands from).15 F F3(\214lename)3.669 E F0 1.169 (in the current shell en)3.669 F 1.17(vironment and return the e)-.4 F (xit)-.15 E 1.82(status of the last command e)144 267.6 R -.15(xe)-.15 G 1.819(cuted from).15 F F3(\214lename)4.319 E F0 6.819(.I).18 G(f)-6.819 E F3(\214lename)4.319 E F0 1.819(does not contain a slash, \214le)4.319 F .608(names in)144 279.6 R/F4 9/Times-Bold@0 SF -.666(PA)3.108 G(TH) -.189 E F0 .608(are used to \214nd the directory containing)2.858 F F3 (\214lename)3.108 E F0 5.608(.T).18 G .608(he \214le searched for in) -5.608 F F4 -.666(PA)3.108 G(TH)-.189 E F0 .833(need not be e)144 291.6 R -.15(xe)-.15 G 3.333(cutable. When).15 F F2(bash)3.333 E F0 .832 (is not in)3.333 F F3 .832(posix mode)3.332 F F0 3.332(,t)C .832 (he current directory is searched if no)-3.332 F .981 (\214le is found in)144 303.6 R F4 -.666(PA)3.481 G(TH)-.189 E/F5 9 /Times-Roman@0 SF(.)A F0 .981(If the)5.481 F F2(sour)3.481 E(cepath)-.18 E F0 .981(option to the)3.481 F F2(shopt)3.481 E F0 -.2(bu)3.481 G .981 (iltin command is turned of).2 F .982(f, the)-.25 F F4 -.666(PA)144 315.6 S(TH)-.189 E F0 .112(is not searched.)2.363 F .112(If an)5.112 F (y)-.15 E F3(ar)2.612 E(guments)-.37 E F0 .112(are supplied, the)2.612 F 2.612(yb)-.15 G .112(ecome the positional parameters when)-2.612 F F3 (\214lename)144 327.6 Q F0 .341(is e)2.841 F -.15(xe)-.15 G 2.841 (cuted. Otherwise).15 F .341(the positional parameters are unchanged.) 2.841 F .342(The return status is the)5.342 F .716 (status of the last command e)144 339.6 R .716 (xited within the script \(0 if no commands are e)-.15 F -.15(xe)-.15 G .716(cuted\), and f).15 F .715(alse if)-.1 F F3(\214lename)144 351.6 Q F0(is not found or cannot be read.)2.5 E F2(alias)108 368.4 Q F0([)2.5 E F2A F0 2.5(][)C F3(name)-2.5 E F0([=)A F3(value)A F0 2.5(].)C(..]) -2.5 E F2(Alias)144 380.4 Q F0 2.724(with no ar)5.224 F 2.724 (guments or with the)-.18 F F25.224 E F0 2.724 (option prints the list of aliases in the form)5.224 F F2(alias)5.225 E F3(name)144 392.4 Q F0(=)A F3(value)A F0 .58(on standard output.)3.08 F .58(When ar)5.58 F .58 (guments are supplied, an alias is de\214ned for each)-.18 F F3(name) 3.08 E F0(whose)144 404.4 Q F3(value)2.895 E F0 .395(is gi)2.895 F -.15 (ve)-.25 G 2.895(n. A).15 F .395(trailing space in)2.895 F F3(value) 5.395 E F0 .395(causes the ne)2.895 F .395(xt w)-.15 F .395 (ord to be check)-.1 F .395(ed for alias sub-)-.1 F .054 (stitution when the alias is e)144 416.4 R 2.554(xpanded. F)-.15 F .054 (or each)-.15 F F3(name)2.554 E F0 .054(in the ar)2.554 F .054 (gument list for which no)-.18 F F3(value)2.554 E F0 .053(is sup-)2.553 F 1.313(plied, the name and v)144 428.4 R 1.314 (alue of the alias is printed.)-.25 F F2(Alias)6.314 E F0 1.314 (returns true unless a)3.814 F F3(name)3.814 E F0 1.314(is gi)3.814 F -.15(ve)-.25 G 3.814(nf).15 G(or)-3.814 E (which no alias has been de\214ned.)144 440.4 Q F2(bg)108 457.2 Q F0([) 2.5 E F3(jobspec)A F0(])A .357(Resume the suspended job)144 469.2 R F3 (jobspec)2.857 E F0 .356 (in the background, as if it had been started with)2.857 F F2(&)2.856 E F0 5.356(.I)C(f)-5.356 E F3(jobspec)2.856 E F0 .586 (is not present, the shell')144 481.2 R 3.086(sn)-.55 G .586 (otion of the)-3.086 F F3(curr)3.087 E .587(ent job)-.37 F F0 .587 (is used.)3.087 F F2(bg)5.587 E F3(jobspec)3.087 E F0 .587 (returns 0 unless run when)3.087 F .663(job control is disabled or)144 493.2 R 3.163(,w)-.4 G .663(hen run with job control enabled, if)-3.163 F F3(jobspec)3.163 E F0 -.1(wa)3.163 G 3.163(sn).1 G .663 (ot found or started)-3.163 F(without job control.)144 505.2 Q F2(bind) 108 522 Q F0([)2.5 E F2A F3 -.1(ke)2.5 G(ymap)-.2 E F0 2.5(][)C F2 (\255lpsvPSV)-2.5 E F0(])A F2(bind)108 534 Q F0([)2.5 E F2A F3 -.1 (ke)2.5 G(ymap)-.2 E F0 2.5(][)C F2-2.5 E F3(function)2.5 E F0 2.5 (][)C F2-2.5 E F3(function)2.5 E F0 2.5(][)C F2-2.5 E F3 -.1 (ke)2.5 G(yseq)-.2 E F0(])A F2(bind)108 546 Q F0([)2.5 E F2A F3 -.1(ke)2.5 G(ymap)-.2 E F0(])A F22.5 E F3(\214lename)2.5 E F2 (bind)108 558 Q F0([)2.5 E F2A F3 -.1(ke)2.5 G(ymap)-.2 E F0(])A F22.5 E F3 -.1(ke)2.5 G(yseq)-.2 E F0(:)A F3(shell\255command)A F2 (bind)108 570 Q F0([)2.5 E F2A F3 -.1(ke)2.5 G(ymap)-.2 E F0(])A F3 -.1(ke)2.5 G(yseq)-.2 E F0(:)A F3(function\255name)A F0 .238 (Display current)144 582 R F2 -.18(re)2.738 G(adline).18 E F0 -.1(ke) 2.738 G 2.738(ya)-.05 G .239(nd function bindings, or bind a k)-2.738 F .539 -.15(ey s)-.1 H .239(equence to a).15 F F2 -.18(re)2.739 G(adline) .18 E F0(function)2.739 E .88(or macro.)144 594 R .88 (The binding syntax accepted is identical to that of)5.88 F F3(.inputr) 3.38 E(c)-.37 E F0 3.38(,b).31 G .88(ut each binding must be)-3.58 F 1.333(passed as a separate ar)144 606 R 1.334 (gument; e.g., '"\\C\255x\\C\255r": re\255read\255init\255\214le'.)-.18 F 1.334(Options, if supplied, ha)6.334 F -.15(ve)-.2 G(the follo)144 618 Q(wing meanings:)-.25 E F2144 630 Q F3 -.1(ke)2.5 G(ymap)-.2 E F0 (Use)180 642 Q F3 -.1(ke)5.175 G(ymap)-.2 E F0 2.674(as the k)5.175 F -.15(ey)-.1 G 2.674(map to be af).15 F 2.674 (fected by the subsequent bindings.)-.25 F(Acceptable)7.674 E F3 -.1(ke) 180 654 S(ymap)-.2 E F0 3.216(names are)5.716 F F3 3.216 (emacs, emacs\255standar)5.716 F 3.216 (d, emacs\255meta, emacs\255ctlx, vi, vi\255mo)-.37 F(ve)-.1 E(,)-.1 E (vi\255command)180 666 Q F0 4.43(,a)C(nd)-4.43 E F3(vi\255insert)4.429 E F0(.).68 E F3(vi)6.929 E F0 1.929(is equi)4.429 F -.25(va)-.25 G 1.929 (lent to).25 F F3(vi\255command)4.429 E F0(;)A F3(emacs)4.429 E F0 1.929 (is equi)4.429 F -.25(va)-.25 G 1.929(lent to).25 F F3(emacs\255standar) 180 678 Q(d)-.37 E F0(.)A F2144 690 Q F0(List the names of all) 27.52 E F2 -.18(re)2.5 G(adline).18 E F0(functions.)2.5 E F2144 702 Q F0(Display)24.74 E F2 -.18(re)2.5 G(adline).18 E F0 (function names and bindings in such a w)2.5 E(ay that the)-.1 E 2.5(yc) -.15 G(an be re-read.)-2.5 E F2144 714 Q F0(List current)24.19 E F2 -.18(re)2.5 G(adline).18 E F0(function names and bindings.)2.5 E (GNU Bash-2.05a)72 768 Q(2001 October 29)130.965 E(1)195.395 E EP %%Page: 2 2 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF -.35(BA)72 48 S(SH_B).35 E(UIL)-.1 E 290.48 (TINS\(1\) B)-.92 F(ASH_B)-.35 E(UIL)-.1 E(TINS\(1\))-.92 E/F1 10 /Times-Bold@0 SF144 84 Q F0(Display)25.3 E F1 -.18(re)2.5 G (adline).18 E F0 -.25(va)2.5 G(riable names and v).25 E (alues in such a w)-.25 E(ay that the)-.1 E 2.5(yc)-.15 G (an be re-read.)-2.5 E F1144 96 Q F0(List current)23.08 E F1 -.18 (re)2.5 G(adline).18 E F0 -.25(va)2.5 G(riable names and v).25 E(alues.) -.25 E F1144 108 Q F0(Display)26.41 E F1 -.18(re)3.655 G(adline) .18 E F0 -.1(ke)3.655 G 3.655(ys)-.05 G 1.155 (equences bound to macros and the strings the)-3.655 F 3.655(yo)-.15 G 1.155(utput in such a)-3.655 F -.1(wa)180 120 S 2.5(yt).1 G(hat the)-2.5 E 2.5(yc)-.15 G(an be re-read.)-2.5 E F1144 132 Q F0(Display)24.74 E F1 -.18(re)2.5 G(adline).18 E F0 -.1(ke)2.5 G 2.5(ys)-.05 G (equences bound to macros and the strings the)-2.5 E 2.5(yo)-.15 G (utput.)-2.5 E F1144 144 Q/F2 10/Times-Italic@0 SF(\214lename)2.5 E F0(Read k)180 156 Q .3 -.15(ey b)-.1 H(indings from).15 E F2 (\214lename)2.5 E F0(.)A F1144 168 Q F2(function)2.5 E F0 (Query about which k)180 180 Q -.15(ey)-.1 G 2.5(si).15 G -1.9 -.4(nv o) -2.5 H .2 -.1(ke t).4 H(he named).1 E F2(function)2.5 E F0(.)A F1 144 192 Q F2(function)2.5 E F0(Unbind all k)180 204 Q -.15(ey)-.1 G 2.5 (sb).15 G(ound to the named)-2.5 E F2(function)2.5 E F0(.)A F1144 216 Q F2 -.1(ke)2.5 G(yseq)-.2 E F0(Remo)180 228 Q .3 -.15(ve a)-.15 H .3 -.15(ny c).15 H(urrent binding for).15 E F2 -.1(ke)2.5 G(yseq)-.2 E F0(.)A F1144 240 Q F2 -.1(ke)2.5 G(yseq)-.2 E F1(:)A F2 (shell\255command)A F0(Cause)180 252 Q F2(shell\255command)2.5 E F0 (to be e)2.5 E -.15(xe)-.15 G(cuted whene).15 E -.15(ve)-.25 G(r).15 E F2 -.1(ke)2.5 G(yseq)-.2 E F0(is entered.)2.5 E(The return v)144 268.8 Q (alue is 0 unless an unrecognized option is gi)-.25 E -.15(ve)-.25 G 2.5 (no).15 G 2.5(ra)-2.5 G 2.5(ne)-2.5 G(rror occurred.)-2.5 E F1(br)108 285.6 Q(eak)-.18 E F0([)2.5 E F2(n)A F0(])A .084(Exit from within a)144 297.6 R F1 -.25(fo)2.584 G(r).25 E F0(,)A F1(while)2.584 E F0(,)A F1 (until)2.584 E F0 2.584(,o)C(r)-2.584 E F1(select)2.583 E F0 2.583 (loop. If)2.583 F F2(n)2.583 E F0 .083(is speci\214ed, break)2.583 F F2 (n)2.583 E F0(le)2.583 E -.15(ve)-.25 G(ls.).15 E F2(n)5.083 E F0 .083 (must be)2.583 F/F3 10/Symbol SF2.583 E F0(1.)2.583 E(If)144 309.6 Q F2(n)2.75 E F0 .25(is greater than the number of enclosing loops, all e\ nclosing loops are e)2.75 F 2.75(xited. The)-.15 F .25(return v)2.75 F (alue)-.25 E(is 0 unless the shell is not e)144 321.6 Q -.15(xe)-.15 G (cuting a loop when).15 E F1(br)2.5 E(eak)-.18 E F0(is e)2.5 E -.15(xe) -.15 G(cuted.).15 E F1 -.2(bu)108 338.4 S(iltin).2 E F2(shell\255b)2.5 E (uiltin)-.2 E F0([)2.5 E F2(ar)A(guments)-.37 E F0(])A(Ex)144 350.4 Q .793(ecute the speci\214ed shell b)-.15 F .793(uiltin, passing it)-.2 F F2(ar)3.293 E(guments)-.37 E F0 3.293(,a).27 G .793(nd return its e) -3.293 F .792(xit status.)-.15 F .792(This is useful)5.792 F .615 (when de\214ning a function whose name is the same as a shell b)144 362.4 R .616(uiltin, retaining the functionality of)-.2 F .57(the b)144 374.4 R .57(uiltin within the function.)-.2 F(The)5.57 E F1(cd)3.07 E F0 -.2(bu)3.07 G .57(iltin is commonly rede\214ned this w).2 F(ay)-.1 E 5.57(.T)-.65 G .57(he return status)-5.57 F(is f)144 386.4 Q(alse if)-.1 E F2(shell\255b)2.5 E(uiltin)-.2 E F0(is not a shell b)2.5 E (uiltin command.)-.2 E F1(cd)108 403.2 Q F0([)2.5 E F1(\255LP)A F0 2.5 (][)C F2(dir)-2.5 E F0(])A .21(Change the current directory to)144 415.2 R F2(dir)2.71 E F0 5.21(.T)C .21(he v)-5.21 F(ariable)-.25 E/F4 9 /Times-Bold@0 SF(HOME)2.71 E F0 .21(is the def)2.46 F(ault)-.1 E F2(dir) 2.71 E F0 5.21(.T).73 G .21(he v)-5.21 F(ariable)-.25 E F4(CDP)2.71 E -.855(AT)-.666 G(H).855 E F0 .777 (de\214nes the search path for the directory containing)144 427.2 R F2 (dir)3.276 E F0 5.776(.A).73 G(lternati)-5.776 E 1.076 -.15(ve d)-.25 H .776(irectory names in).15 F F4(CDP)3.276 E -.855(AT)-.666 G(H).855 E F0 .764(are separated by a colon \(:\).)144 439.2 R 3.264(An)5.764 G .764 (ull directory name in)-3.264 F F4(CDP)3.264 E -.855(AT)-.666 G(H).855 E F0 .764(is the same as the current direc-)3.014 F(tory)144 451.2 Q 3.028 (,i)-.65 G .528(.e., `)-3.028 F(`)-.74 E F1(.)A F0 -.74('')C 5.528(.I) .74 G(f)-5.528 E F2(dir)3.028 E F0(be)3.028 E .528 (gins with a slash \(/\), then)-.15 F F4(CDP)3.028 E -.855(AT)-.666 G(H) .855 E F0 .527(is not used. The)2.778 F F13.027 E F0 .527 (option says to use)3.027 F .579(the ph)144 463.2 R .579 (ysical directory structure instead of follo)-.05 F .579 (wing symbolic links \(see also the)-.25 F F13.08 E F0 .58 (option to the)3.08 F F1(set)144 475.2 Q F0 -.2(bu)3.384 G .884 (iltin command\); the).2 F F13.384 E F0 .884 (option forces symbolic links to be follo)3.384 F 3.384(wed. An)-.25 F (ar)3.383 E .883(gument of)-.18 F F13.383 E F0(is)3.383 E(equi)144 487.2 Q -.25(va)-.25 G .436(lent to).25 F F4($OLDPWD)2.936 E/F5 9 /Times-Roman@0 SF(.)A F0 .436(The return v)4.936 F .436 (alue is true if the directory w)-.25 F .437(as successfully changed; f) -.1 F(alse)-.1 E(otherwise.)144 499.2 Q F1(command)108 516 Q F0([)2.5 E F1(\255pVv)A F0(])A F2(command)2.5 E F0([)2.5 E F2(ar)A(g)-.37 E F0 (...])2.5 E(Run)144 528 Q F2(command)2.878 E F0(with)2.878 E F2(ar)2.878 E(gs)-.37 E F0 .378 (suppressing the normal shell function lookup. Only b)2.878 F .377 (uiltin commands or)-.2 F .558(commands found in the)144 540 R F4 -.666 (PA)3.058 G(TH)-.189 E F0 .559(are e)2.809 F -.15(xe)-.15 G 3.059 (cuted. If).15 F(the)3.059 E F13.059 E F0 .559(option is gi)3.059 F -.15(ve)-.25 G .559(n, the search for).15 F F2(command)3.059 E F0(is) 3.059 E .232(performed using a def)144 552 R .231(ault v)-.1 F .231 (alue for)-.25 F F1 -.74(PA)2.731 G(TH)-.21 E F0 .231 (that is guaranteed to \214nd all of the standard utilities.)2.731 F(If) 5.231 E .231(either the)144 564 R F12.731 E F0(or)2.731 E F1 2.731 E F0 .232(option is supplied, a description of)2.732 F F2(command) 2.732 E F0 .232(is printed.)2.732 F(The)5.232 E F12.732 E F0 .232 (option causes)2.732 F 3.171(as)144 576 S .671(ingle w)-3.171 F .671 (ord indicating the command or \214le name used to in)-.1 F -.2(vo)-.4 G -.1(ke).2 G F2(command)3.27 E F0 .67(to be displayed; the)3.17 F F1 144 588 Q F0 .249(option produces a more v)2.749 F .249 (erbose description.)-.15 F .249(If the)5.249 F F12.749 E F0(or) 2.749 E F12.75 E F0 .25(option is supplied, the e)2.75 F .25 (xit status)-.15 F 1.056(is 0 if)144 600 R F2(command)3.556 E F0 -.1(wa) 3.556 G 3.556(sf).1 G 1.056(ound, and 1 if not.)-3.556 F 1.056 (If neither option is supplied and an error occurred or)6.056 F F2 (command)144 612 Q F0 1.663(cannot be found, the e)4.163 F 1.663 (xit status is 127.)-.15 F 1.663(Otherwise, the e)6.663 F 1.664 (xit status of the)-.15 F F1(command)4.164 E F0 -.2(bu)144 624 S (iltin is the e).2 E(xit status of)-.15 E F2(command)2.5 E F0(.).77 E F1 (compgen)108 640.8 Q F0([)2.5 E F2(option)A F0 2.5(][)C F2(wor)-2.5 E(d) -.37 E F0(])A .013(Generate possible completion matches for)144 652.8 R F2(wor)2.513 E(d)-.37 E F0 .013(according to the)2.513 F F2(option)2.513 E F0 .013(s, which may be an)B 2.512(yo)-.15 G(ption)-2.512 E .981 (accepted by the)144 664.8 R F1(complete)3.481 E F0 -.2(bu)3.481 G .981 (iltin with the e).2 F .981(xception of)-.15 F F13.481 E F0(and) 3.481 E F13.481 E F0 3.481(,a)C .982(nd write the matches to the) -3.481 F 1.415(standard output.)144 676.8 R 1.415(When using the)6.415 F F13.915 E F0(or)3.915 E F13.915 E F0 1.415(options, the v) 3.915 F 1.415(arious shell v)-.25 F 1.415(ariables set by the pro-)-.25 F(grammable completion f)144 688.8 Q(acilities, while a)-.1 E -.25(va) -.2 G(ilable, will not ha).25 E .3 -.15(ve u)-.2 H(seful v).15 E(alues.) -.25 E .352(The matches will be generated in the same w)144 712.8 R .352 (ay as if the programmable completion code had gen-)-.1 F .02(erated th\ em directly from a completion speci\214cation with the same \215ags.)144 724.8 R(If)5.02 E F2(wor)2.52 E(d)-.37 E F0 .02(is speci\214ed, only) 2.52 F(GNU Bash-2.05a)72 768 Q(2001 October 29)130.965 E(2)195.395 E EP %%Page: 3 3 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF -.35(BA)72 48 S(SH_B).35 E(UIL)-.1 E 290.48 (TINS\(1\) B)-.92 F(ASH_B)-.35 E(UIL)-.1 E(TINS\(1\))-.92 E (those completions matching)144 84 Q/F1 10/Times-Italic@0 SF(wor)2.5 E (d)-.37 E F0(will be displayed.)2.5 E(The return v)144 108 Q (alue is true unless an in)-.25 E -.25(va)-.4 G (lid option is supplied, or no matches were generated.).25 E/F2 10 /Times-Bold@0 SF(complete)108 124.8 Q F0([)2.5 E F2(\255abcdefgjkvu)A F0 2.5(][)C F2-2.5 E F1(comp-option)2.5 E F0 2.5(][)C F2-2.5 E F1(action)2.5 E F0 2.5(][)C F2-2.5 E F1(globpat)2.5 E F0 2.5(][)C F2-2.5 E F1(wor)2.5 E(dlist)-.37 E F0 2.5(][)C F2-2.5 E F1 (pr)2.5 E(e\214x)-.37 E F0 2.5(][)C F2-2.5 E F1(suf-)2.5 E<8c78> 108 136.8 Q F0(])A([)144 148.8 Q F2A F1(\214lterpat)2.5 E F0 2.5 (][)C F2-2.5 E F1(function)2.5 E F0 2.5(][)C F2-2.5 E F1 (command)2.5 E F0(])A F1(name)2.5 E F0([)2.5 E F1(name ...)A F0(])A F2 (complete \255pr)108 160.8 Q F0([)2.5 E F1(name)A F0(...])2.5 E .634 (Specify ho)144 172.8 R 3.134(wa)-.25 G -.18(rg)-3.134 G .634 (uments to each).18 F F1(name)3.134 E F0 .634(should be completed.)3.134 F .633(If the)5.634 F F23.133 E F0 .633 (option is supplied, or if no)3.133 F .139(options are supplied, e)144 184.8 R .139(xisting completion speci\214cations are printed in a w)-.15 F .14(ay that allo)-.1 F .14(ws them to be)-.25 F .31(reused as input.) 144 196.8 R(The)5.31 E F22.81 E F0 .31(option remo)2.81 F -.15(ve) -.15 G 2.81(sac).15 G .31(ompletion speci\214cation for each)-2.81 F F1 (name)2.81 E F0 2.81(,o)C 1.11 -.4(r, i)-2.81 H 2.81(fn).4 G(o)-2.81 E F1(name)2.81 E F0(s)A(are supplied, all completion speci\214cations.)144 208.8 Q 1.437 (The process of applying these completion speci\214cations when w)144 232.8 R 1.438(ord completion is attempted is)-.1 F(described abo)144 244.8 Q .3 -.15(ve u)-.15 H(nder).15 E F2(Pr)2.5 E (ogrammable Completion)-.18 E F0(.)A .556 (Other options, if speci\214ed, ha)144 268.8 R .856 -.15(ve t)-.2 H .555 (he follo).15 F .555(wing meanings.)-.25 F .555(The ar)5.555 F .555 (guments to the)-.18 F F23.055 E F0(,)A F23.055 E F0 3.055 (,a)C(nd)-3.055 E F23.055 E F0 .722(options \(and, if necessary) 144 280.8 R 3.222(,t)-.65 G(he)-3.222 E F23.222 E F0(and)3.222 E F23.222 E F0 .723 (options\) should be quoted to protect them from e)3.222 F(xpan-)-.15 E (sion before the)144 292.8 Q F2(complete)2.5 E F0 -.2(bu)2.5 G (iltin is in).2 E -.2(vo)-.4 G -.1(ke).2 G(d.).1 E F2144 304.8 Q F1(comp-option)2.5 E F0(The)184 316.8 Q F1(comp-option)2.791 E F0 .291 (controls se)2.791 F -.15(ve)-.25 G .291(ral aspects of the compspec') .15 F 2.791(sb)-.55 G(eha)-2.791 E .291(vior be)-.2 F .291 (yond the simple)-.15 F(generation of completions.)184 328.8 Q F1 (comp-option)5 E F0(may be one of:)2.5 E F2(default)184 340.8 Q F0 (Use readline')10 E 2.5(sd)-.55 G(ef)-2.5 E (ault completion if the compspec generates no matches.)-.1 E F2(dir)184 352.8 Q(names)-.15 E F0(Perform directory name completion if the compsp\ ec generates no matches.)224 364.8 Q F2(\214lenames)184 376.8 Q F0 -.7 (Te)224 388.8 S .137(ll readline that the compspec generates \214lename\ s, so it can perform an).7 F 2.637<798c>-.15 G(le-)-2.637 E .496 (name\255speci\214c processing \(lik)224 400.8 R 2.996(ea)-.1 G .496 (dding a slash to directory names or suppress-)-2.996 F (ing trailing spaces\).)224 412.8 Q (Intended to be used with shell functions.)5 E F2144 424.8 Q F1 (action)2.5 E F0(The)184 436.8 Q F1(action)2.5 E F0 (may be one of the follo)2.5 E (wing to generate a list of possible completions:)-.25 E F2(alias)184 448.8 Q F0(Alias names.)20.55 E(May also be speci\214ed as)5 E F2 2.5 E F0(.)A F2(arrayv)184 460.8 Q(ar)-.1 E F0(Array v)224 472.8 Q (ariable names.)-.25 E F2 4.7(binding Readline)184 484.8 R F0 -.1(ke)2.5 G 2.5(yb)-.05 G(inding names.)-2.5 E F2 -.2(bu)184 496.8 S(iltin).2 E F0 (Names of shell b)11.85 E(uiltin commands.)-.2 E (May also be speci\214ed as)5 E F22.5 E F0(.)A F2(command)184 508.8 Q F0(Command names.)224 520.8 Q(May also be speci\214ed as)5 E F2 2.5 E F0(.)A F2(dir)184 532.8 Q(ectory)-.18 E F0(Directory names.) 224 544.8 Q(May also be speci\214ed as)5 E F22.5 E F0(.)A F2 (disabled)184 556.8 Q F0(Names of disabled shell b)224 568.8 Q(uiltins.) -.2 E F2(enabled)184 580.8 Q F0(Names of enabled shell b)6.66 E (uiltins.)-.2 E F2(export)184 592.8 Q F0(Names of e)12.23 E (xported shell v)-.15 E 2.5(ariables. May)-.25 F(also be speci\214ed as) 2.5 E F22.5 E F0(.)A F2(\214le)184 604.8 Q F0(File names.)27.22 E (May also be speci\214ed as)5 E F22.5 E F0(.)A F2(function)184 616.8 Q F0(Names of shell functions.)224 628.8 Q F2(gr)184 640.8 Q(oup) -.18 E F0(Group names.)14.62 E(May also be speci\214ed as)5 E F2 2.5 E F0(.)A F2(helptopic)184 652.8 Q F0(Help topics as accepted by the) 224 664.8 Q F2(help)2.5 E F0 -.2(bu)2.5 G(iltin.).2 E F2(hostname)184 676.8 Q F0(Hostnames, as tak)224 688.8 Q (en from the \214le speci\214ed by the)-.1 E/F3 9/Times-Bold@0 SF (HOSTFILE)2.5 E F0(shell v)2.25 E(ariable.)-.25 E F2(job)184 700.8 Q F0 (Job names, if job control is acti)26.11 E -.15(ve)-.25 G 5(.M).15 G (ay also be speci\214ed as)-5 E F22.5 E F0(.)A(GNU Bash-2.05a)72 768 Q(2001 October 29)130.965 E(3)195.395 E EP %%Page: 4 4 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF -.35(BA)72 48 S(SH_B).35 E(UIL)-.1 E 290.48 (TINS\(1\) B)-.92 F(ASH_B)-.35 E(UIL)-.1 E(TINS\(1\))-.92 E/F1 10 /Times-Bold@0 SF -.1(ke)184 84 S(yw).1 E(ord)-.1 E F0(Shell reserv)224 96 Q(ed w)-.15 E 2.5(ords. May)-.1 F(also be speci\214ed as)2.5 E F1 2.5 E F0(.)A F1(running)184 108 Q F0 (Names of running jobs, if job control is acti)5.54 E -.15(ve)-.25 G(.) .15 E F1(setopt)184 120 Q F0 -1.11(Va)14.45 G(lid ar)1.11 E (guments for the)-.18 E F12.5 E F0(option to the)2.5 E F1(set)2.5 E F0 -.2(bu)2.5 G(iltin.).2 E F1(shopt)184 132 Q F0 (Shell option names as accepted by the)16.66 E F1(shopt)2.5 E F0 -.2(bu) 2.5 G(iltin.).2 E F1(signal)184 144 Q F0(Signal names.)14.99 E F1 (stopped)184 156 Q F0(Names of stopped jobs, if job control is acti)6.66 E -.15(ve)-.25 G(.).15 E F1(user)184 168 Q F0(User names.)21.67 E (May also be speci\214ed as)5 E F12.5 E F0(.)A F1 -.1(va)184 180 S (riable).1 E F0(Names of all shell v)5.1 E 2.5(ariables. May)-.25 F (also be speci\214ed as)2.5 E F12.5 E F0(.)A F1144 192 Q/F2 10/Times-Italic@0 SF(globpat)2.5 E F0 1.41(The \214lename e)184 204 R 1.411(xpansion pattern)-.15 F F2(globpat)3.911 E F0 1.411(is e)3.911 F 1.411(xpanded to generate the possible comple-)-.15 F(tions.)184 216 Q F1144 228 Q F2(wor)2.5 E(dlist)-.37 E F0(The)184 240 Q F2(wor)3.64 E(dlist)-.37 E F0 1.14(is split using the characters in the)3.64 F/F3 9 /Times-Bold@0 SF(IFS)3.64 E F0 1.139(special v)3.39 F 1.139 (ariable as delimiters, and)-.25 F 2.007(each resultant w)184 252 R 2.007(ord is e)-.1 F 4.507(xpanded. The)-.15 F 2.008 (possible completions are the members of the)4.507 F (resultant list which match the w)184 264 Q(ord being completed.)-.1 E F1144 276 Q F2(command)2.5 E(command)184 288 Q F0 1.056(is e)3.556 F -.15(xe)-.15 G 1.056(cuted in a subshell en).15 F 1.056 (vironment, and its output is used as the possible)-.4 F(completions.) 184 300 Q F1144 312 Q F2(function)2.5 E F0 1.18 (The shell function)184 324 R F2(function)3.68 E F0 1.181(is e)3.681 F -.15(xe)-.15 G 1.181(cuted in the current shell en).15 F 3.681 (vironment. When)-.4 F 1.181(it \214n-)3.681 F .932 (ishes, the possible completions are retrie)184 336 R -.15(ve)-.25 G 3.432(df).15 G .932(rom the v)-3.432 F .932(alue of the)-.25 F F3 (COMPREPL)3.431 E(Y)-.828 E F0(array)3.181 E -.25(va)184 348 S(riable.) .25 E F1144 360 Q F2(\214lterpat)2.5 E(\214lterpat)184 372 Q F0 .733(is a pattern as used for \214lename e)3.233 F 3.233(xpansion. It) -.15 F .733(is applied to the list of possible)3.233 F 1.596 (completions generated by the preceding options and ar)184 384 R 1.596 (guments, and each completion)-.18 F(matching)184 396 Q F2(\214lterpat) 3.204 E F0 .704(is remo)3.204 F -.15(ve)-.15 G 3.204(df).15 G .704 (rom the list.)-3.204 F 3.204(Al)5.704 G(eading)-3.204 E F1(!)3.204 E F0 (in)3.204 E F2(\214lterpat)3.205 E F0(ne)3.205 E -.05(ga)-.15 G .705 (tes the pattern;).05 F(in this case, an)184 408 Q 2.5(yc)-.15 G (ompletion not matching)-2.5 E F2(\214lterpat)2.5 E F0(is remo)2.5 E -.15(ve)-.15 G(d.).15 E F1144 420 Q F2(pr)2.5 E(e\214x)-.37 E(pr) 184 432 Q(e\214x)-.37 E F0 .535(is added at the be)3.035 F .534 (ginning of each possible completion after all other options ha)-.15 F -.15(ve)-.2 G(been applied.)184 444 Q F1144 456 Q F2(suf)2.5 E 2.81(\214x suf)-.18 F<8c78>-.18 E F0 (is appended to each possible completion after all other options ha)2.5 E .3 -.15(ve b)-.2 H(een applied.).15 E .466(The return v)144 472.8 R .466(alue is true unless an in)-.25 F -.25(va)-.4 G .466 (lid option is supplied, an option other than).25 F F12.967 E F0 (or)2.967 E F12.967 E F0 .467(is sup-)2.967 F 1.362 (plied without a)144 484.8 R F2(name)3.862 E F0(ar)3.862 E 1.361 (gument, an attempt is made to remo)-.18 F 1.661 -.15(ve a c)-.15 H 1.361(ompletion speci\214cation for a).15 F F2(name)144 496.8 Q F0 (for which no speci\214cation e)2.5 E (xists, or an error occurs adding a completion speci\214cation.)-.15 E F1(continue)108 513.6 Q F0([)2.5 E F2(n)A F0(])A 1.791(Resume the ne)144 525.6 R 1.791(xt iteration of the enclosing)-.15 F F1 -.25(fo)4.291 G(r) .25 E F0(,)A F1(while)4.291 E F0(,)A F1(until)4.291 E F0 4.291(,o)C(r) -4.291 E F1(select)4.291 E F0 4.292(loop. If)4.291 F F2(n)4.292 E F0 1.792(is speci\214ed,)4.292 F 1.273(resume at the)144 537.6 R F2(n)3.772 E F0 1.272(th enclosing loop.)B F2(n)6.272 E F0 1.272(must be)3.772 F/F4 10/Symbol SF3.772 E F0 3.772(1. If)3.772 F F2(n)3.772 E F0 1.272 (is greater than the number of enclosing)3.772 F .667 (loops, the last enclosing loop \(the `)144 549.6 R(`top-le)-.74 E -.15 (ve)-.25 G(l').15 E 3.167('l)-.74 G .667(oop\) is resumed.)-3.167 F .668 (The return v)5.668 F .668(alue is 0 unless the)-.25 F(shell is not e) 144 561.6 Q -.15(xe)-.15 G(cuting a loop when).15 E F1(continue)2.5 E F0 (is e)2.5 E -.15(xe)-.15 G(cuted.).15 E F1(declar)108 578.4 Q(e)-.18 E F0([)2.5 E F1(\255afFirx)A F0 2.5(][)C F1-2.5 E F0 2.5(][)C F2 (name)-2.5 E F0([=)A F2(value)A F0(]])A F1(typeset)108 590.4 Q F0([)2.5 E F1(\255afFirx)A F0 2.5(][)C F1-2.5 E F0 2.5(][)C F2(name)-2.5 E F0([=)A F2(value)A F0(]])A 1.265(Declare v)144 602.4 R 1.265 (ariables and/or gi)-.25 F 1.565 -.15(ve t)-.25 H 1.265(hem attrib).15 F 3.765(utes. If)-.2 F(no)3.765 E F2(name)3.765 E F0 3.765(sa)C 1.265 (re gi)-3.765 F -.15(ve)-.25 G 3.764(nt).15 G 1.264(hen display the v) -3.764 F 1.264(alues of)-.25 F -.25(va)144 614.4 S 3.326(riables. The) .25 F F13.326 E F0 .826(option will display the attrib)3.326 F .826(utes and v)-.2 F .826(alues of each)-.25 F F2(name)3.326 E F0 5.827 (.W).18 G(hen)-5.827 E F13.327 E F0 .827(is used,)3.327 F .22 (additional options are ignored.)144 626.4 R(The)5.22 E F12.72 E F0 .22(option inhibits the display of function de\214nitions; only the) 2.72 F .21(function name and attrib)144 638.4 R .21(utes are printed.) -.2 F(The)5.21 E F12.71 E F0 .21(option implies)2.71 F F1 2.71 E F0 5.21(.T)C .21(he follo)-5.21 F .21(wing options can be)-.25 F (used to restrict output to v)144 650.4 Q (ariables with the speci\214ed attrib)-.25 E(ute or to gi)-.2 E .3 -.15 (ve v)-.25 H(ariables attrib)-.1 E(utes:)-.2 E F1144 662.4 Q F0 (Each)25.3 E F2(name)2.5 E F0(is an array v)2.5 E(ariable \(see)-.25 E F1(Arrays)2.5 E F0(abo)2.5 E -.15(ve)-.15 G(\).).15 E F1144 674.4 Q F0(Use function names only)26.97 E(.)-.65 E F1144 686.4 Q F0 .558(The v)27.52 F .558(ariable is treated as an inte)-.25 F .558 (ger; arithmetic e)-.15 F -.25(va)-.25 G .558(luation \(see).25 F F3 .557(ARITHMETIC EV)3.058 F(ALU)-1.215 E(A-)-.54 E(TION \))180 698.4 Q F0 (is performed when the v)2.25 E(ariable is assigned a v)-.25 E(alue.) -.25 E F1144 710.4 Q F0(Mak)25.86 E(e)-.1 E F2(name)5.046 E F0 5.046(sr)C(eadonly)-5.046 E 7.546(.T)-.65 G 2.546 (hese names cannot then be assigned v)-7.546 F 2.547 (alues by subsequent)-.25 F(assignment statements or unset.)180 722.4 Q (GNU Bash-2.05a)72 768 Q(2001 October 29)130.965 E(4)195.395 E EP %%Page: 5 5 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF -.35(BA)72 48 S(SH_B).35 E(UIL)-.1 E 290.48 (TINS\(1\) B)-.92 F(ASH_B)-.35 E(UIL)-.1 E(TINS\(1\))-.92 E/F1 10 /Times-Bold@0 SF144 84 Q F0(Mark)25.3 E/F2 10/Times-Italic@0 SF (name)2.5 E F0 2.5(sf)C(or e)-2.5 E (xport to subsequent commands via the en)-.15 E(vironment.)-.4 E .337 (Using `+' instead of `\255' turns of)144 100.8 R 2.837(ft)-.25 G .337 (he attrib)-2.837 F .337(ute instead, with the e)-.2 F .336 (xception that)-.15 F F1(+a)2.836 E F0 .336(may not be used)2.836 F .792 (to destro)144 112.8 R 3.293(ya)-.1 G 3.293(na)-3.293 G .793(rray v) -3.293 F 3.293(ariable. When)-.25 F .793(used in a function, mak)3.293 F .793(es each)-.1 F F2(name)3.293 E F0 .793(local, as with the)3.293 F F1 (local)3.293 E F0 3.646(command. The)144 124.8 R 1.146(return v)3.646 F 1.146(alue is 0 unless an in)-.25 F -.25(va)-.4 G 1.145 (lid option is encountered, an attempt is made to).25 F .091 (de\214ne a function using)144 136.8 R/F3 10/Courier@0 SF .091 (\255f foo=bar)2.591 F F0 2.591(,a)C 2.591(na)-2.591 G .091 (ttempt is made to assign a v)-2.591 F .092(alue to a readonly v)-.25 F (ariable,)-.25 E .513(an attempt is made to assign a v)144 148.8 R .513 (alue to an array v)-.25 F .513 (ariable without using the compound assignment)-.25 F .135(syntax \(see) 144 160.8 R F1(Arrays)2.635 E F0(abo)2.635 E -.15(ve)-.15 G .135 (\), one of the).15 F F2(names)2.635 E F0 .135(is not a v)2.635 F .135 (alid shell v)-.25 F .135(ariable name, an attempt is made)-.25 F .126 (to turn of)144 172.8 R 2.626(fr)-.25 G .126 (eadonly status for a readonly v)-2.626 F .126 (ariable, an attempt is made to turn of)-.25 F 2.625(fa)-.25 G .125 (rray status for an)-2.625 F(array v)144 184.8 Q (ariable, or an attempt is made to display a non-e)-.25 E (xistent function with)-.15 E F12.5 E F0(.)A F1 (dirs [\255clpv] [+)108 201.6 Q F2(n)A F1 2.5(][)C-2.5 E F2(n)A F1 (])A F0 -.4(Wi)144 213.6 S .328 (thout options, displays the list of currently remembered directories.) .4 F .329(The def)5.329 F .329(ault display is on a)-.1 F 1.238 (single line with directory names separated by spaces.)144 225.6 R 1.238 (Directories are added to the list with the)6.238 F F1(pushd)144 237.6 Q F0(command; the)2.5 E F1(popd)2.5 E F0(command remo)2.5 E -.15(ve)-.15 G 2.5(se).15 G(ntries from the list.)-2.5 E F1(+)144 249.6 Q F2(n)A F0 1.564(Displays the)25.3 F F2(n)4.064 E F0 1.565 (th entry counting from the left of the list sho)B 1.565(wn by)-.25 F F1 (dirs)4.065 E F0 1.565(when in)4.065 F -.2(vo)-.4 G -.1(ke).2 G(d).1 E (without options, starting with zero.)180 261.6 Q F1144 273.6 Q F2 (n)A F0 1.194(Displays the)25.3 F F2(n)3.694 E F0 1.194 (th entry counting from the right of the list sho)B 1.194(wn by)-.25 F F1(dirs)3.694 E F0 1.194(when in)3.694 F -.2(vo)-.4 G -.1(ke).2 G(d).1 E (without options, starting with zero.)180 285.6 Q F1144 297.6 Q F0 (Clears the directory stack by deleting all of the entries.)25.86 E F1 144 309.6 Q F0 .324(Produces a longer listing; the def)27.52 F .324(ault listing format uses a tilde to denote the home direc-)-.1 F (tory)180 321.6 Q(.)-.65 E F1144 333.6 Q F0 (Print the directory stack with one entry per line.)24.74 E F1144 345.6 Q F0 .273(Print the directory stack with one entry per line, pre\ \214xing each entry with its inde)25.3 F 2.772(xi)-.15 G 2.772(nt)-2.772 G(he)-2.772 E(stack.)180 357.6 Q .257(The return v)144 374.4 R .258 (alue is 0 unless an in)-.25 F -.25(va)-.4 G .258 (lid option is supplied or).25 F F2(n)2.758 E F0(inde)2.758 E -.15(xe) -.15 G 2.758(sb).15 G -.15(ey)-2.758 G .258(ond the end of the direc-) .15 F(tory stack.)144 386.4 Q F1(diso)108 403.2 Q(wn)-.1 E F0([)2.5 E F1 (\255ar)A F0 2.5(][)C F1-2.5 E F0 2.5(][)C F2(jobspec)-2.5 E F0 (...])2.5 E -.4(Wi)144 415.2 S .452(thout options, each).4 F F2(jobspec) 2.952 E F0 .451(is remo)2.951 F -.15(ve)-.15 G 2.951(df).15 G .451 (rom the table of acti)-2.951 F .751 -.15(ve j)-.25 H 2.951(obs. If).15 F(the)2.951 E F12.951 E F0 .451(option is gi)2.951 F -.15(ve)-.25 G(n,).15 E(each)144 427.2 Q F2(jobspec)2.882 E F0 .382(is not remo)2.882 F -.15(ve)-.15 G 2.882(df).15 G .383(rom the table, b)-2.882 F .383 (ut is mark)-.2 F .383(ed so that)-.1 F/F4 9/Times-Bold@0 SF(SIGHUP) 2.883 E F0 .383(is not sent to the job if)2.633 F .332(the shell recei) 144 439.2 R -.15(ve)-.25 G 2.832(sa).15 G F4(SIGHUP)A/F5 9/Times-Roman@0 SF(.)A F0 .332(If no)4.832 F F2(jobspec)2.832 E F0 .332 (is present, and neither the)2.832 F F12.832 E F0 .332(nor the) 2.832 F F12.831 E F0 .331(option is sup-)2.831 F .067(plied, the) 144 451.2 R F2(curr)2.567 E .067(ent job)-.37 F F0 .067(is used.)2.567 F .067(If no)5.067 F F2(jobspec)2.567 E F0 .067(is supplied, the)2.567 F F12.567 E F0 .068(option means to remo)2.568 F .368 -.15(ve o)-.15 H 2.568(rm).15 G .068(ark all)-2.568 F 1.505(jobs; the)144 463.2 R F1 4.005 E F0 1.505(option without a)4.005 F F2(jobspec)4.005 E F0 (ar)4.005 E 1.505(gument restricts operation to running jobs.)-.18 F 1.505(The return)6.505 F -.25(va)144 475.2 S(lue is 0 unless a).25 E F2 (jobspec)2.5 E F0(does not specify a v)2.5 E(alid job)-.25 E(.)-.4 E F1 (echo)108 492 Q F0([)2.5 E F1(\255neE)A F0 2.5(][)C F2(ar)-2.5 E(g)-.37 E F0(...])2.5 E .394(Output the)144 504 R F2(ar)2.894 E(g)-.37 E F0 .394 (s, separated by spaces, follo)B .395(wed by a ne)-.25 F 2.895 (wline. The)-.25 F .395(return status is al)2.895 F -.1(wa)-.1 G .395 (ys 0.).1 F(If)5.395 E F12.895 E F0 .549 (is speci\214ed, the trailing ne)144 516 R .548(wline is suppressed.) -.25 F .548(If the)5.548 F F13.048 E F0 .548(option is gi)3.048 F -.15(ve)-.25 G .548(n, interpretation of the fol-).15 F(lo)144 528 Q .052(wing backslash-escaped characters is enabled.)-.25 F(The)5.052 E F1 2.552 E F0 .053(option disables the interpretation of these)2.553 F 1.503(escape characters, e)144 540 R -.15(ve)-.25 G 4.003(no).15 G 4.003(ns)-4.003 G 1.502(ystems where the)-4.003 F 4.002(ya)-.15 G 1.502 (re interpreted by def)-4.002 F 4.002(ault. The)-.1 F F1(xpg_echo)4.002 E F0(shell)4.002 E .009 (option may be used to dynamically determine whether or not)144 552 R F1 (echo)2.509 E F0 -.15(ex)2.51 G .01(pands these escape characters).15 F .66(by def)144 564 R(ault.)-.1 E F1(echo)5.66 E F0 .66 (does not interpret)3.16 F F13.16 E F0 .659 (to mean the end of options.)3.159 F F1(echo)5.659 E F0 .659 (interprets the follo)3.159 F(wing)-.25 E(escape sequences:)144 576 Q F1 (\\a)144 588 Q F0(alert \(bell\))28.22 E F1(\\b)144 600 Q F0(backspace) 27.66 E F1(\\c)144 612 Q F0(suppress trailing ne)28.78 E(wline)-.25 E F1 (\\e)144 624 Q F0(an escape character)28.78 E F1(\\f)144 636 Q F0 (form feed)29.89 E F1(\\n)144 648 Q F0(ne)27.66 E 2.5(wl)-.25 G(ine)-2.5 E F1(\\r)144 660 Q F0(carriage return)28.78 E F1(\\t)144 672 Q F0 (horizontal tab)29.89 E F1(\\v)144 684 Q F0 -.15(ve)28.22 G(rtical tab) .15 E F1(\\\\)144 696 Q F0(backslash)30.44 E F1(\\)144 708 Q F2(nnn)A F0 (the eight-bit character whose v)18.22 E(alue is the octal v)-.25 E (alue)-.25 E F2(nnn)2.5 E F0(\(one to three digits\))2.5 E (GNU Bash-2.05a)72 768 Q(2001 October 29)130.965 E(5)195.395 E EP %%Page: 6 6 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF -.35(BA)72 48 S(SH_B).35 E(UIL)-.1 E 290.48 (TINS\(1\) B)-.92 F(ASH_B)-.35 E(UIL)-.1 E(TINS\(1\))-.92 E/F1 10 /Times-Bold@0 SF(\\x)144 84 Q/F2 10/Times-Italic@0 SF(HH)A F0 (the eight-bit character whose v)13.78 E(alue is the he)-.25 E (xadecimal v)-.15 E(alue)-.25 E F2(HH)2.5 E F0(\(one or tw)2.5 E 2.5(oh) -.1 G .3 -.15(ex d)-2.5 H(igits\)).15 E F1(enable)108 100.8 Q F0([)2.5 E F1(\255adnps)A F0 2.5(][)C F1-2.5 E F2(\214lename)2.5 E F0 2.5(][) C F2(name)-2.5 E F0(...])2.5 E .277(Enable and disable b)144 112.8 R .278(uiltin shell commands.)-.2 F .278(Disabling a b)5.278 F .278 (uiltin allo)-.2 F .278(ws a disk command which has)-.25 F .834 (the same name as a shell b)144 124.8 R .834(uiltin to be e)-.2 F -.15 (xe)-.15 G .834(cuted without specifying a full pathname, e).15 F -.15 (ve)-.25 G 3.333(nt).15 G(hough)-3.333 E .989 (the shell normally searches for b)144 136.8 R .989 (uiltins before disk commands.)-.2 F(If)5.989 E F13.489 E F0 .99 (is used, each)3.49 F F2(name)3.49 E F0 .99(is dis-)3.49 F 1.582 (abled; otherwise,)144 148.8 R F2(names)4.082 E F0 1.582(are enabled.) 4.082 F -.15(Fo)6.582 G 4.082(re).15 G 1.582(xample, to use the)-4.232 F F1(test)4.082 E F0 1.582(binary found via the)4.082 F/F3 9/Times-Bold@0 SF -.666(PA)4.081 G(TH)-.189 E F0 .08(instead of the shell b)144 160.8 R .08(uiltin v)-.2 F .08(ersion, run)-.15 F/F4 10/Courier@0 SF .081 (enable -n test)2.58 F F0 5.081(.T)C(he)-5.081 E F12.581 E F0 .081 (option means to load the ne)2.581 F(w)-.25 E -.2(bu)144 172.8 S 1.57 (iltin command).2 F F2(name)4.07 E F0 1.569(from shared object)4.069 F F2(\214lename)4.069 E F0 4.069(,o).18 G 4.069(ns)-4.069 G 1.569 (ystems that support dynamic loading.)-4.069 F(The)144 184.8 Q F1 2.866 E F0 .366(option will delete a b)2.866 F .366(uiltin pre)-.2 F .366(viously loaded with)-.25 F F12.867 E F0 5.367(.I)C 2.867(fn) -5.367 G(o)-2.867 E F2(name)2.867 E F0(ar)2.867 E .367(guments are gi) -.18 F -.15(ve)-.25 G .367(n, or).15 F .399(if the)144 196.8 R F1 2.899 E F0 .399(option is supplied, a list of shell b)2.899 F .399 (uiltins is printed.)-.2 F -.4(Wi)5.399 G .399(th no other option ar).4 F .398(guments, the)-.18 F .098(list consists of all enabled shell b)144 208.8 R 2.598(uiltins. If)-.2 F F12.598 E F0 .098 (is supplied, only disabled b)2.598 F .099(uiltins are printed.)-.2 F (If)5.099 E F12.599 E F0 1.917 (is supplied, the list printed includes all b)144 220.8 R 1.916 (uiltins, with an indication of whether or not each is)-.2 F 2.878 (enabled. If)144 232.8 R F12.878 E F0 .379 (is supplied, the output is restricted to the POSIX)2.878 F F2(special) 2.879 E F0 -.2(bu)2.879 G 2.879(iltins. The).2 F .379(return v)2.879 F (alue)-.25 E 1.02(is 0 unless a)144 244.8 R F2(name)3.52 E F0 1.02 (is not a shell b)3.52 F 1.02(uiltin or there is an error loading a ne) -.2 F 3.52(wb)-.25 G 1.02(uiltin from a shared)-3.72 F(object.)144 256.8 Q F1 -2.3 -.15(ev a)108 273.6 T(l).15 E F0([)2.5 E F2(ar)A(g)-.37 E F0 (...])2.5 E(The)144 285.6 Q F2(ar)3.17 E(g)-.37 E F0 3.17(sa)C .671 (re read and concatenated together into a single command.)-3.17 F .671 (This command is then read)5.671 F .495(and e)144 297.6 R -.15(xe)-.15 G .495(cuted by the shell, and its e).15 F .495 (xit status is returned as the v)-.15 F .495(alue of)-.25 F F1 -2.3 -.15 (ev a)2.995 H(l).15 E F0 5.495(.I)C 2.995(ft)-5.495 G .495(here are no) -2.995 F F2(ar)2.995 E(gs)-.37 E F0(,).27 E(or only null ar)144 309.6 Q (guments,)-.18 E F1 -2.3 -.15(ev a)2.5 H(l).15 E F0(returns 0.)2.5 E F1 (exec)108 326.4 Q F0([)2.5 E F1(\255cl)A F0 2.5(][)C F1-2.5 E F2 (name)2.5 E F0 2.5(][)C F2(command)-2.5 E F0([)2.5 E F2(ar)A(guments) -.37 E F0(]])A(If)144 338.4 Q F2(command)2.91 E F0 .41 (is speci\214ed, it replaces the shell.)2.91 F .41(No ne)5.41 F 2.91(wp) -.25 G .41(rocess is created.)-2.91 F(The)5.41 E F2(ar)2.91 E(guments) -.37 E F0(become)2.91 E .177(the ar)144 350.4 R .177(guments to)-.18 F F2(command)2.676 E F0 5.176(.I)C 2.676(ft)-5.176 G(he)-2.676 E F1 2.676 E F0 .176(option is supplied, the shell places a dash at the be) 2.676 F .176(ginning of)-.15 F .22(the zeroth ar)144 362.4 R 2.72(gp) -.18 G .22(assed to)-2.72 F F2(command)2.72 E F0 5.22(.T).77 G .22 (his is what)-5.22 F F2(lo)2.72 E(gin)-.1 E F0 .22(\(1\) does.).24 F (The)5.22 E F12.72 E F0 .22(option causes)2.72 F F2(command)2.72 E F0(to)2.72 E 1.23(be e)144 374.4 R -.15(xe)-.15 G 1.23 (cuted with an empty en).15 F 3.73(vironment. If)-.4 F F13.729 E F0 1.229(is supplied, the shell passes)3.729 F F2(name)3.729 E F0 1.229 (as the zeroth)3.729 F(ar)144 386.4 Q .089(gument to the e)-.18 F -.15 (xe)-.15 G .089(cuted command.).15 F(If)5.089 E F2(command)2.589 E F0 .089(cannot be e)2.589 F -.15(xe)-.15 G .09 (cuted for some reason, a non-inter).15 F(-)-.2 E(acti)144 398.4 Q 1.067 -.15(ve s)-.25 H .767(hell e).15 F .767(xits, unless the shell option) -.15 F F1(execfail)3.266 E F0 .766 (is enabled, in which case it returns f)3.266 F 3.266(ailure. An)-.1 F (interacti)144 410.4 Q 1.583 -.15(ve s)-.25 H 1.283(hell returns f).15 F 1.283(ailure if the \214le cannot be e)-.1 F -.15(xe)-.15 G 3.783 (cuted. If).15 F F2(command)3.784 E F0 1.284(is not speci\214ed, an) 3.784 F(y)-.15 E .134(redirections tak)144 422.4 R 2.634(ee)-.1 G -.25 (ff)-2.634 G .134(ect in the current shell, and the return status is 0.) .25 F .134(If there is a redirection error)5.134 F(,)-.4 E (the return status is 1.)144 434.4 Q F1(exit)108 451.2 Q F0([)2.5 E F2 (n)A F0 6.29(]C)C .122(ause the shell to e)-6.29 F .122 (xit with a status of)-.15 F F2(n)2.623 E F0 5.123(.I)C(f)-5.123 E F2(n) 2.623 E F0 .123(is omitted, the e)2.623 F .123 (xit status is that of the last command)-.15 F -.15(exe)144 463.2 S 2.5 (cuted. A).15 F(trap on)2.5 E F3(EXIT)2.5 E F0(is e)2.25 E -.15(xe)-.15 G(cuted before the shell terminates.).15 E F1(export)108 480 Q F0([)2.5 E F1(\255fn)A F0 2.5(][).833 G F2(name)-2.5 E F0([=)A F2(wor)A(d)-.37 E F0(]] ...)A F1(export \255p)108 492 Q F0 .306(The supplied)144 504 R F2 (names)2.806 E F0 .306(are mark)2.806 F .305(ed for automatic e)-.1 F .305(xport to the en)-.15 F .305(vironment of subsequently e)-.4 F -.15 (xe)-.15 G(cuted).15 E 2.693(commands. If)144 516 R(the)2.693 E F1 2.693 E F0 .193(option is gi)2.693 F -.15(ve)-.25 G .193(n, the).15 F F2 (names)2.693 E F0 .193(refer to functions.)2.693 F .193(If no)5.193 F F2 (names)2.693 E F0 .193(are gi)2.693 F -.15(ve)-.25 G .194(n, or if the) .15 F F1144 528 Q F0 .66 (option is supplied, a list of all names that are e)3.16 F .659 (xported in this shell is printed.)-.15 F(The)5.659 E F13.159 E F0 (option)3.159 E .48(causes the e)144 540 R .48 (xport property to be remo)-.15 F -.15(ve)-.15 G 2.981(df).15 G .481 (rom the named v)-2.981 F(ariables.)-.25 E F1(export)5.481 E F0 .481 (returns an e)2.981 F .481(xit status)-.15 F .131(of 0 unless an in)144 552 R -.25(va)-.4 G .131(lid option is encountered, one of the).25 F F2 (names)2.63 E F0 .13(is not a v)2.63 F .13(alid shell v)-.25 F .13 (ariable name, or)-.25 F F1144 564 Q F0(is supplied with a)2.5 E F2(name)2.5 E F0(that is not a function.)2.5 E F1(fc)108 580.8 Q F0([) 2.5 E F1A F2(ename)2.5 E F0 2.5(][)C F1(\255nlr)-2.5 E F0 2.5(][)C F2<8c72>-2.5 E(st)-.1 E F0 2.5(][)C F2(last)-2.5 E F0(])A F1(fc \255s) 108 592.8 Q F0([)2.5 E F2(pat)A F0(=)A F2 -.37(re)C(p).37 E F0 2.5(][)C F2(cmd)-2.5 E F0(])A .664(Fix Command.)144 604.8 R .664 (In the \214rst form, a range of commands from)5.664 F F2<8c72>3.165 E (st)-.1 E F0(to)3.165 E F2(last)3.165 E F0 .665 (is selected from the his-)3.165 F .968(tory list.)144 616.8 R F2 -.45 (Fi)5.967 G -.1(rs).45 G(t).1 E F0(and)3.467 E F2(last)3.467 E F0 .967 (may be speci\214ed as a string \(to locate the last command be)3.467 F .967(ginning with)-.15 F .797(that string\) or as a number \(an inde)144 628.8 R 3.297(xi)-.15 G .797(nto the history list, where a ne)-3.297 F -.05(ga)-.15 G(ti).05 E 1.097 -.15(ve n)-.25 H .797(umber is used as an) .15 F(of)144 640.8 Q .322(fset from the current command number\).)-.25 F (If)5.322 E F2(last)2.822 E F0 .322 (is not speci\214ed it is set to the current command)2.822 F .364 (for listing \(so that)144 652.8 R F4 .364(fc \255l \25510)2.864 F F0 .365(prints the last 10 commands\) and to)2.865 F F2<8c72>2.865 E(st)-.1 E F0 2.865(otherwise. If)2.865 F F2<8c72>2.865 E(st)-.1 E F0 .365 (is not)2.865 F(speci\214ed it is set to the pre)144 664.8 Q (vious command for editing and \25516 for listing.)-.25 E(The)144 688.8 Q F12.522 E F0 .022 (option suppresses the command numbers when listing.)2.522 F(The)5.022 E F12.522 E F0 .022(option re)2.522 F -.15(ve)-.25 G .022 (rses the order of).15 F .438(the commands.)144 700.8 R .438(If the) 5.438 F F12.938 E F0 .438(option is gi)2.938 F -.15(ve)-.25 G .438 (n, the commands are listed on standard output.).15 F(Otherwise,)5.438 E .379(the editor gi)144 712.8 R -.15(ve)-.25 G 2.879(nb).15 G(y)-2.879 E F2(ename)2.879 E F0 .378(is in)2.878 F -.2(vo)-.4 G -.1(ke).2 G 2.878 (do).1 G 2.878(na\214)-2.878 G .378(le containing those commands.)-2.878 F(If)5.378 E F2(ename)2.878 E F0 .378(is not gi)2.878 F -.15(ve)-.25 G (n,).15 E 1.668(the v)144 724.8 R 1.668(alue of the)-.25 F F3(FCEDIT) 4.168 E F0 -.25(va)3.918 G 1.668(riable is used, and the v).25 F 1.669 (alue of)-.25 F F3(EDIT)4.169 E(OR)-.162 E F0(if)3.919 E F3(FCEDIT)4.169 E F0 1.669(is not set.)3.919 F(If)6.669 E(GNU Bash-2.05a)72 768 Q (2001 October 29)130.965 E(6)195.395 E EP %%Page: 7 7 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF -.35(BA)72 48 S(SH_B).35 E(UIL)-.1 E 290.48 (TINS\(1\) B)-.92 F(ASH_B)-.35 E(UIL)-.1 E(TINS\(1\))-.92 E 1.07 (neither v)144 84 R 1.07(ariable is set, is used.)-.25 F 1.069 (When editing is complete, the edited commands are echoed and)6.069 F -.15(exe)144 96 S(cuted.).15 E .039(In the second form,)144 120 R/F1 10 /Times-Italic@0 SF(command)2.539 E F0 .039(is re-e)2.539 F -.15(xe)-.15 G .039(cuted after each instance of).15 F F1(pat)2.54 E F0 .04 (is replaced by)2.54 F F1 -.37(re)2.54 G(p).37 E F0 5.04(.A)C(useful) -2.5 E .406(alias to use with this is)144 132 R/F2 10/Courier@0 SF .406 (r='fc \255s')2.906 F F0 2.906(,s)C 2.906(ot)-2.906 G .406(hat typing) -2.906 F F2 6.406(rc)2.906 G(c)-6.406 E F0 .406 (runs the last command be)2.906 F .406(ginning with)-.15 F F2(cc)144 144 Q F0(and typing)2.5 E F2(r)2.5 E F0(re-e)2.5 E -.15(xe)-.15 G (cutes the last command.).15 E .31 (If the \214rst form is used, the return v)144 168 R .31 (alue is 0 unless an in)-.25 F -.25(va)-.4 G .31 (lid option is encountered or).25 F F1<8c72>2.81 E(st)-.1 E F0(or)2.81 E F1(last)2.81 E F0 .455(specify history lines out of range.)144 180 R .454(If the)5.454 F/F3 10/Times-Bold@0 SF2.954 E F0 .454 (option is supplied, the return v)2.954 F .454(alue is the v)-.25 F .454 (alue of the)-.25 F .787(last command e)144 192 R -.15(xe)-.15 G .787 (cuted or f).15 F .788 (ailure if an error occurs with the temporary \214le of commands.)-.1 F .788(If the)5.788 F 1.196 (second form is used, the return status is that of the command re-e)144 204 R -.15(xe)-.15 G 1.196(cuted, unless).15 F F1(cmd)3.696 E F0 1.196 (does not)3.696 F(specify a v)144 216 Q (alid history line, in which case)-.25 E F3(fc)2.5 E F0(returns f)2.5 E (ailure.)-.1 E F3(fg)108 232.8 Q F0([)2.5 E F1(jobspec)A F0(])A(Resume) 144 244.8 Q F1(jobspec)4.169 E F0 1.669(in the fore)4.169 F 1.669 (ground, and mak)-.15 F 4.169(ei)-.1 G 4.169(tt)-4.169 G 1.669 (he current job)-4.169 F 6.67(.I)-.4 G(f)-6.67 E F1(jobspec)4.17 E F0 1.67(is not present, the)4.17 F(shell')144 256.8 Q 3.117(sn)-.55 G .617 (otion of the)-3.117 F F1(curr)3.117 E .617(ent job)-.37 F F0 .617 (is used.)3.117 F .617(The return v)5.617 F .616 (alue is that of the command placed into the)-.25 F(fore)144 268.8 Q .362(ground, or f)-.15 F .362 (ailure if run when job control is disabled or)-.1 F 2.862(,w)-.4 G .363 (hen run with job control enabled, if)-2.862 F F1(jobspec)144 280.8 Q F0 .246(does not specify a v)2.746 F .245(alid job or)-.25 F F1(jobspec) 2.745 E F0 .245(speci\214es a job that w)2.745 F .245 (as started without job control.)-.1 F F3(getopts)108 297.6 Q F1 (optstring name)2.5 E F0([)2.5 E F1(ar)A(gs)-.37 E F0(])A F3(getopts)144 309.6 Q F0 .828 (is used by shell procedures to parse positional parameters.)3.327 F F1 (optstring)5.828 E F0 .828(contains the option)3.328 F .15 (characters to be recognized; if a character is follo)144 321.6 R .149 (wed by a colon, the option is e)-.25 F .149(xpected to ha)-.15 F .449 -.15(ve a)-.2 H(n).15 E(ar)144 333.6 Q .578 (gument, which should be separated from it by white space.)-.18 F .579 (The colon and question mark char)5.579 F(-)-.2 E 1.665 (acters may not be used as option characters.)144 345.6 R 1.665 (Each time it is in)6.665 F -.2(vo)-.4 G -.1(ke).2 G(d,).1 E F3(getopts) 4.165 E F0 1.665(places the ne)4.165 F(xt)-.15 E .826 (option in the shell v)144 357.6 R(ariable)-.25 E F1(name)3.326 E F0 3.326(,i).18 G(nitializing)-3.326 E F1(name)3.327 E F0 .827 (if it does not e)3.327 F .827(xist, and the inde)-.15 F 3.327(xo)-.15 G 3.327(ft)-3.327 G .827(he ne)-3.327 F(xt)-.15 E(ar)144 369.6 Q .085 (gument to be processed into the v)-.18 F(ariable)-.25 E/F4 9 /Times-Bold@0 SF(OPTIND)2.585 E/F5 9/Times-Roman@0 SF(.)A F4(OPTIND) 4.585 E F0 .085(is initialized to 1 each time the shell)2.335 F .845 (or a shell script is in)144 381.6 R -.2(vo)-.4 G -.1(ke).2 G 3.345 (d. When).1 F .845(an option requires an ar)3.345 F(gument,)-.18 E F3 (getopts)3.346 E F0 .846(places that ar)3.346 F(gument)-.18 E .804 (into the v)144 393.6 R(ariable)-.25 E F4(OPT)3.304 E(ARG)-.81 E F5(.)A F0 .803(The shell does not reset)5.304 F F4(OPTIND)3.303 E F0 .803 (automatically; it must be manually)3.053 F .293 (reset between multiple calls to)144 405.6 R F3(getopts)2.793 E F0 .293 (within the same shell in)2.793 F -.2(vo)-.4 G .293(cation if a ne).2 F 2.793(ws)-.25 G .294(et of parameters)-2.793 F(is to be used.)144 417.6 Q 2.044(When the end of options is encountered,)144 441.6 R F3(getopts) 4.543 E F0 -.15(ex)4.543 G 2.043(its with a return v).15 F 2.043 (alue greater than zero.)-.25 F F3(OPTIND)144 453.6 Q F0 (is set to the inde)2.5 E 2.5(xo)-.15 G 2.5(ft)-2.5 G (he \214rst non-option ar)-2.5 E(gument, and)-.18 E F3(name)2.5 E F0 (is set to ?.)2.5 E F3(getopts)144 477.6 Q F0 2.392 (normally parses the positional parameters, b)4.892 F 2.392 (ut if more ar)-.2 F 2.393(guments are gi)-.18 F -.15(ve)-.25 G 4.893 (ni).15 G(n)-4.893 E F1(ar)4.893 E(gs)-.37 E F0(,).27 E F3(getopts)144 489.6 Q F0(parses those instead.)2.5 E F3(getopts)144 513.6 Q F0 1.252 (can report errors in tw)3.752 F 3.752(ow)-.1 G 3.752(ays. If)-3.852 F 1.252(the \214rst character of)3.752 F F1(optstring)3.752 E F0 1.251 (is a colon,)3.752 F F1(silent)3.751 E F0(error)3.751 E 1.263 (reporting is used.)144 525.6 R 1.263 (In normal operation diagnostic messages are printed when in)6.263 F -.25(va)-.4 G 1.263(lid options or).25 F .394(missing option ar)144 537.6 R .394(guments are encountered.)-.18 F .394(If the v)5.394 F (ariable)-.25 E F4(OPTERR)2.894 E F0 .394 (is set to 0, no error messages)2.644 F(will be displayed, e)144 549.6 Q -.15(ve)-.25 G 2.5(ni).15 G 2.5(ft)-2.5 G(he \214rst character of)-2.5 E F1(optstring)2.5 E F0(is not a colon.)2.5 E .696(If an in)144 573.6 R -.25(va)-.4 G .696(lid option is seen,).25 F F3(getopts)3.196 E F0 .697 (places ? into)3.197 F F1(name)3.197 E F0 .697 (and, if not silent, prints an error message)3.197 F .4(and unsets)144 585.6 R F4(OPT)2.9 E(ARG)-.81 E F5(.)A F0(If)4.899 E F3(getopts)2.899 E F0 .399(is silent, the option character found is placed in)2.899 F F4 (OPT)2.899 E(ARG)-.81 E F0 .399(and no)2.649 F (diagnostic message is printed.)144 597.6 Q 1.241(If a required ar)144 621.6 R 1.241(gument is not found, and)-.18 F F3(getopts)3.741 E F0 1.241(is not silent, a question mark \()3.741 F F3(?).833 E F0 3.742 (\)i).833 G 3.742(sp)-3.742 G 1.242(laced in)-3.742 F F1(name)144 633.6 Q F0(,).18 E F4(OPT)2.735 E(ARG)-.81 E F0 .234 (is unset, and a diagnostic message is printed.)2.485 F(If)5.234 E F3 (getopts)2.734 E F0 .234(is silent, then a colon \()2.734 F F3(:).833 E F0(\)).833 E(is placed in)144 645.6 Q F1(name)2.5 E F0(and)2.5 E F4(OPT) 2.5 E(ARG)-.81 E F0(is set to the option character found.)2.25 E F3 (getopts)144 669.6 Q F0 .902 (returns true if an option, speci\214ed or unspeci\214ed, is found.) 3.401 F .902(It returns f)5.902 F .902(alse if the end of)-.1 F (options is encountered or an error occurs.)144 681.6 Q F3(hash)108 698.4 Q F0([)2.5 E F3A F0 2.5(][)C F3-2.5 E F1(\214lename) 2.5 E F0 2.5(][)C F3-2.5 E F0 2.5(][)C F1(name)-2.5 E F0(])A -.15 (Fo)144 710.4 S 3.555(re).15 G(ach)-3.555 E F1(name)3.555 E F0 3.555(,t) .18 G 1.054(he full \214le name of the command is determined by searchi\ ng the directories in)-3.555 F F3($P)144 722.4 Q -.95(AT)-.74 G(H).95 E F0 .488(and remembered.)2.988 F .488(If the)5.488 F F32.988 E F0 .489(option is supplied, no path search is performed, and)2.989 F F1 (\214lename)2.989 E F0(GNU Bash-2.05a)72 768 Q(2001 October 29)130.965 E (7)195.395 E EP %%Page: 8 8 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF -.35(BA)72 48 S(SH_B).35 E(UIL)-.1 E 290.48 (TINS\(1\) B)-.92 F(ASH_B)-.35 E(UIL)-.1 E(TINS\(1\))-.92 E .452 (is used as the full \214le name of the command.)144 84 R(The)5.452 E/F1 10/Times-Bold@0 SF2.952 E F0 .452(option causes the shell to for) 2.952 F .452(get all remem-)-.18 F .248(bered locations.)144 96 R .248 (If the)5.248 F F12.748 E F0 .248 (option is supplied, the full pathname to which each)2.748 F/F2 10 /Times-Italic@0 SF(name)2.748 E F0 .249(corresponds is)2.749 F 3.314 (printed. If)144 108 R(multiple)3.314 E F2(name)3.314 E F0(ar)3.314 E .814(guments are supplied with)-.18 F F13.314 E F0 3.314(,t)C(he) -3.314 E F2(name)3.314 E F0 .814(is printed before the hashed)3.314 F 1.109(full pathname.)144 120 R 1.109(If no ar)6.109 F 1.109 (guments are gi)-.18 F -.15(ve)-.25 G 1.109 (n, information about remembered commands is printed.).15 F (The return status is true unless a)144 132 Q F2(name)2.5 E F0 (is not found or an in)2.5 E -.25(va)-.4 G(lid option is supplied.).25 E F1(help)108 148.8 Q F0([)2.5 E F1A F0 2.5(][)C F2(pattern)-2.5 E F0(])A .991(Display helpful information about b)144 160.8 R .991 (uiltin commands.)-.2 F(If)5.991 E F2(pattern)3.491 E F0 .991 (is speci\214ed,)3.491 F F1(help)3.491 E F0(gi)3.49 E -.15(ve)-.25 G 3.49(sd).15 G(etailed)-3.49 E .306(help on all commands matching)144 172.8 R F2(pattern)2.806 E F0 2.807(;o).24 G .307 (therwise help for all the b)-2.807 F .307 (uiltins and shell control struc-)-.2 F .596(tures is printed.)144 184.8 R(The)5.596 E F13.096 E F0 .596 (option restricts the information displayed to a short usage synopsis.) 3.096 F(The)5.596 E(return status is 0 unless no command matches)144 196.8 Q F2(pattern)2.5 E F0(.).24 E F1(history [)108 213.6 Q F2(n)A F1 (])A(history \255c)108 225.6 Q(history \255d)108 237.6 Q F2(of)2.5 E (fset)-.18 E F1(history \255anrw)108 249.6 Q F0([)2.5 E F2(\214lename)A F0(])A F1(history \255p)108 261.6 Q F2(ar)2.5 E(g)-.37 E F0([)2.5 E F2 (ar)A 2.5(g.)-.37 G(..)-2.5 E F0(])A F1(history \255s)108 273.6 Q F2(ar) 2.5 E(g)-.37 E F0([)2.5 E F2(ar)A 2.5(g.)-.37 G(..)-2.5 E F0(])A -.4(Wi) 144 285.6 S .752 (th no options, display the command history list with line numbers.).4 F .752(Lines listed with a)5.752 F F1(*)3.252 E F0(ha)3.252 E -.15(ve)-.2 G .765(been modi\214ed.)144 297.6 R .765(An ar)5.765 F .765(gument of) -.18 F F2(n)3.265 E F0 .765(lists only the last)3.265 F F2(n)3.265 E F0 3.265(lines. If)3.265 F F2(\214lename)3.265 E F0 .764 (is supplied, it is used as)3.265 F .566 (the name of the history \214le; if not, the v)144 309.6 R .566(alue of) -.25 F/F3 9/Times-Bold@0 SF(HISTFILE)3.066 E F0 .567(is used.)2.816 F .567(Options, if supplied, ha)5.567 F .867 -.15(ve t)-.2 H(he).15 E (follo)144 321.6 Q(wing meanings:)-.25 E F1144 333.6 Q F0 (Clear the history list by deleting all the entries.)25.86 E F1144 345.6 Q F2(of)2.5 E(fset)-.18 E F0(Delete the history entry at position) 180 357.6 Q F2(of)2.5 E(fset)-.18 E F0(.)A F1144 369.6 Q F0 .599 (Append the `)25.3 F(`ne)-.74 E(w')-.25 E 3.099('h)-.74 G .598 (istory lines \(history lines entered since the be)-3.099 F .598 (ginning of the current)-.15 F F1(bash)180 381.6 Q F0 (session\) to the history \214le.)2.5 E F1144 393.6 Q F0 .854(Rea\ d the history lines not already read from the history \214le into the c\ urrent history list.)24.74 F .773 (These are lines appended to the history \214le since the be)180 405.6 R .772(ginning of the current)-.15 F F1(bash)3.272 E F0(ses-)3.272 E (sion.)180 417.6 Q F1144 429.6 Q F0(Read the contents of the hist\ ory \214le and use them as the current history)25.86 E(.)-.65 E F1 144 441.6 Q F0(Write the current history to the history \214le, o)23.08 E -.15(ve)-.15 G(rwriting the history \214le').15 E 2.5(sc)-.55 G (ontents.)-2.5 E F1144 453.6 Q F0 .625 (Perform history substitution on the follo)24.74 F(wing)-.25 E F2(ar) 3.125 E(gs)-.37 E F0 .626(and display the result on the standard)3.125 F 2.975(output. Does)180 465.6 R .475 (not store the results in the history list.)2.975 F(Each)5.475 E F2(ar) 2.975 E(g)-.37 E F0 .475(must be quoted to disable)2.975 F (normal history e)180 477.6 Q(xpansion.)-.15 E F1144 489.6 Q F0 .396(Store the)26.41 F F2(ar)2.896 E(gs)-.37 E F0 .396 (in the history list as a single entry)2.896 F 5.396(.T)-.65 G .396 (he last command in the history list is)-5.396 F(remo)180 501.6 Q -.15 (ve)-.15 G 2.5(db).15 G(efore the)-2.5 E F2(ar)2.5 E(gs)-.37 E F0 (are added.)2.5 E .052(The return v)144 518.4 R .051 (alue is 0 unless an in)-.25 F -.25(va)-.4 G .051 (lid option is encountered, an error occurs while reading or writ-).25 F .081(ing the history \214le, an in)144 530.4 R -.25(va)-.4 G(lid).25 E F2(of)2.581 E(fset)-.18 E F0 .082(is supplied as an ar)2.582 F .082 (gument to)-.18 F F12.582 E F0 2.582(,o)C 2.582(rt)-2.582 G .082 (he history e)-2.582 F .082(xpansion sup-)-.15 F(plied as an ar)144 542.4 Q(gument to)-.18 E F12.5 E F0 -.1(fa)2.5 G(ils.).1 E F1 (jobs)108 559.2 Q F0([)2.5 E F1(\255lnprs)A F0 2.5(][)C F2(jobspec)A F0 (... ])2.5 E F1(jobs \255x)108 571.2 Q F2(command)2.5 E F0([)2.5 E F2 (ar)2.5 E(gs)-.37 E F0(... ])2.5 E(The \214rst form lists the acti)144 583.2 Q .3 -.15(ve j)-.25 H 2.5(obs. The).15 F(options ha)2.5 E .3 -.15 (ve t)-.2 H(he follo).15 E(wing meanings:)-.25 E F1144 595.2 Q F0 (List process IDs in addition to the normal information.)27.52 E F1 144 607.2 Q F0(List only the process ID of the job')24.74 E 2.5 (sp)-.55 G(rocess group leader)-2.5 E(.)-.55 E F1144 619.2 Q F0 .194(Display information only about jobs that ha)24.74 F .494 -.15(ve c) -.2 H .193(hanged status since the user w).15 F .193(as last noti-)-.1 F (\214ed of their status.)180 631.2 Q F1144 643.2 Q F0 (Restrict output to running jobs.)25.86 E F1144 655.2 Q F0 (Restrict output to stopped jobs.)26.41 E(If)144 672 Q F2(jobspec)2.934 E F0 .434(is gi)2.934 F -.15(ve)-.25 G .434 (n, output is restricted to information about that job).15 F 5.434(.T) -.4 G .434(he return status is 0 unless)-5.434 F(an in)144 684 Q -.25 (va)-.4 G(lid option is encountered or an in).25 E -.25(va)-.4 G(lid).25 E F2(jobspec)2.5 E F0(is supplied.)2.5 E .608(If the)144 700.8 R F1 3.107 E F0 .607(option is supplied,)3.107 F F1(jobs)3.107 E F0 .607(replaces an)3.107 F(y)-.15 E F2(jobspec)3.107 E F0 .607(found in) 3.107 F F2(command)3.107 E F0(or)3.107 E F2(ar)3.107 E(gs)-.37 E F0 .607 (with the corre-)3.107 F(sponding process group ID, and e)144 712.8 Q -.15(xe)-.15 G(cutes).15 E F2(command)2.5 E F0(passing it)2.5 E F2(ar) 2.5 E(gs)-.37 E F0 2.5(,r).27 G(eturning its e)-2.5 E(xit status.)-.15 E (GNU Bash-2.05a)72 768 Q(2001 October 29)130.965 E(8)195.395 E EP %%Page: 9 9 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF -.35(BA)72 48 S(SH_B).35 E(UIL)-.1 E 290.48 (TINS\(1\) B)-.92 F(ASH_B)-.35 E(UIL)-.1 E(TINS\(1\))-.92 E/F1 10 /Times-Bold@0 SF(kill)108 84 Q F0([)2.5 E F1A/F2 10/Times-Italic@0 SF(sigspec)2.5 E F0(|)2.5 E F12.5 E F2(signum)2.5 E F0(|)2.5 E F1 2.5 E F2(sigspec)A F0 2.5(][)C F2(pid)-2.5 E F0(|)2.5 E F2(jobspec) 2.5 E F0 2.5(].)C(..)-2.5 E F1(kill \255l)108 96 Q F0([)2.5 E F2 (sigspec)A F0(|)2.5 E F2 -.2(ex)2.5 G(it_status).2 E F0(])A .353 (Send the signal named by)144 108 R F2(sigspec)2.853 E F0(or)2.853 E F2 (signum)2.853 E F0 .354(to the processes named by)2.853 F F2(pid)2.854 E F0(or)2.854 E F2(jobspec)2.854 E F0(.).31 E F2(sigspec)5.354 E F0(is) 2.854 E .121(either a signal name such as)144 120 R/F3 9/Times-Bold@0 SF (SIGKILL)2.62 E F0 .12(or a signal number;)2.37 F F2(signum)2.62 E F0 .12(is a signal number)2.62 F 5.12(.I)-.55 G(f)-5.12 E F2(sigspec)2.62 E F0(is)2.62 E 3.43(as)144 132 S .93(ignal name, the name may be gi)-3.43 F -.15(ve)-.25 G 3.43(nw).15 G .93(ith or without the)-3.43 F F3(SIG) 3.43 E F0 3.43(pre\214x. If)3.18 F F2(sigspec)3.43 E F0 .931 (is not present,)3.431 F(then)144 144 Q F3(SIGTERM)3.073 E F0 .572 (is assumed.)2.822 F .572(An ar)5.572 F .572(gument of)-.18 F F1 3.072 E F0 .572(lists the signal names.)3.072 F .572(If an)5.572 F 3.072 (ya)-.15 G -.18(rg)-3.072 G .572(uments are sup-).18 F .267(plied when) 144 156 R F12.767 E F0 .267(is gi)2.767 F -.15(ve)-.25 G .267 (n, the names of the signals corresponding to the ar).15 F .267 (guments are listed, and the)-.18 F .288(return status is 0.)144 168 R (The)5.288 E F2 -.2(ex)2.788 G(it_status).2 E F0(ar)2.788 E .288 (gument to)-.18 F F12.788 E F0 .287 (is a number specifying either a signal number or)2.788 F .551(the e)144 180 R .551(xit status of a process terminated by a signal.)-.15 F F1 (kill)5.551 E F0 .551(returns true if at least one signal w)3.051 F .552 (as suc-)-.1 F(cessfully sent, or f)144 192 Q (alse if an error occurs or an in)-.1 E -.25(va)-.4 G (lid option is encountered.).25 E F1(let)108 208.8 Q F2(ar)2.5 E(g)-.37 E F0([)2.5 E F2(ar)A(g)-.37 E F0(...])2.5 E(Each)144 220.8 Q F2(ar)3.677 E(g)-.37 E F0 1.177(is an arithmetic e)3.677 F 1.177(xpression to be e) -.15 F -.25(va)-.25 G 1.177(luated \(see).25 F F3 1.176(ARITHMETIC EV) 3.677 F(ALU)-1.215 E -.855(AT)-.54 G(ION).855 E/F4 9/Times-Roman@0 SF (\).)A F0 1.176(If the)5.676 F(last)144 232.8 Q F2(ar)2.5 E(g)-.37 E F0 -.25(eva)2.5 G(luates to 0,).25 E F1(let)2.5 E F0 (returns 1; 0 is returned otherwise.)2.5 E F1(local)108 249.6 Q F0([)2.5 E F2(option)A F0 2.5(][)C F2(name)-2.5 E F0([=)A F2(value)A F0 2.5(].)C (..])-2.5 E -.15(Fo)144 261.6 S 2.593(re).15 G .093(ach ar)-2.593 F .093 (gument, a local v)-.18 F .094(ariable named)-.25 F F2(name)2.594 E F0 .094(is created, and assigned)2.594 F F2(value)2.594 E F0 5.094(.T).18 G (he)-5.094 E F2(option)2.594 E F0 .094(can be)2.594 F(an)144 273.6 Q 3.153(yo)-.15 G 3.153(ft)-3.153 G .653(he options accepted by)-3.153 F F1(declar)3.153 E(e)-.18 E F0 5.652(.W)C(hen)-5.652 E F1(local)3.152 E F0 .652(is used within a function, it causes the v)3.152 F(ari-)-.25 E (able)144 285.6 Q F2(name)3.394 E F0 .894(to ha)3.394 F 1.194 -.15 (ve a v)-.2 H .894 (isible scope restricted to that function and its children.).15 F -.4 (Wi)5.895 G .895(th no operands,).4 F F1(local)144 297.6 Q F0 1.165 (writes a list of local v)3.665 F 1.165 (ariables to the standard output.)-.25 F 1.165(It is an error to use) 6.165 F F1(local)3.664 E F0 1.164(when not)3.664 F .262 (within a function.)144 309.6 R .263(The return status is 0 unless)5.262 F F1(local)2.763 E F0 .263(is used outside a function, an in)2.763 F -.25(va)-.4 G(lid).25 E F2(name)2.763 E F0(is)2.763 E(supplied, or)144 321.6 Q F2(name)2.5 E F0(is a readonly v)2.5 E(ariable.)-.25 E F1 (logout)108 338.4 Q F0(Exit a login shell.)9.33 E F1(popd)108 355.2 Q F0 <5bad>2.5 E F1(n)A F0 2.5(][)C(+)-2.5 E F2(n)A F0 2.5(][)C-2.5 E F2 (n)A F0(])A(Remo)144 367.2 Q -.15(ve)-.15 G 2.8(se).15 G .3 (ntries from the directory stack.)-2.8 F -.4(Wi)5.299 G .299(th no ar).4 F .299(guments, remo)-.18 F -.15(ve)-.15 G 2.799(st).15 G .299 (he top directory from the)-2.799 F 1.478(stack, and performs a)144 379.2 R F1(cd)3.978 E F0 1.479(to the ne)3.978 F 3.979(wt)-.25 G 1.479 (op directory)-3.979 F 6.479(.A)-.65 G -.18(rg)-6.479 G 1.479 (uments, if supplied, ha).18 F 1.779 -.15(ve t)-.2 H 1.479(he follo).15 F(wing)-.25 E(meanings:)144 391.2 Q F1(+)144 403.2 Q F2(n)A F0(Remo)25.3 E -.15(ve)-.15 G 2.64(st).15 G(he)-2.64 E F2(n)2.64 E F0 .14 (th entry counting from the left of the list sho)B .14(wn by)-.25 F F1 (dirs)2.64 E F0 2.64(,s)C .14(tarting with zero.)-2.64 F -.15(Fo)180 415.2 S 2.5(re).15 G(xample:)-2.65 E/F5 10/Courier@0 SF(popd +0)2.5 E F0 (remo)2.5 E -.15(ve)-.15 G 2.5(st).15 G(he \214rst directory)-2.5 E(,) -.65 E F5(popd +1)2.5 E F0(the second.)2.5 E F1144 427.2 Q F2(n)A F0 (Remo)25.3 E -.15(ve)-.15 G 3.759(st).15 G(he)-3.759 E F2(n)3.759 E F0 1.259(th entry counting from the right of the list sho)B 1.26(wn by)-.25 F F1(dirs)3.76 E F0 3.76(,s)C 1.26(tarting with)-3.76 F 2.5(zero. F)180 439.2 R(or e)-.15 E(xample:)-.15 E F5(popd -0)2.5 E F0(remo)2.5 E -.15 (ve)-.15 G 2.5(st).15 G(he last directory)-2.5 E(,)-.65 E F5(popd -1)2.5 E F0(the ne)2.5 E(xt to last.)-.15 E F1144 451.2 Q F0 .551 (Suppresses the normal change of directory when remo)24.74 F .551 (ving directories from the stack, so)-.15 F (that only the stack is manipulated.)180 463.2 Q .643(If the)144 480 R F1(popd)3.143 E F0 .643(command is successful, a)3.143 F F1(dirs)3.143 E F0 .644(is performed as well, and the return status is 0.)3.143 F F1 (popd)5.644 E F0 .416(returns f)144 492 R .416(alse if an in)-.1 F -.25 (va)-.4 G .415(lid option is encountered, the directory stack is empty) .25 F 2.915(,an)-.65 G(on-e)-2.915 E .415(xistent direc-)-.15 F (tory stack entry is speci\214ed, or the directory change f)144 504 Q (ails.)-.1 E F1(printf)108 520.8 Q F2(format)2.5 E F0([)2.5 E F2(ar)A (guments)-.37 E F0(])A .372(Write the formatted)144 532.8 R F2(ar)2.872 E(guments)-.37 E F0 .372 (to the standard output under the control of the)2.872 F F2(format)2.872 E F0 5.372(.T)C(he)-5.372 E F2(format)2.872 E F0 1.804(is a character s\ tring which contains three types of objects: plain characters, which ar\ e simply)144 544.8 R .158 (copied to standard output, character escape sequences, which are con) 144 556.8 R -.15(ve)-.4 G .159(rted and copied to the stan-).15 F .499(\ dard output, and format speci\214cations, each of which causes printing\ of the ne)144 568.8 R .499(xt successi)-.15 F -.15(ve)-.25 G F2(ar) 3.149 E(gu-)-.37 E(ment)144 580.8 Q F0 5.423(.I)C 2.923(na)-5.423 G .423 (ddition to the standard)-2.923 F F2(printf)2.923 E F0 .424 (\(1\) formats,)B F1(%b)2.924 E F0(causes)2.924 E F1(printf)2.924 E F0 .424(to e)2.924 F .424(xpand backslash escape)-.15 F 1.994 (sequences in the corresponding)144 592.8 R F2(ar)4.494 E(gument)-.37 E F0 4.493(,a)C(nd)-4.493 E F1(%q)4.493 E F0(causes)4.493 E F1(printf) 4.493 E F0 1.993(to output the corresponding)4.493 F F2(ar)144 604.8 Q (gument)-.37 E F0(in a format that can be reused as shell input.)2.5 E (The)144 628.8 Q F2(format)3.423 E F0 .923 (is reused as necessary to consume all of the)3.423 F F2(ar)3.423 E (guments)-.37 E F0 5.923(.I)C 3.423(ft)-5.923 G(he)-3.423 E F2(format) 3.423 E F0 .924(requires more)3.424 F F2(ar)144 640.8 Q(guments)-.37 E F0 .033(than are supplied, the e)2.534 F .033 (xtra format speci\214cations beha)-.15 F .333 -.15(ve a)-.2 H 2.533(si) .15 G 2.533(faz)-2.533 G .033(ero v)-2.533 F .033(alue or null string,) -.25 F(as appropriate, had been supplied.)144 652.8 Q(The return v)5 E (alue is zero on success, non-zero on f)-.25 E(ailure.)-.1 E F1(pushd) 108 669.6 Q F0([)2.5 E F1A F0 2.5(][)C F2(dir)-2.5 E F0(])A F1 (pushd)108 681.6 Q F0([)2.5 E F1A F0 2.5(][)C(+)-2.5 E F2(n)A F0 2.5(][)C-2.5 E F2(n)A F0(])A .639(Adds a directory to the top of th\ e directory stack, or rotates the stack, making the ne)144 693.6 R 3.14 (wt)-.25 G .64(op of the)-3.14 F 1.316(stack the current w)144 705.6 R 1.316(orking directory)-.1 F 6.316(.W)-.65 G 1.315(ith no ar)-6.716 F 1.315(guments, e)-.18 F 1.315(xchanges the top tw)-.15 F 3.815(od)-.1 G 1.315(irectories and)-3.815 F .871 (returns 0, unless the directory stack is empty)144 717.6 R 5.871(.A) -.65 G -.18(rg)-5.871 G .872(uments, if supplied, ha).18 F 1.172 -.15 (ve t)-.2 H .872(he follo).15 F .872(wing mean-)-.25 F(ings:)144 729.6 Q (GNU Bash-2.05a)72 768 Q(2001 October 29)130.965 E(9)195.395 E EP %%Page: 10 10 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF -.35(BA)72 48 S(SH_B).35 E(UIL)-.1 E 290.48 (TINS\(1\) B)-.92 F(ASH_B)-.35 E(UIL)-.1 E(TINS\(1\))-.92 E/F1 10 /Times-Bold@0 SF(+)144 84 Q/F2 10/Times-Italic@0 SF(n)A F0 1.268 (Rotates the stack so that the)25.3 F F2(n)3.768 E F0 1.267 (th directory \(counting from the left of the list sho)B 1.267(wn by) -.25 F F1(dirs)180 96 Q F0 2.5(,s)C(tarting with zero\) is at the top.) -2.5 E F1144 108 Q F2(n)A F0 .92(Rotates the stack so that the)25.3 F F2(n)3.42 E F0 .92 (th directory \(counting from the right of the list sho)B .92(wn by)-.25 F F1(dirs)180 120 Q F0 2.5(,s)C(tarting with zero\) is at the top.)-2.5 E F1144 132 Q F0 .902(Suppresses the normal change of directory w\ hen adding directories to the stack, so that)24.74 F (only the stack is manipulated.)180 144 Q F2(dir)144 156 Q F0(Adds)24.33 E F2(dir)2.5 E F0(to the directory stack at the top, making it the ne) 2.5 E 2.5(wc)-.25 G(urrent w)-2.5 E(orking directory)-.1 E(.)-.65 E .488 (If the)144 172.8 R F1(pushd)2.988 E F0 .488(command is successful, a) 2.988 F F1(dirs)2.988 E F0 .488(is performed as well.)2.988 F .489 (If the \214rst form is used,)5.488 F F1(pushd)2.989 E F0 1.103 (returns 0 unless the cd to)144 184.8 R F2(dir)3.603 E F0 -.1(fa)3.603 G 3.603(ils. W).1 F 1.103(ith the second form,)-.4 F F1(pushd)3.603 E F0 1.103(returns 0 unless the directory)3.603 F .846(stack is empty)144 196.8 R 3.346(,an)-.65 G(on-e)-3.346 E .847(xistent directory stack ele\ ment is speci\214ed, or the directory change to the)-.15 F (speci\214ed ne)144 208.8 Q 2.5(wc)-.25 G(urrent directory f)-2.5 E (ails.)-.1 E F1(pwd)108 225.6 Q F0([)2.5 E F1(\255LP)A F0(])A .845 (Print the absolute pathname of the current w)144 237.6 R .845 (orking directory)-.1 F 5.844(.T)-.65 G .844 (he pathname printed contains no)-5.844 F .181(symbolic links if the)144 249.6 R F12.681 E F0 .181(option is supplied or the)2.681 F F1 .181(\255o ph)2.681 F(ysical)-.15 E F0 .181(option to the)2.681 F F1 (set)2.681 E F0 -.2(bu)2.681 G .182(iltin command is).2 F 3.264 (enabled. If)144 261.6 R(the)3.264 E F13.264 E F0 .763 (option is used, the pathname printed may contain symbolic links.)3.264 F .763(The return)5.763 F 1.36(status is 0 unless an error occurs while\ reading the name of the current directory or an in)144 273.6 R -.25(va) -.4 G(lid).25 E(option is supplied.)144 285.6 Q F1 -.18(re)108 302.4 S (ad).18 E F0([)2.5 E F1(\255ers)A F0 2.5(][)C F1-2.5 E F2(timeout) 2.5 E F0 2.5(][)C F1-2.5 E F2(aname)2.5 E F0 2.5(][)C F1-2.5 E F2(pr)2.5 E(ompt)-.45 E F0 2.5(][)C F1-2.5 E F2(nc)2.5 E(har) -.15 E(s)-.1 E F0 2.5(][)C F1-2.5 E F2(delim)2.5 E F0 2.5(][)C F2 (name)-2.5 E F0(...])2.5 E .037 (One line is read from the standard input, and the \214rst w)144 314.4 R .036(ord is assigned to the \214rst)-.1 F F2(name)2.536 E F0 2.536(,t) .18 G .036(he second)-2.536 F -.1(wo)144 326.4 S .269(rd to the second) .1 F F2(name)2.769 E F0 2.769(,a).18 G .269(nd so on, with lefto)-2.769 F -.15(ve)-.15 G 2.769(rw).15 G .27(ords and their interv)-2.869 F .27 (ening separators assigned)-.15 F .336(to the last)144 338.4 R F2(name) 2.836 E F0 5.336(.I).18 G 2.836(ft)-5.336 G .336(here are fe)-2.836 F .336(wer w)-.25 F .336 (ords read from the standard input than names, the remaining)-.1 F .303 (names are assigned empty v)144 350.4 R 2.804(alues. The)-.25 F .304 (characters in)2.804 F/F3 9/Times-Bold@0 SF(IFS)2.804 E F0 .304 (are used to split the line into w)2.554 F 2.804(ords. The)-.1 F .178 (backslash character \()144 362.4 R F1(\\)A F0 2.678(\)m)C .178 (ay be used to remo)-2.678 F .478 -.15(ve a)-.15 H .477 -.15(ny s).15 H .177(pecial meaning for the ne).15 F .177(xt character read and)-.15 F (for line continuation.)144 374.4 Q(Options, if supplied, ha)5 E .3 -.15 (ve t)-.2 H(he follo).15 E(wing meanings:)-.25 E F1144 386.4 Q F2 (aname)2.5 E F0 1.049(The w)180 398.4 R 1.049 (ords are assigned to sequential indices of the array v)-.1 F(ariable) -.25 E F2(aname)3.55 E F0 3.55(,s).18 G 1.05(tarting at 0.)-3.55 F F2 (aname)180 410.4 Q F0(is unset before an)2.5 E 2.5(yn)-.15 G .5 -.25 (ew va)-2.5 H(lues are assigned.).25 E(Other)5 E F2(name)2.5 E F0(ar)2.5 E(guments are ignored.)-.18 E F1144 422.4 Q F2(delim)2.5 E F0 (The \214rst character of)180 434.4 Q F2(delim)2.5 E F0 (is used to terminate the input line, rather than ne)2.5 E(wline.)-.25 E F1144 446.4 Q F0 .373 (If the standard input is coming from a terminal,)25.86 F F1 -.18(re) 2.873 G(adline).18 E F0(\(see)2.873 E F3(READLINE)2.872 E F0(abo)2.622 E -.15(ve)-.15 G 2.872(\)i).15 G 2.872(su)-2.872 G(sed)-2.872 E (to obtain the line.)180 458.4 Q F1144 470.4 Q F2(nc)2.5 E(har) -.15 E(s)-.1 E F1 -.18(re)180 482.4 S(ad).18 E F0 1.394 (returns after reading)3.894 F F2(nc)3.894 E(har)-.15 E(s)-.1 E F0 1.395 (characters rather than w)3.894 F 1.395(aiting for a complete line of) -.1 F(input.)180 494.4 Q F1144 506.4 Q F2(pr)2.5 E(ompt)-.45 E F0 (Display)180 518.4 Q F2(pr)3.661 E(ompt)-.45 E F0 1.161 (on standard error)3.661 F 3.661(,w)-.4 G 1.161(ithout a trailing ne) -3.661 F 1.161(wline, before attempting to read)-.25 F(an)180 530.4 Q 2.5(yi)-.15 G 2.5(nput. The)-2.5 F (prompt is displayed only if input is coming from a terminal.)2.5 E F1 144 542.4 Q F0 .543(Backslash does not act as an escape character) 25.86 F 5.543(.T)-.55 G .544(he backslash is considered to be part of) -5.543 F(the line.)180 554.4 Q(In particular)5 E 2.5(,ab)-.4 G (ackslash-ne)-2.5 E(wline pair may not be used as a line continuation.) -.25 E F1144 566.4 Q F0(Silent mode.)26.41 E (If input is coming from a terminal, characters are not echoed.)5 E F1 144 578.4 Q F2(timeout)2.5 E F0(Cause)180 590.4 Q F1 -.18(re)3.549 G(ad).18 E F0 1.048(to time out and return f)3.549 F 1.048 (ailure if a complete line of input is not read within)-.1 F F2(timeout) 180 602.4 Q F0 2.92(seconds. This)2.92 F .42(option has no ef)2.92 F .42 (fect if)-.25 F F1 -.18(re)2.92 G(ad).18 E F0 .42 (is not reading input from the terminal)2.92 F(or a pipe.)180 614.4 Q .227(If no)144 631.2 R F2(names)2.727 E F0 .227 (are supplied, the line read is assigned to the v)2.727 F(ariable)-.25 E F3(REPL)2.726 E(Y)-.828 E/F4 9/Times-Roman@0 SF(.)A F0 .226 (The return code is zero,)4.726 F (unless end-of-\214le is encountered or)144 643.2 Q F1 -.18(re)2.5 G(ad) .18 E F0(times out.)2.5 E F1 -.18(re)108 660 S(adonly).18 E F0([)2.5 E F1(\255apf)A F0 2.5(][)C F2(name)-2.5 E F0(...])2.5 E .809(The gi)144 672 R -.15(ve)-.25 G(n).15 E F2(names)3.309 E F0 .809(are mark)3.309 F .809(ed readonly; the v)-.1 F .809(alues of these)-.25 F F2(names)3.309 E F0 .81(may not be changed by subse-)3.31 F 1.097(quent assignment.)144 684 R 1.097(If the)6.097 F F13.597 E F0 1.097 (option is supplied, the functions corresponding to the)3.597 F F2 (names)3.596 E F0 1.096(are so)3.596 F(mark)144 696 Q 2.904(ed. The)-.1 F F12.904 E F0 .404(option restricts the v)2.904 F .404 (ariables to arrays.)-.25 F .404(If no)5.404 F F2(name)2.904 E F0(ar) 2.904 E .404(guments are gi)-.18 F -.15(ve)-.25 G .405(n, or if the).15 F F1144 708 Q F0 .796 (option is supplied, a list of all readonly names is printed.)3.297 F (The)5.796 E F13.296 E F0 .796(option causes output to be)3.296 F .103(displayed in a format that may be reused as input.)144 720 R .103 (The return status is 0 unless an in)5.103 F -.25(va)-.4 G .104 (lid option is).25 F(GNU Bash-2.05a)72 768 Q(2001 October 29)130.965 E (10)190.395 E EP %%Page: 11 11 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF -.35(BA)72 48 S(SH_B).35 E(UIL)-.1 E 290.48 (TINS\(1\) B)-.92 F(ASH_B)-.35 E(UIL)-.1 E(TINS\(1\))-.92 E .06 (encountered, one of the)144 84 R/F1 10/Times-Italic@0 SF(names)2.56 E F0 .06(is not a v)2.56 F .06(alid shell v)-.25 F .06(ariable name, or) -.25 F/F2 10/Times-Bold@0 SF2.56 E F0 .06(is supplied with a)2.56 F F1(name)2.56 E F0(that)2.56 E(is not a function.)144 96 Q F2 -.18(re) 108 112.8 S(tur).18 E(n)-.15 E F0([)2.5 E F1(n)A F0(])A .618 (Causes a function to e)144 124.8 R .618(xit with the return v)-.15 F .618(alue speci\214ed by)-.25 F F1(n)3.118 E F0 5.619(.I).24 G(f)-5.619 E F1(n)3.119 E F0 .619(is omitted, the return status is)3.119 F 1.335 (that of the last command e)144 136.8 R -.15(xe)-.15 G 1.335 (cuted in the function body).15 F 6.335(.I)-.65 G 3.835(fu)-6.335 G 1.335(sed outside a function, b)-3.835 F 1.335(ut during)-.2 F -.15(exe) 144 148.8 S .794(cution of a script by the).15 F F2(.)3.294 E F0(\() 5.794 E F2(sour)A(ce)-.18 E F0 3.294(\)c)C .794 (ommand, it causes the shell to stop e)-3.294 F -.15(xe)-.15 G .795 (cuting that script).15 F .278(and return either)144 160.8 R F1(n)2.778 E F0 .278(or the e)2.778 F .277(xit status of the last command e)-.15 F -.15(xe)-.15 G .277(cuted within the script as the e).15 F .277 (xit sta-)-.15 F .081(tus of the script.)144 172.8 R .082 (If used outside a function and not during e)5.082 F -.15(xe)-.15 G .082 (cution of a script by).15 F F2(.)2.582 E F0 2.582(,t).833 G .082 (he return sta-)-2.582 F(tus is f)144 184.8 Q(alse.)-.1 E F2(set)108 201.6 Q F0([)2.5 E F2(\255\255abefhkmnptuvxBCHP)A F0 2.5(][)C F2 -2.5 E F1(option)2.5 E F0 2.5(][)C F1(ar)-2.5 E(g)-.37 E F0(...])2.5 E -.4(Wi)144 213.6 S .836(thout options, the name and v).4 F .835 (alue of each shell v)-.25 F .835 (ariable are displayed in a format that can be)-.25 F .404 (reused as input.)144 225.6 R .405 (The output is sorted according to the current locale.)5.404 F .405 (When options are speci\214ed,)5.405 F(the)144 237.6 Q 3.895(ys)-.15 G 1.395(et or unset shell attrib)-3.895 F 3.895(utes. An)-.2 F 3.895(ya) -.15 G -.18(rg)-3.895 G 1.395 (uments remaining after the options are processed are).18 F 2.381 (treated as v)144 249.6 R 2.382 (alues for the positional parameters and are assigned, in order)-.25 F 4.882(,t)-.4 G(o)-4.882 E F2($1)4.882 E F0(,)A F2($2)4.882 E F0(,)A F2 4.882(... $)4.882 F F1(n)A F0(.)A(Options, if speci\214ed, ha)144 261.6 Q .3 -.15(ve t)-.2 H(he follo).15 E(wing meanings:)-.25 E F2144 273.6 Q F0 .54(Automatically mark v)29.3 F .539 (ariables and functions which are modi\214ed or created for e)-.25 F .539(xport to)-.15 F(the en)184 285.6 Q (vironment of subsequent commands.)-.4 E F2144 297.6 Q F0 .131 (Report the status of terminated background jobs immediately)28.74 F 2.632(,r)-.65 G .132(ather than before the ne)-2.632 F(xt)-.15 E (primary prompt.)184 309.6 Q(This is ef)5 E(fecti)-.25 E .3 -.15(ve o) -.25 H(nly when job control is enabled.).15 E F2144 321.6 Q F0 1.694(Exit immediately if a)29.86 F F1 1.693(simple command)4.193 F F0 (\(see)4.193 E/F3 9/Times-Bold@0 SF 1.693(SHELL GRAMMAR)4.193 F F0(abo) 3.943 E -.15(ve)-.15 G 4.193(\)e).15 G 1.693(xits with a)-4.343 F .778 (non-zero status.)184 333.6 R .778(The shell does not e)5.778 F .778 (xit if the command that f)-.15 F .778(ails is part of an)-.1 F F1 (until)3.279 E F0(or)3.279 E F1(while)184 345.6 Q F0 .821 (loop, part of an)3.321 F F1(if)3.321 E F0 .821(statement, part of a) 3.321 F F2(&&)3.321 E F0(or)3.32 E/F4 10/Symbol SF3.32 E F0 .82 (list, or if the command')3.32 F 3.32(sr)-.55 G(eturn)-3.32 E -.25(va) 184 357.6 S(lue is being in).25 E -.15(ve)-.4 G(rted via).15 E F2(!)2.5 E F0 5(.A)C(trap on)-2.5 E F2(ERR)2.5 E F0 2.5(,i)C 2.5(fs)-2.5 G (et, is e)-2.5 E -.15(xe)-.15 G(cuted before the shell e).15 E(xits.) -.15 E F2144 369.6 Q F0(Disable pathname e)30.97 E(xpansion.)-.15 E F2144 381.6 Q F0 2.238(Remember the location of commands as the) 28.74 F 4.738(ya)-.15 G 2.239(re look)-4.738 F 2.239(ed up for e)-.1 F -.15(xe)-.15 G 4.739(cution. This).15 F(is)4.739 E(enabled by def)184 393.6 Q(ault.)-.1 E F2144 405.6 Q F0 .514(All ar)28.74 F .514 (guments in the form of assignment statements are placed in the en)-.18 F .513(vironment for a)-.4 F (command, not just those that precede the command name.)184 417.6 Q F2 144 429.6 Q F0 .148(Monitor mode.)25.97 F .148 (Job control is enabled.)5.148 F .149(This option is on by def)5.148 F .149(ault for interacti)-.1 F .449 -.15(ve s)-.25 H(hells).15 E .637 (on systems that support it \(see)184 441.6 R F3 .636(JOB CONTR)3.136 F (OL)-.27 E F0(abo)2.886 E -.15(ve)-.15 G 3.136(\). Background).15 F .636 (processes run in a)3.136 F .641 (separate process group and a line containing their e)184 453.6 R .642 (xit status is printed upon their com-)-.15 F(pletion.)184 465.6 Q F2 144 477.6 Q F0 .653(Read commands b)28.74 F .653(ut do not e)-.2 F -.15(xe)-.15 G .653(cute them.).15 F .652 (This may be used to check a shell script for)5.653 F(syntax errors.)184 489.6 Q(This is ignored by interacti)5 E .3 -.15(ve s)-.25 H(hells.).15 E F2144 501.6 Q F1(option\255name)2.5 E F0(The)184 513.6 Q F1 (option\255name)2.5 E F0(can be one of the follo)2.5 E(wing:)-.25 E F2 (allexport)184 525.6 Q F0(Same as)224 537.6 Q F22.5 E F0(.)A F2 (braceexpand)184 549.6 Q F0(Same as)224 561.6 Q F22.5 E F0(.)A F2 (emacs)184 573.6 Q F0 .089 (Use an emacs-style command line editing interf)13.9 F 2.589(ace. This) -.1 F .089(is enabled by def)2.589 F(ault)-.1 E .95 (when the shell is interacti)224 585.6 R -.15(ve)-.25 G 3.45(,u).15 G .95(nless the shell is started with the)-3.45 F F2(\255\255noediting) 3.45 E F0(option.)224 597.6 Q F2(err)184 609.6 Q(exit)-.18 E F0(Same as) 11.31 E F22.5 E F0(.)A F2(hashall)184 621.6 Q F0(Same as)9.43 E F2 2.5 E F0(.)A F2(histexpand)184 633.6 Q F0(Same as)224 645.6 Q F2 2.5 E F0(.)A F2(history)184 657.6 Q F0 .586 (Enable command history)10 F 3.087(,a)-.65 G 3.087(sd)-3.087 G .587 (escribed abo)-3.087 F .887 -.15(ve u)-.15 H(nder).15 E F3(HIST)3.087 E (OR)-.162 E(Y)-.315 E/F5 9/Times-Roman@0 SF(.)A F0 .587(This option is) 5.087 F(on by def)224 669.6 Q(ault in interacti)-.1 E .3 -.15(ve s)-.25 H(hells.).15 E F2(ignor)184 681.6 Q(eeof)-.18 E F0 1.657(The ef)224 693.6 R 1.657(fect is as if the shell command)-.25 F/F6 10/Courier@0 SF (IGNOREEOF=10)4.156 E F0 1.656(had been e)4.156 F -.15(xe)-.15 G(cuted) .15 E(\(see)224 705.6 Q F2(Shell V)2.5 E(ariables)-.92 E F0(abo)2.5 E -.15(ve)-.15 G(\).).15 E(GNU Bash-2.05a)72 768 Q(2001 October 29)130.965 E(11)190.395 E EP %%Page: 12 12 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF -.35(BA)72 48 S(SH_B).35 E(UIL)-.1 E 290.48 (TINS\(1\) B)-.92 F(ASH_B)-.35 E(UIL)-.1 E(TINS\(1\))-.92 E/F1 10 /Times-Bold@0 SF -.1(ke)184 84 S(yw).1 E(ord)-.1 E F0(Same as)224 96 Q F12.5 E F0(.)A F1(monitor)184 108 Q F0(Same as)5.56 E F12.5 E F0(.)A F1(noclob)184 120 Q(ber)-.1 E F0(Same as)224 132 Q F12.5 E F0(.)A F1(noexec)184 144 Q F0(Same as)11.12 E F12.5 E F0(.)A F1 (noglob)184 156 Q F0(Same as)11.1 E F12.5 E F0(.)A F1(nolog)5 E F0 (Currently ignored.)2.5 E F1(notify)184 168 Q F0(Same as)15 E F1 2.5 E F0(.)A F1(nounset)184 180 Q F0(Same as)6.66 E F12.5 E F0(.)A F1(onecmd)184 192 Q F0(Same as)6.67 E F12.5 E F0(.)A F1(ph)184 204 Q(ysical)-.15 E F0(Same as)5.14 E F12.5 E F0(.)A F1(posix)184 216 Q F0 2.09(Change the beha)17.77 F 2.091(vior of)-.2 F F1(bash)4.591 E F0 2.091(where the def)4.591 F 2.091(ault operation dif)-.1 F 2.091 (fers from the)-.25 F(POSIX 1003.2 standard to match the standard \()224 228 Q/F2 10/Times-Italic@0 SF(posix mode)A F0(\).)A F1(pri)184 240 Q (vileged)-.1 E F0(Same as)224 252 Q F12.5 E F0(.)A F1 -.1(ve)184 264 S(rbose).1 E F0(Same as)7.33 E F12.5 E F0(.)A F1(vi)184 276 Q F0(Use a vi-style command line editing interf)32.22 E(ace.)-.1 E F1 (xtrace)184 288 Q F0(Same as)13.35 E F12.5 E F0(.)A(If)184 306 Q F13.053 E F0 .553(is supplied with no)3.053 F F2(option\255name) 3.053 E F0 3.053(,t)C .553(he v)-3.053 F .552 (alues of the current options are printed.)-.25 F(If)5.552 E F1(+o)184 318 Q F0 1.071(is supplied with no)3.571 F F2(option\255name)3.571 E F0 3.571(,as)C 1.071(eries of)-3.571 F F1(set)3.572 E F0 1.072 (commands to recreate the current)3.572 F (option settings is displayed on the standard output.)184 330 Q F1 144 342 Q F0 -.45(Tu)28.74 G 1.217(rn on).45 F F2(privile)3.716 E -.1 (ge)-.4 G(d).1 E F0 3.716(mode. In)3.716 F 1.216(this mode, the)3.716 F /F3 9/Times-Bold@0 SF($ENV)3.716 E F0(and)3.466 E F3($B)3.716 E(ASH_ENV) -.27 E F0 1.216(\214les are not pro-)3.466 F 1.705 (cessed, shell functions are not inherited from the en)184 354 R 1.705 (vironment, and the)-.4 F F3(SHELLOPTS)4.206 E F0 -.25(va)184 366 S .019 (riable, if it appears in the en).25 F .019(vironment, is ignored.)-.4 F .018(If the shell is started with the ef)5.019 F(fec-)-.25 E(ti)184 378 Q 1.158 -.15(ve u)-.25 H .859 (ser \(group\) id not equal to the real user \(group\) id, and the).15 F F13.359 E F0 .859(option is not sup-)3.359 F .294 (plied, these actions are tak)184 390 R .293(en and the ef)-.1 F(fecti) -.25 E .593 -.15(ve u)-.25 H .293(ser id is set to the real user id.).15 F .293(If the)5.293 F F12.793 E F0 1.195 (option is supplied at startup, the ef)184 402 R(fecti)-.25 E 1.495 -.15 (ve u)-.25 H 1.195(ser id is not reset.).15 F -.45(Tu)6.196 G 1.196 (rning this option of).45 F(f)-.25 E(causes the ef)184 414 Q(fecti)-.25 E .3 -.15(ve u)-.25 H (ser and group ids to be set to the real user and group ids.).15 E F1 144 426 Q F0(Exit after reading and e)30.97 E -.15(xe)-.15 G (cuting one command.).15 E F1144 438 Q F0 -.35(Tr)28.74 G .445 (eat unset v).35 F .444 (ariables as an error when performing parameter e)-.25 F 2.944 (xpansion. If)-.15 F -.15(ex)2.944 G .444(pansion is).15 F .519 (attempted on an unset v)184 450 R .519 (ariable, the shell prints an error message, and, if not interacti)-.25 F -.15(ve)-.25 G(,).15 E -.15(ex)184 462 S(its with a non-zero status.) .15 E F1144 474 Q F0(Print shell input lines as the)29.3 E 2.5(ya) -.15 G(re read.)-2.5 E F1144 486 Q F0 .522(After e)29.3 F .522 (xpanding each)-.15 F F2 .522(simple command)3.022 F F0 3.022(,d)C .521 (isplay the e)-3.022 F .521(xpanded v)-.15 F .521(alue of)-.25 F F3(PS4) 3.021 E/F4 9/Times-Roman@0 SF(,)A F0(follo)2.771 E .521(wed by)-.25 F (the command and its e)184 498 Q(xpanded ar)-.15 E(guments.)-.18 E F1 144 510 Q F0 2.578(The shell performs brace e)27.63 F 2.578 (xpansion \(see)-.15 F F1 2.578(Brace Expansion)5.078 F F0(abo)5.078 E -.15(ve)-.15 G 5.079(\). This).15 F 2.579(is on by)5.079 F(def)184 522 Q (ault.)-.1 E F1144 534 Q F0 .214(If set,)27.08 F F1(bash)2.714 E F0 .214(does not o)2.714 F -.15(ve)-.15 G .214(rwrite an e).15 F .214 (xisting \214le with the)-.15 F F1(>)2.714 E F0(,)A F1(>&)2.714 E F0 2.713(,a)C(nd)-2.713 E F1(<>)2.713 E F0 .213(redirection opera-)2.713 F 3.053(tors. This)184 546 R .553(may be o)3.053 F -.15(ve)-.15 G .553 (rridden when creating output \214les by using the redirection opera-) .15 F(tor)184 558 Q F1(>|)2.5 E F0(instead of)2.5 E F1(>)2.5 E F0(.)A F1 144 570 Q F0(Enable)26.52 E F1(!)3.032 E F0 .532 (style history substitution.)5.532 F .531(This option is on by def)5.532 F .531(ault when the shell is inter)-.1 F(-)-.2 E(acti)184 582 Q -.15 (ve)-.25 G(.).15 E F1144 594 Q F0 1.164 (If set, the shell does not follo)28.19 F 3.664(ws)-.25 G 1.164 (ymbolic links when e)-3.664 F -.15(xe)-.15 G 1.165 (cuting commands such as).15 F F1(cd)3.665 E F0 2.822 (that change the current w)184 606 R 2.822(orking directory)-.1 F 7.822 (.I)-.65 G 5.322(tu)-7.822 G 2.822(ses the ph)-5.322 F 2.821 (ysical directory structure)-.05 F 2.685(instead. By)184 618 R(def)2.685 E(ault,)-.1 E F1(bash)2.686 E F0(follo)2.686 E .186 (ws the logical chain of directories when performing com-)-.25 F (mands which change the current directory)184 630 Q(.)-.65 E F1144 642 Q F0 .401(If no ar)28.6 F .401(guments follo)-.18 F 2.901(wt)-.25 G .401(his option, then the positional parameters are unset.)-2.901 F (Otherwise,)5.4 E(the positional parameters are set to the)184 654 Q F2 (ar)2.5 E(g)-.37 E F0(s, e)A -.15(ve)-.25 G 2.5(ni).15 G 2.5(fs)-2.5 G (ome of them be)-2.5 E(gin with a)-.15 E F12.5 E F0(.)A F1144 666 Q F0 1.944(Signal the end of options, cause all remaining)34.3 F F2 (ar)4.444 E(g)-.37 E F0 4.444(st)C 4.444(ob)-4.444 G 4.445(ea)-4.444 G 1.945(ssigned to the positional)-4.445 F 3.446(parameters. The)184 678 R F13.446 E F0(and)3.446 E F13.446 E F0 .945 (options are turned of)3.446 F 3.445(f. If)-.25 F .945(there are no) 3.445 F F2(ar)3.445 E(g)-.37 E F0 .945(s, the positional)B (parameters remain unchanged.)184 690 Q .425(The options are of)144 706.8 R 2.925(fb)-.25 G 2.925(yd)-2.925 G(ef)-2.925 E .425 (ault unless otherwise noted.)-.1 F .425 (Using + rather than \255 causes these options)5.425 F .178 (to be turned of)144 718.8 R 2.678(f. The)-.25 F .178 (options can also be speci\214ed as ar)2.678 F .178(guments to an in) -.18 F -.2(vo)-.4 G .177(cation of the shell.).2 F(The)5.177 E .066 (current set of options may be found in)144 730.8 R F1<24ad>2.566 E F0 5.066(.T)C .066(he return status is al)-5.066 F -.1(wa)-.1 G .066 (ys true unless an in).1 F -.25(va)-.4 G .067(lid option).25 F (GNU Bash-2.05a)72 768 Q(2001 October 29)130.965 E(12)190.395 E EP %%Page: 13 13 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF -.35(BA)72 48 S(SH_B).35 E(UIL)-.1 E 290.48 (TINS\(1\) B)-.92 F(ASH_B)-.35 E(UIL)-.1 E(TINS\(1\))-.92 E (is encountered.)144 84 Q/F1 10/Times-Bold@0 SF(shift)108 100.8 Q F0([) 2.5 E/F2 10/Times-Italic@0 SF(n)A F0(])A .429 (The positional parameters from)144 112.8 R F2(n)2.929 E F0 .429 (+1 ... are renamed to)B F1 .429($1 ....)2.929 F F0 -.15(Pa)5.428 G .428 (rameters represented by the num-).15 F(bers)144 124.8 Q F1($#)2.642 E F0(do)2.642 E .142(wn to)-.25 F F1($#)2.642 E F0A F2(n)A F0 .142 (+1 are unset.)B F2(n)5.142 E F0 .142(must be a non-ne)2.642 F -.05(ga) -.15 G(ti).05 E .443 -.15(ve n)-.25 H .143(umber less than or equal to) .15 F F1($#)2.643 E F0 5.143(.I)C(f)-5.143 E F2(n)2.643 E F0 .113 (is 0, no parameters are changed.)144 136.8 R(If)5.112 E F2(n)2.612 E F0 .112(is not gi)2.612 F -.15(ve)-.25 G .112(n, it is assumed to be 1.).15 F(If)5.112 E F2(n)2.612 E F0 .112(is greater than)2.612 F F1($#)2.612 E F0 2.612(,t)C(he)-2.612 E .178(positional parameters are not changed.) 144 148.8 R .179(The return status is greater than zero if)5.179 F F2(n) 2.679 E F0 .179(is greater than)2.679 F F1($#)2.679 E F0 (or less than zero; otherwise 0.)144 160.8 Q F1(shopt)108 177.6 Q F0([) 2.5 E F1(\255pqsu)A F0 2.5(][)C F1-2.5 E F0 2.5(][)C F2(optname) -2.5 E F0(...])2.5 E -.8(To)144 189.6 S .222(ggle the v).8 F .222 (alues of v)-.25 F .222(ariables controlling optional shell beha)-.25 F (vior)-.2 E 5.222(.W)-.55 G .222(ith no options, or with the)-5.622 F F1 2.722 E F0 .721(option, a list of all settable options is display\ ed, with an indication of whether or not each is set.)144 201.6 R(The) 144 213.6 Q F12.828 E F0 .327(option causes output to be displaye\ d in a form that may be reused as input.)2.828 F .327(Other options) 5.327 F(ha)144 225.6 Q .3 -.15(ve t)-.2 H(he follo).15 E(wing meanings:) -.25 E F1144 237.6 Q F0(Enable \(set\) each)26.41 E F2(optname)2.5 E F0(.)A F1144 249.6 Q F0(Disable \(unset\) each)24.74 E F2 (optname)2.5 E F0(.)A F1144 261.6 Q F0 .003(Suppresses normal out\ put \(quiet mode\); the return status indicates whether the)24.74 F F2 (optname)2.504 E F0(is)2.504 E .256(set or unset.)180 273.6 R .256 (If multiple)5.256 F F2(optname)2.756 E F0(ar)2.756 E .256 (guments are gi)-.18 F -.15(ve)-.25 G 2.756(nw).15 G(ith)-2.756 E F1 2.756 E F0 2.755(,t)C .255(he return status is zero if)-2.755 F (all)180 285.6 Q F2(optnames)2.5 E F0(are enabled; non-zero otherwise.) 2.5 E F1144 297.6 Q F0(Restricts the v)25.3 E(alues of)-.25 E F2 (optname)2.5 E F0(to be those de\214ned for the)2.5 E F12.5 E F0 (option to the)2.5 E F1(set)2.5 E F0 -.2(bu)2.5 G(iltin.).2 E .127 (If either)144 314.4 R F12.627 E F0(or)2.627 E F12.627 E F0 .127(is used with no)2.627 F F2(optname)2.627 E F0(ar)2.627 E .127 (guments, the display is limited to those options which)-.18 F 1.024 (are set or unset, respecti)144 326.4 R -.15(ve)-.25 G(ly).15 E 6.024 (.U)-.65 G 1.024(nless otherwise noted, the)-6.024 F F1(shopt)3.523 E F0 1.023(options are disabled \(unset\) by)3.523 F(def)144 338.4 Q(ault.) -.1 E 1.544(The return status when listing options is zero if all)144 355.2 R F2(optnames)4.044 E F0 1.545(are enabled, non-zero otherwise.) 4.045 F .696 (When setting or unsetting options, the return status is zero unless an) 144 367.2 R F2(optname)3.196 E F0 .696(is not a v)3.196 F .695 (alid shell)-.25 F(option.)144 379.2 Q(The list of)144 396 Q F1(shopt) 2.5 E F0(options is:)2.5 E F1(cdable_v)144 414 Q(ars)-.1 E F0 .155 (If set, an ar)184 426 R .155(gument to the)-.18 F F1(cd)2.655 E F0 -.2 (bu)2.655 G .156 (iltin command that is not a directory is assumed to be the).2 F (name of a v)184 438 Q(ariable whose v)-.25 E (alue is the directory to change to.)-.25 E F1(cdspell)144 450 Q F0 1.055 (If set, minor errors in the spelling of a directory component in a) 10.55 F F1(cd)3.555 E F0 1.055(command will be)3.555 F 3.987 (corrected. The)184 462 R 1.487(errors check)3.987 F 1.487 (ed for are transposed characters, a missing character)-.1 F 3.988(,a) -.4 G(nd)-3.988 E .552(one character too man)184 474 R 4.352 -.65(y. I) -.15 H 3.052(fac).65 G .552 (orrection is found, the corrected \214le name is printed, and)-3.052 F (the command proceeds.)184 486 Q(This option is only used by interacti)5 E .3 -.15(ve s)-.25 H(hells.).15 E F1(checkhash)144 498 Q F0 2.079 (If set,)184 510 R F1(bash)4.579 E F0 2.079 (checks that a command found in the hash table e)4.579 F 2.08 (xists before trying to)-.15 F -.15(exe)184 522 S(cute it.).15 E (If a hashed command no longer e)5 E (xists, a normal path search is performed.)-.15 E F1(checkwinsize)144 534 Q F0 .797(If set,)184 546 R F1(bash)3.297 E F0 .797 (checks the windo)3.297 F 3.297(ws)-.25 G .796 (ize after each command and, if necessary)-3.297 F 3.296(,u)-.65 G .796 (pdates the)-3.296 F -.25(va)184 558 S(lues of).25 E/F3 9/Times-Bold@0 SF(LINES)2.5 E F0(and)2.25 E F3(COLUMNS)2.5 E/F4 9/Times-Roman@0 SF(.)A F1(cmdhist)144 570 Q F0 1.202(If set,)6.11 F F1(bash)3.702 E F0 1.202 (attempts to sa)3.702 F 1.502 -.15(ve a)-.2 H 1.202 (ll lines of a multiple-line command in the same history).15 F(entry)184 582 Q 5(.T)-.65 G(his allo)-5 E (ws easy re-editing of multi-line commands.)-.25 E F1(dotglob)144 594 Q F0 .165(If set,)7.77 F F1(bash)2.665 E F0 .165(includes \214lenames be) 2.665 F .165(ginning with a `.)-.15 F 2.665('i)-.7 G 2.665(nt)-2.665 G .165(he results of pathname e)-2.665 F(xpansion.)-.15 E F1(execfail)144 606 Q F0 1.386(If set, a non-interacti)7.79 F 1.686 -.15(ve s)-.25 H 1.386(hell will not e).15 F 1.386(xit if it cannot e)-.15 F -.15(xe)-.15 G 1.387(cute the \214le speci\214ed as an).15 F(ar)184 618 Q (gument to the)-.18 E F1(exec)2.5 E F0 -.2(bu)2.5 G(iltin command.).2 E (An interacti)5 E .3 -.15(ve s)-.25 H(hell does not e).15 E(xit if)-.15 E F1(exec)2.5 E F0 -.1(fa)2.5 G(ils.).1 E F1(expand_aliases)144 630 Q F0 .717(If set, aliases are e)184 642 R .717(xpanded as described abo)-.15 F 1.017 -.15(ve u)-.15 H(nder).15 E F3(ALIASES)3.217 E F4(.)A F0 .716 (This option is enabled)5.217 F(by def)184 654 Q(ault for interacti)-.1 E .3 -.15(ve s)-.25 H(hells.).15 E F1(extglob)144 666 Q F0 .4 (If set, the e)8.89 F .4 (xtended pattern matching features described abo)-.15 F .7 -.15(ve u) -.15 H(nder).15 E F1 -.1(Pa)2.9 G .4(thname Expan-).1 F(sion)184 678 Q F0(are enabled.)2.5 E F1(histappend)144 690 Q F0 .384 (If set, the history list is appended to the \214le named by the v)184 702 R .383(alue of the)-.25 F F1(HISTFILE)2.883 E F0 -.25(va)2.883 G (ri-).25 E(able when the shell e)184 714 Q(xits, rather than o)-.15 E -.15(ve)-.15 G(rwriting the \214le.).15 E(GNU Bash-2.05a)72 768 Q (2001 October 29)130.965 E(13)190.395 E EP %%Page: 14 14 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF -.35(BA)72 48 S(SH_B).35 E(UIL)-.1 E 290.48 (TINS\(1\) B)-.92 F(ASH_B)-.35 E(UIL)-.1 E(TINS\(1\))-.92 E/F1 10 /Times-Bold@0 SF(histr)144 84 Q(eedit)-.18 E F0 .575(If set, and)184 96 R F1 -.18(re)3.075 G(adline).18 E F0 .575(is being used, a user is gi) 3.075 F -.15(ve)-.25 G 3.075(nt).15 G .576 (he opportunity to re-edit a f)-3.075 F .576(ailed his-)-.1 F (tory substitution.)184 108 Q F1(histv)144 120 Q(erify)-.1 E F0 .403 (If set, and)184 132 R F1 -.18(re)2.903 G(adline).18 E F0 .403 (is being used, the results of history substitution are not immediately) 2.903 F .661(passed to the shell parser)184 144 R 5.661(.I)-.55 G .662 (nstead, the resulting line is loaded into the)-5.661 F F1 -.18(re)3.162 G(adline).18 E F0(editing)3.162 E -.2(bu)184 156 S -.25(ff).2 G(er).25 E 2.5(,a)-.4 G(llo)-2.5 E(wing further modi\214cation.)-.25 E F1 (hostcomplete)144 168 Q F0 1.182(If set, and)184 180 R F1 -.18(re)3.682 G(adline).18 E F0 1.182(is being used,)3.682 F F1(bash)3.682 E F0 1.181 (will attempt to perform hostname completion)3.681 F 1.38(when a w)184 192 R 1.38(ord containing a)-.1 F F1(@)3.881 E F0 1.381 (is being completed \(see)3.881 F F1(Completing)3.881 E F0(under)3.881 E /F2 9/Times-Bold@0 SF(READLINE)3.881 E F0(abo)184 204 Q -.15(ve)-.15 G 2.5(\). This).15 F(is enabled by def)2.5 E(ault.)-.1 E F1(huponexit)144 216 Q F0(If set,)184 228 Q F1(bash)2.5 E F0(will send)2.5 E F2(SIGHUP) 2.5 E F0(to all jobs when an interacti)2.25 E .3 -.15(ve l)-.25 H (ogin shell e).15 E(xits.)-.15 E F1(interacti)144 240 Q -.1(ve)-.1 G (_comments).1 E F0 .33(If set, allo)184 252 R 2.83(waw)-.25 G .33 (ord be)-2.93 F .33(ginning with)-.15 F F1(#)2.83 E F0 .33 (to cause that w)2.83 F .33(ord and all remaining characters on)-.1 F .967(that line to be ignored in an interacti)184 264 R 1.267 -.15(ve s) -.25 H .967(hell \(see).15 F F2(COMMENTS)3.467 E F0(abo)3.217 E -.15(ve) -.15 G 3.467(\). This).15 F .968(option is)3.468 F(enabled by def)184 276 Q(ault.)-.1 E F1(lithist)144 288 Q F0 .655(If set, and the)15.55 F F1(cmdhist)3.155 E F0 .654 (option is enabled, multi-line commands are sa)3.154 F -.15(ve)-.2 G 3.154(dt).15 G 3.154(ot)-3.154 G .654(he history)-3.154 F (with embedded ne)184 300 Q (wlines rather than using semicolon separators where possible.)-.25 E F1 (login_shell)144 312 Q F0 .486 (The shell sets this option if it is started as a login shell \(see)184 324 R F2(INV)2.987 E(OCA)-.405 E(TION)-.855 E F0(abo)2.737 E -.15(ve) -.15 G 2.987(\). The).15 F -.25(va)184 336 S(lue may not be changed.).25 E F1(mailwar)144 348 Q(n)-.15 E F0 .815(If set, and a \214le that)184 360 R F1(bash)3.315 E F0 .814 (is checking for mail has been accessed since the last time it)3.315 F -.1(wa)184 372 S 2.5(sc).1 G(heck)-2.5 E(ed, the message `)-.1 E (`The mail in)-.74 E/F3 10/Times-Italic@0 SF(mail\214le)2.5 E F0 (has been read')2.5 E 2.5('i)-.74 G 2.5(sd)-2.5 G(isplayed.)-2.5 E F1 (no_empty_cmd_completion)144 384 Q F0 .145(If set, and)184 396 R F1 -.18 (re)2.645 G(adline).18 E F0 .145(is being used,)2.645 F F1(bash)2.646 E F0 .146(will not attempt to search the)2.646 F F1 -.74(PA)2.646 G(TH) -.21 E F0 .146(for possible)2.646 F (completions when completion is attempted on an empty line.)184 408 Q F1 (nocaseglob)144 420 Q F0 .437(If set,)184 432 R F1(bash)2.937 E F0 .436 (matches \214lenames in a case\255insensiti)2.937 F .736 -.15(ve f)-.25 H .436(ashion when performing pathname).05 F -.15(ex)184 444 S (pansion \(see).15 E F1 -.1(Pa)2.5 G(thname Expansion).1 E F0(abo)2.5 E -.15(ve)-.15 G(\).).15 E F1(nullglob)144 456 Q F0 .854(If set,)184 468 R F1(bash)3.354 E F0(allo)3.354 E .855 (ws patterns which match no \214les \(see)-.25 F F1 -.1(Pa)3.355 G .855 (thname Expansion).1 F F0(abo)3.355 E -.15(ve)-.15 G 3.355(\)t).15 G(o) -3.355 E -.15(ex)184 480 S(pand to a null string, rather than themselv) .15 E(es.)-.15 E F1(pr)144 492 Q(ogcomp)-.18 E F0 .677 (If set, the programmable completion f)184 504 R .677(acilities \(see) -.1 F F1(Pr)3.176 E .676(ogrammable Completion)-.18 F F0(abo)3.176 E -.15(ve)-.15 G(\)).15 E(are enabled.)184 516 Q (This option is enabled by def)5 E(ault.)-.1 E F1(pr)144 528 Q(omptv) -.18 E(ars)-.1 E F0 .313(If set, prompt strings under)184 540 R .313 (go v)-.18 F .313(ariable and parameter e)-.25 F .314 (xpansion after being e)-.15 F .314(xpanded as)-.15 F(described in)184 552 Q F2(PR)2.5 E(OMPTING)-.27 E F0(abo)2.25 E -.15(ve)-.15 G 5(.T).15 G (his option is enabled by def)-5 E(ault.)-.1 E F1 -.18(re)144 564 S (stricted_shell).18 E F0 1.069 (The shell sets this option if it is started in restricted mode \(see) 184 576 R F2 1.069(RESTRICTED SHELL)3.569 F F0(belo)184 588 Q 4.178 (w\). The)-.25 F -.25(va)4.178 G 1.678(lue may not be changed.).25 F 1.678(This is not reset when the startup \214les are)6.678 F -.15(exe) 184 600 S(cuted, allo).15 E(wing the startup \214les to disco)-.25 E -.15(ve)-.15 G 2.5(rw).15 G(hether or not a shell is restricted.)-2.5 E F1(shift_v)144 612 Q(erbose)-.1 E F0 .502(If set, the)184 624 R F1 (shift)3.002 E F0 -.2(bu)3.002 G .501 (iltin prints an error message when the shift count e).2 F .501 (xceeds the number)-.15 F(of positional parameters.)184 636 Q F1(sour) 144 648 Q(cepath)-.18 E F0 .77(If set, the)184 660 R F1(sour)3.27 E(ce) -.18 E F0(\()3.27 E F1(.)A F0 3.27(\)b)C .77(uiltin uses the v)-3.47 F .771(alue of)-.25 F F2 -.666(PA)3.271 G(TH)-.189 E F0 .771 (to \214nd the directory containing the)3.021 F (\214le supplied as an ar)184 672 Q 2.5(gument. This)-.18 F (option is enabled by def)2.5 E(ault.)-.1 E F1(xpg_echo)144 684 Q F0 (If set, the)184 696 Q F1(echo)2.5 E F0 -.2(bu)2.5 G(iltin e).2 E (xpands backslash-escape sequences by def)-.15 E(ault.)-.1 E (GNU Bash-2.05a)72 768 Q(2001 October 29)130.965 E(14)190.395 E EP %%Page: 15 15 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF -.35(BA)72 48 S(SH_B).35 E(UIL)-.1 E 290.48 (TINS\(1\) B)-.92 F(ASH_B)-.35 E(UIL)-.1 E(TINS\(1\))-.92 E/F1 10 /Times-Bold@0 SF(suspend)108 84 Q F0([)2.5 E F1A F0(])A .493 (Suspend the e)144 96 R -.15(xe)-.15 G .493 (cution of this shell until it recei).15 F -.15(ve)-.25 G 2.992(sa).15 G /F2 9/Times-Bold@0 SF(SIGCONT)A F0 2.992(signal. The)2.742 F F1 2.992 E F0 .492(option says not to)2.992 F .758 (complain if this is a login shell; just suspend an)144 108 R(yw)-.15 E (ay)-.1 E 5.758(.T)-.65 G .759 (he return status is 0 unless the shell is a)-5.758 F(login shell and) 144 120 Q F12.5 E F0 (is not supplied, or if job control is not enabled.)2.5 E F1(test)108 132 Q/F3 10/Times-Italic@0 SF -.2(ex)2.5 G(pr).2 E F1([)108 144 Q F3 -.2 (ex)2.5 G(pr).2 E F1(])2.5 E F0 1.15 (Return a status of 0 or 1 depending on the e)6.77 F -.25(va)-.25 G 1.15 (luation of the conditional e).25 F(xpression)-.15 E F3 -.2(ex)3.65 G (pr).2 E F0 6.15(.E).73 G(ach)-6.15 E 1.187 (operator and operand must be a separate ar)144 156 R 3.688 (gument. Expressions)-.18 F 1.188(are composed of the primaries)3.688 F (described abo)144 168 Q .3 -.15(ve u)-.15 H(nder).15 E F2(CONDITION)2.5 E(AL EXPRESSIONS)-.18 E/F4 9/Times-Roman@0 SF(.)A F0 .786 (Expressions may be combined using the follo)144 186 R .785 (wing operators, listed in decreasing order of prece-)-.25 F(dence.)144 198 Q F1(!)144 210 Q F3 -.2(ex)2.5 G(pr).2 E F0 -.35(Tr)12.6 G(ue if).35 E F3 -.2(ex)2.5 G(pr).2 E F0(is f)2.5 E(alse.)-.1 E F1(\()144 222 Q F3 -.2(ex)2.5 G(pr).2 E F1(\))2.5 E F0 .26(Returns the v)6.77 F .26 (alue of)-.25 F F3 -.2(ex)2.76 G(pr).2 E F0 5.26(.T)C .26 (his may be used to o)-5.26 F -.15(ve)-.15 G .26 (rride the normal precedence of opera-).15 F(tors.)180 234 Q F3 -.2(ex) 144 246 S(pr1).2 E F02.5 E F1(a)A F3 -.2(ex)2.5 G(pr2).2 E F0 -.35 (Tr)180 258 S(ue if both).35 E F3 -.2(ex)2.5 G(pr1).2 E F0(and)2.5 E F3 -.2(ex)2.5 G(pr2).2 E F0(are true.)2.5 E F3 -.2(ex)144 270 S(pr1).2 E F0 2.5 E F1(o)A F3 -.2(ex)2.5 G(pr2).2 E F0 -.35(Tr)180 282 S (ue if either).35 E F3 -.2(ex)2.5 G(pr1).2 E F0(or)2.5 E F3 -.2(ex)2.5 G (pr2).2 E F0(is true.)2.5 E F1(test)144 298.8 Q F0(and)2.5 E F1([)2.5 E F0 -.25(eva)2.5 G(luate conditional e).25 E (xpressions using a set of rules based on the number of ar)-.15 E (guments.)-.18 E 2.5(0a)144 316.8 S -.18(rg)-2.5 G(uments).18 E(The e) 180 328.8 Q(xpression is f)-.15 E(alse.)-.1 E 2.5(1a)144 340.8 S -.18 (rg)-2.5 G(ument).18 E(The e)180 352.8 Q (xpression is true if and only if the ar)-.15 E(gument is not null.)-.18 E 2.5(2a)144 364.8 S -.18(rg)-2.5 G(uments).18 E .37(If the \214rst ar) 180 376.8 R .37(gument is)-.18 F F1(!)2.87 E F0 2.87(,t)C .37(he e)-2.87 F .37(xpression is true if and only if the second ar)-.15 F .37 (gument is null.)-.18 F .379(If the \214rst ar)180 388.8 R .38 (gument is one of the unary conditional operators listed abo)-.18 F .68 -.15(ve u)-.15 H(nder).15 E F2(CONDI-)2.88 E(TION)180 400.8 Q .553 (AL EXPRESSIONS)-.18 F F4(,)A F0 .552(the e)2.802 F .552 (xpression is true if the unary test is true.)-.15 F .552 (If the \214rst ar)5.552 F(gu-)-.18 E(ment is not a v)180 412.8 Q (alid unary conditional operator)-.25 E 2.5(,t)-.4 G(he e)-2.5 E (xpression is f)-.15 E(alse.)-.1 E 2.5(3a)144 424.8 S -.18(rg)-2.5 G (uments).18 E .023(If the second ar)180 436.8 R .023 (gument is one of the binary conditional operators listed abo)-.18 F .324 -.15(ve u)-.15 H(nder).15 E F2(CON-)2.524 E(DITION)180 448.8 Q 1.478(AL EXPRESSIONS)-.18 F F4(,)A F0 1.477(the result of the e)3.727 F 1.477(xpression is the result of the binary test)-.15 F .397 (using the \214rst and third ar)180 460.8 R .397(guments as operands.) -.18 F .398(If the \214rst ar)5.398 F .398(gument is)-.18 F F1(!)2.898 E F0 2.898(,t)C .398(he v)-2.898 F .398(alue is the)-.25 F(ne)180 472.8 Q -.05(ga)-.15 G .263(tion of the tw).05 F(o-ar)-.1 E .262 (gument test using the second and third ar)-.18 F 2.762(guments. If)-.18 F .262(the \214rst ar)2.762 F(gu-)-.18 E .205(ment is e)180 484.8 R (xactly)-.15 E F1(\()2.705 E F0 .205(and the third ar)2.705 F .205 (gument is e)-.18 F(xactly)-.15 E F1(\))2.705 E F0 2.705(,t)C .206 (he result is the one-ar)-2.705 F .206(gument test of)-.18 F 1.171 (the second ar)180 496.8 R 3.671(gument. Otherwise,)-.18 F 1.171(the e) 3.671 F 1.171(xpression is f)-.15 F 3.671(alse. The)-.1 F F13.671 E F0(and)3.671 E F13.67 E F0 1.17(operators are)3.67 F (considered binary operators in this case.)180 508.8 Q 2.5(4a)144 520.8 S -.18(rg)-2.5 G(uments).18 E .384(If the \214rst ar)180 532.8 R .384 (gument is)-.18 F F1(!)2.884 E F0 2.885(,t)C .385(he result is the ne) -2.885 F -.05(ga)-.15 G .385(tion of the three-ar).05 F .385(gument e) -.18 F .385(xpression com-)-.15 F 1.648(posed of the remaining ar)180 544.8 R 4.147(guments. Otherwise,)-.18 F 1.647(the e)4.147 F 1.647 (xpression is parsed and e)-.15 F -.25(va)-.25 G(luated).25 E (according to precedence using the rules listed abo)180 556.8 Q -.15(ve) -.15 G(.).15 E 2.5(5o)144 568.8 S 2.5(rm)-2.5 G(ore ar)-2.5 E(guments) -.18 E 1.635(The e)180 580.8 R 1.635(xpression is parsed and e)-.15 F -.25(va)-.25 G 1.635 (luated according to precedence using the rules listed).25 F(abo)180 592.8 Q -.15(ve)-.15 G(.).15 E F1(times)108 609.6 Q F0 1.229(Print the \ accumulated user and system times for the shell and for processes run f\ rom the shell.)13.23 F(The return status is 0.)144 621.6 Q F1(trap)108 638.4 Q F0([)2.5 E F1(\255lp)A F0 2.5(][)C F3(ar)-2.5 E(g)-.37 E F0 2.5 (][)C F3(sigspec)-2.5 E F0(...])2.5 E .767(The command)144 650.4 R F3 (ar)3.267 E(g)-.37 E F0 .767(is to be read and e)3.267 F -.15(xe)-.15 G .767(cuted when the shell recei).15 F -.15(ve)-.25 G 3.267(ss).15 G (ignal\(s\))-3.267 E F3(sigspec)3.267 E F0 5.767(.I).31 G(f)-5.767 E F3 (ar)3.267 E(g)-.37 E F0(is)3.268 E 2.164(absent or)144 662.4 R F1 4.664 E F0 4.664(,a)C 2.164 (ll speci\214ed signals are reset to their original v)-4.664 F 2.164 (alues \(the v)-.25 F 2.163(alues the)-.25 F 4.663(yh)-.15 G 2.163 (ad upon)-4.663 F .06(entrance to the shell\).)144 674.4 R(If)5.06 E F3 (ar)2.56 E(g)-.37 E F0 .06 (is the null string the signal speci\214ed by each)2.56 F F3(sigspec) 2.56 E F0 .06(is ignored by the)2.56 F .045 (shell and by the commands it in)144 686.4 R -.2(vo)-.4 G -.1(ke).2 G 2.545(s. If).1 F F3(ar)2.545 E(g)-.37 E F0 .045(is not present and)2.545 F F12.545 E F0 .044(has been supplied, then the trap)2.545 F .351 (commands associated with each)144 698.4 R F3(sigspec)2.851 E F0 .351 (are displayed.)2.851 F .351(If no ar)5.351 F .352 (guments are supplied or if only)-.18 F F12.852 E F0 1.207(is gi) 144 710.4 R -.15(ve)-.25 G(n,).15 E F1(trap)3.707 E F0 1.207 (prints the list of commands associated with each signal number)3.707 F 6.206(.E)-.55 G(ach)-6.206 E F3(sigspec)3.706 E F0(is)3.706 E 1.958 (either a signal name de\214ned in <)144 722.4 R F3(signal.h)A F0 1.958 (>, or a signal number)B 6.958(.I)-.55 G 4.458(fa)-6.958 G F3(sigspec)A F0(is)4.458 E F2(EXIT)4.458 E F0 1.958(\(0\) the)4.208 F(GNU Bash-2.05a) 72 768 Q(2001 October 29)130.965 E(15)190.395 E EP %%Page: 16 16 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF -.35(BA)72 48 S(SH_B).35 E(UIL)-.1 E 290.48 (TINS\(1\) B)-.92 F(ASH_B)-.35 E(UIL)-.1 E(TINS\(1\))-.92 E(command)144 84 Q/F1 10/Times-Italic@0 SF(ar)3.986 E(g)-.37 E F0 1.486(is e)3.986 F -.15(xe)-.15 G 1.486(cuted on e).15 F 1.486(xit from the shell.)-.15 F 1.486(If a)6.486 F F1(sigspec)3.986 E F0(is)3.985 E/F2 9/Times-Bold@0 SF (DEB)3.985 E(UG)-.09 E/F3 9/Times-Roman@0 SF(,)A F0 1.485(the command) 3.735 F F1(ar)3.985 E(g)-.37 E F0(is)3.985 E -.15(exe)144 96 S .907 (cuted after e).15 F -.15(ve)-.25 G(ry).15 E F1 .907(simple command) 3.407 F F0(\(see)3.407 E F2 .907(SHELL GRAMMAR)3.407 F F0(abo)3.157 E -.15(ve)-.15 G 3.407(\). If).15 F(a)3.407 E F1(sigspec)3.407 E F0(is) 3.407 E F2(ERR)3.408 E F3(,)A F0(the)3.158 E(command)144 108 Q F1(ar) 2.935 E(g)-.37 E F0 .434(is e)2.934 F -.15(xe)-.15 G .434(cuted whene) .15 F -.15(ve)-.25 G 2.934(ras).15 G .434 (imple command has a non\255zero e)-2.934 F .434(xit status.)-.15 F(The) 5.434 E F2(ERR)2.934 E F0(trap)2.684 E .35(is not e)144 120 R -.15(xe) -.15 G .35(cuted if the f).15 F .35(ailed command is part of an)-.1 F F1 (until)2.85 E F0(or)2.85 E F1(while)2.85 E F0 .35(loop, part of an)2.85 F F1(if)2.85 E F0 .35(statement, part)2.85 F .411(of a)144 132 R/F4 10 /Times-Bold@0 SF(&&)2.911 E F0(or)2.911 E/F5 10/Symbol SF2.911 E F0 .411(list, or if the command')2.911 F 2.911(sr)-.55 G .411(eturn v) -2.911 F .411(alue is being in)-.25 F -.15(ve)-.4 G .411(rted via).15 F F4(!)2.911 E F0 5.411(.T)C(he)-5.411 E F42.911 E F0 .411 (option causes)2.911 F 1.124(the shell to print a list of signal names \ and their corresponding numbers.)144 144 R 1.124(Signals ignored upon) 6.124 F .371(entry to the shell cannot be trapped or reset.)144 156 R -.35(Tr)5.371 G .371(apped signals are reset to their original v).35 F .371(alues in a)-.25 F .262(child process when it is created.)144 168 R .262(The return status is f)5.262 F .262(alse if an)-.1 F(y)-.15 E F1 (sigspec)2.763 E F0 .263(is in)2.763 F -.25(va)-.4 G .263 (lid; otherwise).25 F F4(trap)2.763 E F0(returns true.)144 180 Q F4 (type)108 196.8 Q F0([)2.5 E F4(\255atp)A F0(])A F1(name)2.5 E F0([)2.5 E F1(name)A F0(...])2.5 E -.4(Wi)144 208.8 S .206 (th no options, indicate ho).4 F 2.706(we)-.25 G(ach)-2.706 E F1(name) 2.705 E F0 -.1(wo)2.705 G .205 (uld be interpreted if used as a command name.).1 F .205(If the)5.205 F F4144 220.8 Q F0 .958(option is used,)3.458 F F4(type)3.459 E F0 .959(prints a string which is one of)3.459 F F1(alias)3.459 E F0(,).27 E F1 -.1(ke)3.459 G(ywor)-.2 E(d)-.37 E F0(,).77 E F1(function)3.459 E F0 (,).24 E F1 -.2(bu)3.459 G(iltin).2 E F0 3.459(,o).24 G(r)-3.459 E F1 (\214le)3.459 E F0(if)3.459 E F1(name)144 232.8 Q F0 .15 (is an alias, shell reserv)2.65 F .15(ed w)-.15 F .15(ord, function, b) -.1 F .15(uiltin, or disk \214le, respecti)-.2 F -.15(ve)-.25 G(ly).15 E 5.15(.I)-.65 G 2.65(ft)-5.15 G(he)-2.65 E F1(name)2.65 E F0 .15(is not) 2.65 F .118(found, then nothing is printed, and an e)144 244.8 R .118 (xit status of f)-.15 F .118(alse is returned.)-.1 F .119(If the)5.119 F F42.619 E F0 .119(option is used,)2.619 F F4(type)2.619 E F0 .885 (either returns the name of the disk \214le that w)144 256.8 R .885 (ould be e)-.1 F -.15(xe)-.15 G .885(cuted if).15 F F1(name)3.385 E F0 .885(were speci\214ed as a com-)3.385 F 1.024(mand name, or nothing if) 144 268.8 R/F6 10/Courier@0 SF 1.025(type -t name)3.524 F F0 -.1(wo) 3.525 G 1.025(uld not return).1 F F1(\214le)3.525 E F0 6.025(.I).18 G 3.525(fac)-6.025 G 1.025(ommand is hashed,)-3.525 F F43.525 E F0 .159(prints the hashed v)144 280.8 R .159 (alue, not necessarily the \214le that appears \214rst in)-.25 F F2 -.666(PA)2.659 G(TH)-.189 E F3(.)A F0 .159(If the)4.659 F F42.659 E F0 .158(option is used,)2.658 F F4(type)144 292.8 Q F0 1.32 (prints all of the places that contain an e)3.82 F -.15(xe)-.15 G 1.32 (cutable named).15 F F1(name)3.82 E F0 6.32(.T).18 G 1.32 (his includes aliases and)-6.32 F .251(functions, if and only if the)144 304.8 R F42.751 E F0 .251(option is not also used.)2.751 F .251 (The table of hashed commands is not con-)5.251 F .199 (sulted when using)144 316.8 R F42.699 E F0(.)A F4(type)5.199 E F0 .199(returns true if an)2.699 F 2.699(yo)-.15 G 2.699(ft)-2.699 G .2 (he ar)-2.699 F .2(guments are found, f)-.18 F .2 (alse if none are found.)-.1 F F4(ulimit)108 333.6 Q F0([)2.5 E F4 (\255SHacd\215mnpstuv)A F0([)2.5 E F1(limit)A F0(]])A(Pro)144 345.6 Q .244(vides control o)-.15 F -.15(ve)-.15 G 2.744(rt).15 G .244 (he resources a)-2.744 F -.25(va)-.2 G .244 (ilable to the shell and to processes started by it, on systems).25 F .943(that allo)144 357.6 R 3.443(ws)-.25 G .943(uch control.)-3.443 F (The)5.943 E F43.443 E F0(and)3.443 E F43.444 E F0 .944 (options specify that the hard or soft limit is set for the)3.444 F(gi) 144 369.6 Q -.15(ve)-.25 G 2.738(nr).15 G 2.738(esource. A)-2.738 F .238 (hard limit cannot be increased once it is set; a soft limit may be inc\ reased up to)2.738 F .355(the v)144 381.6 R .355 (alue of the hard limit.)-.25 F .355(If neither)5.355 F F42.855 E F0(nor)2.855 E F42.855 E F0 .356 (is speci\214ed, both the soft and hard limits are set.)2.856 F .441 (The v)144 393.6 R .441(alue of)-.25 F F1(limit)2.941 E F0 .44(can be a\ number in the unit speci\214ed for the resource or one of the special \ v)2.941 F(al-)-.25 E(ues)144 405.6 Q F4(hard)3.018 E F0(,)A F4(soft) 3.018 E F0 3.018(,o)C(r)-3.018 E F4(unlimited)3.018 E F0 3.018(,w)C .518 (hich stand for the current hard limit, the current soft limit, and no) -3.018 F .399(limit, respecti)144 417.6 R -.15(ve)-.25 G(ly).15 E 5.399 (.I)-.65 G(f)-5.399 E F1(limit)2.899 E F0 .399 (is omitted, the current v)2.899 F .399 (alue of the soft limit of the resource is printed,)-.25 F .37 (unless the)144 429.6 R F42.87 E F0 .37(option is gi)2.87 F -.15 (ve)-.25 G 2.87(n. When).15 F .37 (more than one resource is speci\214ed, the limit name and unit)2.87 F (are printed before the v)144 441.6 Q 2.5(alue. Other)-.25 F (options are interpreted as follo)2.5 E(ws:)-.25 E F4144 453.6 Q F0(All current limits are reported)25.3 E F4144 465.6 Q F0 (The maximum size of core \214les created)25.86 E F4144 477.6 Q F0 (The maximum size of a process')24.74 E 2.5(sd)-.55 G(ata se)-2.5 E (gment)-.15 E F4144 489.6 Q F0 (The maximum size of \214les created by the shell)26.97 E F4144 501.6 Q F0(The maximum size that may be lock)27.52 E(ed into memory)-.1 E F4144 513.6 Q F0(The maximum resident set size)21.97 E F4 144 525.6 Q F0 .791(The maximum number of open \214le descriptors \(mos\ t systems do not allo)24.74 F 3.29(wt)-.25 G .79(his v)-3.29 F .79 (alue to)-.25 F(be set\))180 537.6 Q F4144 549.6 Q F0 (The pipe size in 512-byte blocks \(this may not be set\))24.74 E F4 144 561.6 Q F0(The maximum stack size)26.41 E F4144 573.6 Q F0(The maximum amount of cpu time in seconds)26.97 E F4144 585.6 Q F0(The maximum number of processes a)24.74 E -.25(va)-.2 G (ilable to a single user).25 E F4144 597.6 Q F0 (The maximum amount of virtual memory a)25.3 E -.25(va)-.2 G (ilable to the shell).25 E(If)144 614.4 Q F1(limit)2.881 E F0 .381 (is gi)2.881 F -.15(ve)-.25 G .381(n, it is the ne).15 F 2.881(wv)-.25 G .382(alue of the speci\214ed resource \(the)-3.131 F F42.882 E F0 .382(option is display only\).)2.882 F .382(If no)5.382 F .176 (option is gi)144 626.4 R -.15(ve)-.25 G .176(n, then).15 F F4 2.676 E F0 .175(is assumed.)2.676 F -1.11(Va)5.175 G .175 (lues are in 1024-byte increments, e)1.11 F .175(xcept for)-.15 F F4 2.675 E F0 2.675(,w)C .175(hich is in)-2.675 F(seconds,)144 638.4 Q F42.697 E F0 2.697(,w)C .197 (hich is in units of 512-byte blocks, and)-2.697 F F42.698 E F0 (and)2.698 E F42.698 E F0 2.698(,w)C .198(hich are unscaled v) -2.698 F 2.698(alues. The)-.25 F .404(return status is 0 unless an in) 144 650.4 R -.25(va)-.4 G .404(lid option or ar).25 F .404 (gument is supplied, or an error occurs while setting)-.18 F 2.5(an)144 662.4 S .5 -.25(ew l)-2.5 H(imit.).25 E F4(umask)108 679.2 Q F0([)2.5 E F4A F0 2.5(][)C F4-2.5 E F0 2.5(][)C F1(mode)-2.5 E F0(])A .229(The user \214le-creation mask is set to)144 691.2 R F1(mode)2.729 E F0 5.229(.I).18 G(f)-5.229 E F1(mode)2.729 E F0(be)2.729 E .23 (gins with a digit, it is interpreted as an octal)-.15 F .066(number; o\ therwise it is interpreted as a symbolic mode mask similar to that acce\ pted by)144 703.2 R F1 -.15(ch)2.566 G(mod).15 E F0(\(1\).).77 E(If)144 715.2 Q F1(mode)2.911 E F0 .411(is omitted, the current v)2.911 F .412 (alue of the mask is printed.)-.25 F(The)5.412 E F42.912 E F0 .412 (option causes the mask to be)2.912 F .547 (printed in symbolic form; the def)144 727.2 R .547 (ault output is an octal number)-.1 F 5.547(.I)-.55 G 3.047(ft)-5.547 G (he)-3.047 E F43.047 E F0 .547(option is supplied, and)3.047 F (GNU Bash-2.05a)72 768 Q(2001 October 29)130.965 E(16)190.395 E EP %%Page: 17 17 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF -.35(BA)72 48 S(SH_B).35 E(UIL)-.1 E 290.48 (TINS\(1\) B)-.92 F(ASH_B)-.35 E(UIL)-.1 E(TINS\(1\))-.92 E/F1 10 /Times-Italic@0 SF(mode)144 84 Q F0 .578 (is omitted, the output is in a form that may be reused as input.)3.078 F .578(The return status is 0 if the)5.578 F(mode w)144 96 Q (as successfully changed or if no)-.1 E F1(mode)2.5 E F0(ar)2.5 E (gument w)-.18 E(as supplied, and f)-.1 E(alse otherwise.)-.1 E/F2 10 /Times-Bold@0 SF(unalias)108 112.8 Q F0<5bad>2.5 E F2(a)A F0 2.5(][)C F1 (name)-2.5 E F0(...])2.5 E(Remo)144 124.8 Q 1.955 -.15(ve e)-.15 H(ach) .15 E F1(name)4.155 E F0 1.655(from the list of de\214ned aliases.)4.155 F(If)6.655 E F24.155 E F0 1.655 (is supplied, all alias de\214nitions are)4.155 F(remo)144 136.8 Q -.15 (ve)-.15 G 2.5(d. The).15 F(return v)2.5 E (alue is true unless a supplied)-.25 E F1(name)2.5 E F0 (is not a de\214ned alias.)2.5 E F2(unset)108 153.6 Q F0<5bad>2.5 E F2 (fv)A F0 2.5(][)C F1(name)-2.5 E F0(...])2.5 E -.15(Fo)144 165.6 S 3.106 (re).15 G(ach)-3.106 E F1(name)3.106 E F0 3.106(,r).18 G(emo)-3.106 E .906 -.15(ve t)-.15 H .606(he corresponding v).15 F .607 (ariable or function.)-.25 F .607(If no options are supplied, or the) 5.607 F F2144 177.6 Q F0 .337(option is gi)2.837 F -.15(ve)-.25 G .337(n, each).15 F F1(name)2.837 E F0 .337(refers to a shell v)2.837 F 2.836(ariable. Read-only)-.25 F -.25(va)2.836 G .336 (riables may not be unset.).25 F(If)5.336 E F2144 189.6 Q F0 .632 (is specifed, each)3.132 F F1(name)3.132 E F0 .633 (refers to a shell function, and the function de\214nition is remo)3.132 F -.15(ve)-.15 G 3.133(d. Each).15 F .903(unset v)144 201.6 R .903 (ariable or function is remo)-.25 F -.15(ve)-.15 G 3.402(df).15 G .902 (rom the en)-3.402 F .902(vironment passed to subsequent commands.)-.4 F (If)5.902 E(an)144 213.6 Q 4.284(yo)-.15 G(f)-4.284 E/F3 9/Times-Bold@0 SF(RANDOM)4.284 E/F4 9/Times-Roman@0 SF(,)A F3(SECONDS)4.035 E F4(,)A F3 (LINENO)4.035 E F4(,)A F3(HISTCMD)4.035 E F4(,)A F3(FUNCN)4.035 E(AME) -.18 E F4(,)A F3(GR)4.035 E(OUPS)-.27 E F4(,)A F0(or)4.035 E F3(DIRST) 4.285 E -.495(AC)-.81 G(K).495 E F0(are)4.035 E .329(unset, the)144 225.6 R 2.829(yl)-.15 G .328(ose their special properties, e)-2.829 F -.15(ve)-.25 G 2.828(ni).15 G 2.828(ft)-2.828 G(he)-2.828 E 2.828(ya) -.15 G .328(re subsequently reset.)-2.828 F .328(The e)5.328 F .328 (xit status is true)-.15 F(unless a)144 237.6 Q F1(name)2.5 E F0 (does not e)2.5 E(xist or is readonly)-.15 E(.)-.65 E F2(wait)108 254.4 Q F0([)2.5 E F1(n)A F0(])A -.8(Wa)144 266.4 S 1.06 (it for the speci\214ed process and return its termination status.).8 F F1(n)6.061 E F0 1.061(may be a process ID or a job)3.561 F .754 (speci\214cation; if a job spec is gi)144 278.4 R -.15(ve)-.25 G .754 (n, all processes in that job').15 F 3.254(sp)-.55 G .754(ipeline are w) -3.254 F .753(aited for)-.1 F 5.753(.I)-.55 G(f)-5.753 E F1(n)3.253 E F0 .753(is not)3.253 F(gi)144 290.4 Q -.15(ve)-.25 G .026 (n, all currently acti).15 F .326 -.15(ve c)-.25 H .026 (hild processes are w).15 F .026(aited for)-.1 F 2.526(,a)-.4 G .027 (nd the return status is zero.)-2.526 F(If)5.027 E F1(n)2.527 E F0 (speci\214es)2.527 E 2.596(an)144 302.4 S(on-e)-2.596 E .096 (xistent process or job, the return status is 127.)-.15 F .095 (Otherwise, the return status is the e)5.095 F .095(xit status)-.15 F (of the last process or job w)144 314.4 Q(aited for)-.1 E(.)-.55 E/F5 10.95/Times-Bold@0 SF(SEE ALSO)72 331.2 Q F0(bash\(1\), sh\(1\))108 343.2 Q(GNU Bash-2.05a)72 768 Q(2001 October 29)130.965 E(17)190.395 E EP %%Trailer end %%EOF doc/rbash.ps100664 436 0 20256 7374257266 11554 0ustar chetwheel%!PS-Adobe-3.0 %%Creator: groff version 1.16.1 %%CreationDate: Tue Nov 13 12:56:06 2001 %%DocumentNeededResources: font Times-Roman %%+ font Times-Bold %%DocumentSuppliedResources: procset grops 1.16 1 %%Pages: 1 %%PageOrder: Ascend %%Orientation: Portrait %%EndComments %%BeginProlog %%BeginResource: procset grops 1.16 1 /setpacking where{ pop currentpacking true setpacking }if /grops 120 dict dup begin /SC 32 def /A/show load def /B{0 SC 3 -1 roll widthshow}bind def /C{0 exch ashow}bind def /D{0 exch 0 SC 5 2 roll awidthshow}bind def /E{0 rmoveto show}bind def /F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def /G{0 rmoveto 0 exch ashow}bind def /H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def /I{0 exch rmoveto show}bind def /J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def /K{0 exch rmoveto 0 exch ashow}bind def /L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def /M{rmoveto show}bind def /N{rmoveto 0 SC 3 -1 roll widthshow}bind def /O{rmoveto 0 exch ashow}bind def /P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def /Q{moveto show}bind def /R{moveto 0 SC 3 -1 roll widthshow}bind def /S{moveto 0 exch ashow}bind def /T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def /SF{ findfont exch [exch dup 0 exch 0 exch neg 0 0]makefont dup setfont [exch/setfont cvx]cvx bind def }bind def /MF{ findfont [5 2 roll 0 3 1 roll neg 0 0]makefont dup setfont [exch/setfont cvx]cvx bind def }bind def /level0 0 def /RES 0 def /PL 0 def /LS 0 def /MANUAL{ statusdict begin/manualfeed true store end }bind def /PLG{ gsave newpath clippath pathbbox grestore exch pop add exch pop }bind def /BP{ /level0 save def 1 setlinecap 1 setlinejoin 72 RES div dup scale LS{ 90 rotate }{ 0 PL translate }ifelse 1 -1 scale }bind def /EP{ level0 restore showpage }bind def /DA{ newpath arcn stroke }bind def /SN{ transform .25 sub exch .25 sub exch round .25 add exch round .25 add exch itransform }bind def /DL{ SN moveto SN lineto stroke }bind def /DC{ newpath 0 360 arc closepath }bind def /TM matrix def /DE{ TM currentmatrix pop translate scale newpath 0 0 .5 0 360 arc closepath TM setmatrix }bind def /RC/rcurveto load def /RL/rlineto load def /ST/stroke load def /MT/moveto load def /CL/closepath load def /FL{ currentgray exch setgray fill setgray }bind def /BL/fill load def /LW/setlinewidth load def /RE{ findfont dup maxlength 1 index/FontName known not{1 add}if dict begin { 1 index/FID ne{def}{pop pop}ifelse }forall /Encoding exch def dup/FontName exch def currentdict end definefont pop }bind def /DEFS 0 def /EBEGIN{ moveto DEFS begin }bind def /EEND/end load def /CNT 0 def /level1 0 def /PBEGIN{ /level1 save def translate div 3 1 roll div exch scale neg exch neg exch translate 0 setgray 0 setlinecap 1 setlinewidth 0 setlinejoin 10 setmiterlimit []0 setdash /setstrokeadjust where{ pop false setstrokeadjust }if /setoverprint where{ pop false setoverprint }if newpath /CNT countdictstack def userdict begin /showpage{}def }bind def /PEND{ clear countdictstack CNT sub{end}repeat level1 restore }bind def end def /setpacking where{ pop setpacking }if %%EndResource %%IncludeResource: font Times-Roman %%IncludeResource: font Times-Bold grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72 def/PL 792 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron/Zcaron /scaron/zcaron/Ydieresis/trademark/quotesingle/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/space/exclam/quotedbl/numbersign/dollar/percent /ampersand/quoteright/parenleft/parenright/asterisk/plus/comma/hyphen /period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon /semicolon/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O /P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright/circumflex /underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y /z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase/guillemotleft /guillemotright/bullet/florin/fraction/perthousand/dagger/daggerdbl /endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut /dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash /quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen /brokenbar/section/dieresis/copyright/ordfeminine/guilsinglleft /logicalnot/minus/registered/macron/degree/plusminus/twosuperior /threesuperior/acute/mu/paragraph/periodcentered/cedilla/onesuperior /ordmasculine/guilsinglright/onequarter/onehalf/threequarters /questiondown/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE /Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex /Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis /multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn /germandbls/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla /egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis /eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide/oslash /ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis]def /Times-Bold@0 ENC0/Times-Bold RE/Times-Roman@0 ENC0/Times-Roman RE %%EndProlog %%Page: 1 1 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF(RB)72 48 Q 376.2(ASH\(1\) RB)-.35 F(ASH\(1\)) -.35 E/F1 10.95/Times-Bold@0 SF -.219(NA)72 84 S(ME).219 E F0 (rbash \255 restricted bash, see)108 96 Q/F2 10/Times-Bold@0 SF(bash)2.5 E F0(\(1\))A F1(RESTRICTED SHELL)72 112.8 Q F0(If)108 124.8 Q F2(bash) 4.397 E F0 1.897(is started with the name)4.397 F F2(rbash)4.397 E F0 4.397(,o)C 4.397(rt)-4.397 G(he)-4.397 E F24.397 E F0 1.896 (option is supplied at in)4.397 F -.2(vo)-.4 G 1.896 (cation, the shell becomes).2 F 3.445(restricted. A)108 136.8 R .945 (restricted shell is used to set up an en)3.445 F .946 (vironment more controlled than the standard shell.)-.4 F(It)5.946 E (beha)108 148.8 Q -.15(ve)-.2 G 2.5(si).15 G(dentically to)-2.5 E F2 (bash)2.5 E F0(with the e)2.5 E(xception that the follo)-.15 E (wing are disallo)-.25 E(wed or not performed:)-.25 E 32.5<8363>108 165.6 S(hanging directories with)-32.5 E F2(cd)2.5 E F0 32.5<8373>108 182.4 S(etting or unsetting the v)-32.5 E(alues of)-.25 E F2(SHELL)2.5 E F0(,)A F2 -.74(PA)2.5 G(TH)-.21 E F0(,)A F2(ENV)2.5 E F0 2.5(,o)C(r)-2.5 E F2 -.3(BA)2.5 G(SH_ENV).3 E F0 32.5<8373>108 199.2 S (pecifying command names containing)-32.5 E F2(/)2.5 E F0 32.5<8373>108 216 S(pecifying a \214le name containing a)-32.5 E F2(/)2.5 E F0 (as an ar)2.5 E(gument to the)-.18 E F2(.)2.5 E F0 -.2(bu)5 G (iltin command).2 E 32.5<8353>108 232.8 S .351 (pecifying a \214lename containing a slash as an ar)-32.5 F .351 (gument to the)-.18 F F22.851 E F0 .351(option to the)2.851 F F2 (hash)2.851 E F0 -.2(bu)2.851 G .351(iltin com-).2 F(mand)144 244.8 Q 32.5<8369>108 261.6 S(mporting function de\214nitions from the shell en) -32.5 E(vironment at startup)-.4 E 32.5<8370>108 278.4 S(arsing the v) -32.5 E(alue of)-.25 E F2(SHELLOPTS)2.5 E F0(from the shell en)2.5 E (vironment at startup)-.4 E 32.5<8372>108 295.2 S(edirecting output usi\ ng the >, >|, <>, >&, &>, and >> redirection operators)-32.5 E 32.5 <8375>108 312 S(sing the)-32.5 E F2(exec)2.5 E F0 -.2(bu)2.5 G (iltin command to replace the shell with another command).2 E 32.5<8361> 108 328.8 S(dding or deleting b)-32.5 E(uiltin commands with the)-.2 E F22.5 E F0(and)2.5 E F22.5 E F0(options to the)2.5 E F2 (enable)2.5 E F0 -.2(bu)2.5 G(iltin command).2 E 32.5<8373>108 345.6 S (pecifying the)-32.5 E F22.5 E F0(option to the)2.5 E F2(command) 2.5 E F0 -.2(bu)2.5 G(iltin command).2 E 32.5<8374>108 362.4 S (urning of)-32.5 E 2.5(fr)-.25 G(estricted mode with)-2.5 E F2(set +r) 2.5 E F0(or)2.5 E F2(set +o r)2.5 E(estricted)-.18 E F0(.)A (These restrictions are enforced after an)108 379.2 Q 2.5(ys)-.15 G (tartup \214les are read.)-2.5 E 1.566 (When a command that is found to be a shell script is e)108 396 R -.15 (xe)-.15 G 1.567(cuted \(see).15 F/F3 9/Times-Bold@0 SF 1.567 (COMMAND EXECUTION)4.067 F F0(abo)3.817 E -.15(ve)-.15 G(\),).15 E F2 (rbash)108 408 Q F0(turns of)2.5 E 2.5(fa)-.25 G .3 -.15(ny r)-2.5 H (estrictions in the shell spa).15 E(wned to e)-.15 E -.15(xe)-.15 G (cute the script.).15 E F1(SEE ALSO)72 424.8 Q F0(bash\(1\))108 436.8 Q 183.805(GNU 1999)72 768 R(No)2.5 E 2.5(v2)-.15 G 202.965(91)-2.5 G EP %%Trailer end %%EOF doc/bashref.ps100664 436 0 2417756 7374257272 12145 0ustar chetwheel%!PS-Adobe-2.0 %%Creator: dvips(k) 5.86 Copyright 1999 Radical Eye Software %%Title: bashref.dvi %%Pages: 138 %%PageOrder: Ascend %%BoundingBox: 0 0 612 792 %%EndComments %DVIPSWebPage: (www.radicaleye.com) %DVIPSCommandLine: dvips -D 300 -t letter -o bashref.ps bashref.dvi %DVIPSParameters: dpi=300, compressed %DVIPSSource: TeX output 2001.11.13:1256 %%BeginProcSet: texc.pro %! /TeXDict 300 dict def TeXDict begin/N{def}def/B{bind def}N/S{exch}N/X{S N}B/A{dup}B/TR{translate}N/isls false N/vsize 11 72 mul N/hsize 8.5 72 mul N/landplus90{false}def/@rigin{isls{[0 landplus90{1 -1}{-1 1}ifelse 0 0 0]concat}if 72 Resolution div 72 VResolution div neg scale isls{ landplus90{VResolution 72 div vsize mul 0 exch}{Resolution -72 div hsize mul 0}ifelse TR}if Resolution VResolution vsize -72 div 1 add mul TR[ matrix currentmatrix{A A round sub abs 0.00001 lt{round}if}forall round exch round exch]setmatrix}N/@landscape{/isls true N}B/@manualfeed{ statusdict/manualfeed true put}B/@copies{/#copies X}B/FMat[1 0 0 -1 0 0] N/FBB[0 0 0 0]N/nn 0 N/IEn 0 N/ctr 0 N/df-tail{/nn 8 dict N nn begin /FontType 3 N/FontMatrix fntrx N/FontBBox FBB N string/base X array /BitMaps X/BuildChar{CharBuilder}N/Encoding IEn N end A{/foo setfont}2 array copy cvx N load 0 nn put/ctr 0 N[}B/sf 0 N/df{/sf 1 N/fntrx FMat N df-tail}B/dfs{div/sf X/fntrx[sf 0 0 sf neg 0 0]N df-tail}B/E{pop nn A definefont setfont}B/Cw{Cd A length 5 sub get}B/Ch{Cd A length 4 sub get }B/Cx{128 Cd A length 3 sub get sub}B/Cy{Cd A length 2 sub get 127 sub} B/Cdx{Cd A length 1 sub get}B/Ci{Cd A type/stringtype ne{ctr get/ctr ctr 1 add N}if}B/id 0 N/rw 0 N/rc 0 N/gp 0 N/cp 0 N/G 0 N/CharBuilder{save 3 1 roll S A/base get 2 index get S/BitMaps get S get/Cd X pop/ctr 0 N Cdx 0 Cx Cy Ch sub Cx Cw add Cy setcachedevice Cw Ch true[1 0 0 -1 -.1 Cx sub Cy .1 sub]/id Ci N/rw Cw 7 add 8 idiv string N/rc 0 N/gp 0 N/cp 0 N{ rc 0 ne{rc 1 sub/rc X rw}{G}ifelse}imagemask restore}B/G{{id gp get/gp gp 1 add N A 18 mod S 18 idiv pl S get exec}loop}B/adv{cp add/cp X}B /chg{rw cp id gp 4 index getinterval putinterval A gp add/gp X adv}B/nd{ /cp 0 N rw exit}B/lsh{rw cp 2 copy get A 0 eq{pop 1}{A 255 eq{pop 254}{ A A add 255 and S 1 and or}ifelse}ifelse put 1 adv}B/rsh{rw cp 2 copy get A 0 eq{pop 128}{A 255 eq{pop 127}{A 2 idiv S 128 and or}ifelse} ifelse put 1 adv}B/clr{rw cp 2 index string putinterval adv}B/set{rw cp fillstr 0 4 index getinterval putinterval adv}B/fillstr 18 string 0 1 17 {2 copy 255 put pop}for N/pl[{adv 1 chg}{adv 1 chg nd}{1 add chg}{1 add chg nd}{adv lsh}{adv lsh nd}{adv rsh}{adv rsh nd}{1 add adv}{/rc X nd}{ 1 add set}{1 add clr}{adv 2 chg}{adv 2 chg nd}{pop nd}]A{bind pop} forall N/D{/cc X A type/stringtype ne{]}if nn/base get cc ctr put nn /BitMaps get S ctr S sf 1 ne{A A length 1 sub A 2 index S get sf div put }if put/ctr ctr 1 add N}B/I{cc 1 add D}B/bop{userdict/bop-hook known{ bop-hook}if/SI save N @rigin 0 0 moveto/V matrix currentmatrix A 1 get A mul exch 0 get A mul add .99 lt{/QV}{/RV}ifelse load def pop pop}N/eop{ SI restore userdict/eop-hook known{eop-hook}if showpage}N/@start{ userdict/start-hook known{start-hook}if pop/VResolution X/Resolution X 1000 div/DVImag X/IEn 256 array N 2 string 0 1 255{IEn S A 360 add 36 4 index cvrs cvn put}for pop 65781.76 div/vsize X 65781.76 div/hsize X}N /p{show}N/RMat[1 0 0 -1 0 0]N/BDot 260 string N/Rx 0 N/Ry 0 N/V{}B/RV/v{ /Ry X/Rx X V}B statusdict begin/product where{pop false[(Display)(NeXT) (LaserWriter 16/600)]{A length product length le{A length product exch 0 exch getinterval eq{pop true exit}if}{pop}ifelse}forall}{false}ifelse end{{gsave TR -.1 .1 TR 1 1 scale Rx Ry false RMat{BDot}imagemask grestore}}{{gsave TR -.1 .1 TR Rx Ry scale 1 1 false RMat{BDot} imagemask grestore}}ifelse B/QV{gsave newpath transform round exch round exch itransform moveto Rx 0 rlineto 0 Ry neg rlineto Rx neg 0 rlineto fill grestore}B/a{moveto}B/delta 0 N/tail{A/delta X 0 rmoveto}B/M{S p delta add tail}B/b{S p tail}B/c{-4 M}B/d{-3 M}B/e{-2 M}B/f{-1 M}B/g{0 M} B/h{1 M}B/i{2 M}B/j{3 M}B/k{4 M}B/w{0 rmoveto}B/l{p -4 w}B/m{p -3 w}B/n{ p -2 w}B/o{p -1 w}B/q{p 1 w}B/r{p 2 w}B/s{p 3 w}B/t{p 4 w}B/x{0 S rmoveto}B/y{3 2 roll p a}B/bos{/SS save N}B/eos{SS restore}B end %%EndProcSet TeXDict begin 40258431 52099146 1000 300 300 (bashref.dvi) @start %DVIPSBitmapFont: Fa cmbxti10 14.4 1 /Fa 1 47 df<120E123FEA7F80A212FFA21300127E123C0909798815>46 D E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fb cmsl9 9 1 /Fb 1 121 df<383FC7E038078380EB0200EA038413C8EA01D8EA00F05B7F1201133812 02487EEA081E123838FC3FC013107F8F14>120 D E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fc cmsltt10 9 4 /Fc 4 78 df45 D48 D<134013E0EA01C01203120F123D12111201EA0380A6EA0700A6120EEAFFE0A20B177B96 14>I<381F81F813C1380FC3E0EA0EC213C6A213CE13CC381CCDC013DD13D9A213F1A238 38E3801303A53870070038FC0FC0A215177F9614>77 D E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fd cmtt12 14.4 2 /Fd 2 126 df<14FC1307131FEB3F00133C5BAF5B1203B45A138013E0EA03F012001378 AF7F133FEB1FFC13071300162F7CA91F>123 D<127CB47E13E0EA03F012001378AF7F13 3FEB1FFC1307131FEB3F00133C5BAF5B1203B45A1380007CC7FC162F7CA91F>125 D E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fe cmr9 9 50 /Fe 50 123 df<13FEEA038138060180EA0E03381C010090C7FCA5B51280EA1C03AE38FF 8FF0141A809915>12 D<126012F0A212701210A31220A21240A2040B7D830B>44 D48 D<12035AB4FC1207B3A2EA7FF80D187D9713>III<1318A21338137813F813B8EA01381202A2 12041208121812101220124012C0B5FCEA0038A6EA03FF10187F9713>III<1240EA7FFF13FEA2EA4004EA80081310A2EA00201340A21380120113 005AA25A1206A2120EA5120410197E9813>III<130CA3131EA2132F1327A2EB4380A3EB81C0A200017F1300A248B47E 38020070A2487FA3487FA2003C131EB4EBFFC01A1A7F991D>65 DI68 D<39FFE1FFC0390E001C00AB380FFFFC380E001CAC39 FFE1FFC01A1A7F991D>72 DI77 D<00FEEB7FC0000FEB0E001404EA0B80EA 09C0A2EA08E01370A21338131CA2130E1307EB0384A2EB01C4EB00E4A21474143CA2141C 140C121C38FF80041A1A7F991D>I<137F3801C1C038070070000E7F487F003C131E0038 130E0078130F00707F00F01480A80078EB0F00A20038130E003C131E001C131C6C5B6C5B 3801C1C0D8007FC7FC191A7E991E>II82 DI<39FFC0FF80390F003C0014106C5BEA03806D5A00015BEA00E101F1C7FC137A 133E131C131EA21317EB27801343EB41C0EB81E0EA010048137000021378481338000C7F 001E133EB4EB7FC01A1A7F991D>88 D97 D<12FC121CA913FCEA1D0738 1E0380381C01C0130014E0A6EB01C01480381E0300EA1906EA10F8131A809915>II<133F13 07A9EA03E7EA0C17EA180F487E127012E0A6126012706C5AEA1C373807C7E0131A7F9915 >IIII<12FC121CA913 7CEA1D87381E0380A2121CAB38FF9FF0141A809915>I<1218123CA212181200A612FC12 1CAE12FF081A80990A>II<12FC121CA9EB1FC0EB0F00130C5B13205B13E0121DEA1E70EA 1C7813387F131E7F148038FF9FE0131A809914>I<12FC121CB3A6EAFF80091A80990A>I< 38FC7C1F391D8E6380391E0781C0A2001C1301AB39FF9FE7F81D107F8F20>III IIII<1208A41218A21238EAFFC0EA3800A81320A41218EA1C40EA07800B17 7F960F>I<38FC1F80EA1C03AB1307120CEA0E0B3803F3F01410808F15>I<38FF0F80383C 0700EA1C061304A26C5AA26C5AA3EA03A0A2EA01C0A36C5A11107F8F14>I<39FE7F1F80 39381C0700003C1306381C0C04130E380E16081317A238072310149013A33803C1A014E0 380180C0A319107F8F1C>I<38FE3F80383C1E00EA1C086C5AEA0F306C5A6C5A12017F12 03EA0270487E1208EA181CEA381E38FC3FC012107F8F14>I<38FF0F80383C0700EA1C06 1304A26C5AA26C5AA3EA03A0A2EA01C0A36C5AA248C7FCA212E112E212E4127811177F8F 14>II E %EndDVIPSBitmapFont %DVIPSBitmapFont: Ff cmti9 9 1 /Ff 1 47 df<1230127812F0126005047C830C>46 D E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fg cmtt9 9 78 /Fg 78 127 df<126012F0AD12601200A4126012F0A212600417789614>33 D35 D<13801201A2EA07E0EA1FF0EA39BCEA619CEAC18EA3EAE184EA7180127FEA1FE0EA0FF0 EA01F8139C138EEA418612E1A3EA718CEA39B8EA1FF0EA0FC0EA0180A212000F1D7E9914 >I<1207487EEA18C0EA38E0A35B3839CF80138F381F1C00121EA2EA0E38121EEA377012 67EAE3F05B38E1C38013E3EA63F3383F3F00EA1E1E11177F9614>38 D40 D<128012C01260123012381218121C120EA31207A9120EA3121C121812 381230126012C01280081D7C9914>II<127012F812FCA2127C120C1218 123012E012C0060A798414>44 DI<127012F8A3127005057984 14>I<1306130EA2131CA21338A21370A213E0A2EA01C0A2EA0380A3EA0700A2120EA25A A25AA25AA25AA25A0F1D7E9914>II<1203A25A5A123F12F712 471207AEEA7FF0A20C177C9614>III<137813F8EA01B8A2EA0338A212 06120E120C121C12381230127012E0B51280A238003800A548B4FCA211177F9614>I<12 7012F8A312701200A6127012F8A312700510798F14>58 D<1306131E133E13F8EA01F0EA 03C0EA0F80EA1F00123C12F85A7E123C121FEA0F80EA03C0EA01F0EA00F8133E131E1306 0F157E9514>60 D<12C012F07E123E7EEA0780EA03E0EA01F0EA0078133E131E133E1378 EA01F0EA03E0EA0780EA1F00123E12F85A12C00F157E9514>62 DIIII<3801F180EA07FFEA0E1FEA1C071238EA7003A348C7FCA738700380A3 38380700121CEA0E0EEA07FCEA01F011177F9614>IIIII<38FE3F80A238380E00A8EA3FFEA2EA380EA938FE3F80A211 177F9614>II75 DI<38FC1F80A2007C1300EA7637A4 EA7777A2EA7367A313E7EA71C7A2EA7007A638F80F80A211177F9614>I<38FE3F80A238 3E0E00123BA4138E1239A213CEA31238A213EE136EA4133E12FEA211177F9614>III82 DI<387FFF80 B5FCEAE1C3A43801C000AFEA0FF8A211177F9614>I<38FE0FE0A238380380B0381C0700 A2EA0E0EEA07FCEA01F01317809614>I<38FC1F80A238380E00A3EA3C1EEA1C1CA46C5A A4EA0630EA0770A3EA0360A213E0A26C5A11177F9614>I<38FC1F80A238700700A7EA31 C6EA33E6EA3BEE136EA5EA1B6CA2EA1A2CEA1E3CA311177F9614>II<38FC1F80A238380E00EA3C1EEA1C1CEA1E3CEA0E38A26C 5AA2EA036013E0A26C5AA8EA07F0A211177F9614>I II93 D<1204121FEA7FC0EAF1E012E00B057C9614>II97 D<12FCA2121CA513F8EA1DFEEA1F07EA1E03001C1380EB01C0A6EB0380 001E1300EA1F0EEA1DFCEA0CF81217809614>II<137EA2130EA5EA07CE EA0FFEEA1C3EEA301EEA700E12E0A61270EA301EEA383E381FEFC0EA07CF12177F9614> II<13FCEA01FEEA038EEA07041300A3EA7FFE12FFEA0700 ACEAFFF8A20F177F9614>II<12FCA2121CA51378EA1DFEEA1F86EA1E07121CAA38FF8FE0A213 17809614>I<1206120FA21206C7FCA4B4FCA21207ACEAFFF8A20D187C9714>I<136013F0 A213601300A4EA1FF0A2EA0070B2EA40E0EAE0C0EA7F80EA3F000C207E9714>I<12FCA2 121CA5EBFF80A2EB1C005B5B5BEA1DC0EA1FE0A2EA1E70EA1C38133C131C7F38FF1F80A2 1117809614>IIIIIIIII<1206120EA4EA7FFC12FFEA0E00A8130EA3131CEA07F8EA01F00F157F94 14>II<38FE3F80A2383C1E00EA 1C1CA36C5AA3EA0630EA0770A36C5AA311107F8F14>I<38FE3F80A238700700EA380EA3 EA39CEA3EA1B6C121AA3EA1E7CA2EA0E3811107F8F14>II<38FE3F80A2 381C0E005BA2120E5BA212071330A2EA0370A25B1201A25BA3485A12730077C7FC127E12 3C11187F8F14>II<133E13FEEA01E0EA0380AAEA7F0012FE127FEA03 80AAEA01E0EA00FE133E0F1D7E9914>I<127812FE120FEA0380AAEA01FCEA00FEEA01FC EA0380AAEA0F0012FE12780F1D7E9914>125 DI E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fh cmr8 8 26 /Fh 26 118 df<126012F0A212701210A21220A21240A2040A7D960A>39 D45 D<1206120E12FE120EB1EAFFE00B157D9412>49 D<13101338A3135CA3138EA3EA0107A238020380A33807FFC0EA0401A2380800E0A20018 13F0123838FE03FE17177F961A>65 DIIIII76 D80 D82 DI<387FFFF8386038180040 1308A200801304A300001300AF3803FF8016177F9619>I<12FCA212C0B3AB12FCA20621 7D980A>91 D97 D99 D101 D<1203EA0780A2EA0300C7FCA5 EA1F801203AF1243EAE30012E7127C091D82960B>106 D<12F81238A8133E1338133013 4013801239EA3FC0EA39E0123813F01378133CA2EAFE7F10177F9613>I110 D112 D114 DI<1208A31218A21238EAFFC0EA3800A7 1340A4EA1C80EA0F000A147F930E>II E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fi cmsy9 9 2 /Fi 2 106 df<13801201EA0300A31206A25AA35AA35AA25AA35AA21260A37EA27EA37E A37EA27EA3EA0180120009267D9B0F>104 D<12C0A21260A37EA27EA37EA37EA27EA3EA 0180A2EA0300A31206A25AA35AA35AA25AA35AA209267E9B0F>I E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fj cmsltt10 10.95 28 /Fj 28 122 df<1206120FEA1F80120FA21203EA0700A25A120E123C127C12F01260090E 769B18>39 D<387FFFC0B512E0A26C13C013047C8F18>45 D<133E13FF000313803807C3 C0EA0F01000E13E0EA1C00123C003813F014705AA34813E0A4EB01C0A2130300F01380EA 7007EB0F00EA781E6C5AEA1FF85BEA07C0141C7C9B18>48 D<13181338A2137813F81203 120F137012041200A413E0A6EA01C0A6EA7FFE12FF127F0F1C7B9B18>I67 D<3807FFC014E014F03801C0F814 78143C141CEA0380141EA2140EA33807001CA4143C1438120E147014F0EB01E0EB03C013 07387FFF8038FFFE00EA7FF8171C7F9B18>I<0007B5FC5A7E3801C007A3140638038000 A2EB818014C0A213FF481380A21303A2140090C7FC120E140C141CA4387FFFF8B5FC7E18 1C7F9B18>I74 D76 D<3907E01F80000FEB3FC0000714803903 B02E00146EA214CE380730DC1331149CA21333141C000E5B13371336133E133C131848C6 5AA638FE03F800FF7F00FE5B1A1C7F9B18>I<126012F0A37E1278A3127C123CA3123E12 1EA3121F7EA313801207A313C01203A413E01201A313F0120013600C24789F18>92 D<387FFFC0B512E0A26C13C013047E7F18>95 D97 D<127EA3120EA45A137CEA1DFF001F13801383381E01C0123CEB00E012 38A4387801C0A2EB0380A2EB0F00EA7C1FEAFFFCEAEFF8EA63E0131C7C9B18>I100 D<13F8EA07FE487E381F 0780EA3C03387801C0127012E0A2B5FCA2148000E0C7FCA213033870078038780F00EA3F FE6C5AEA07F012147B9318>III107 D I<13FCEA03FF000F1380EA1F07383C03C0EA7801007013E0EAE000A4EB01C0A2EB0380EA F007EB0F00EA7C3EEA3FFC6C5AEA07E013147C9318>111 D113 D<381FE1F8EBE7FCEBEFFE3800FE1EEBFC0C3801 F8005B5B5BA3485AA6EAFFFC7F5B17147E9318>II<387E07E0EAFE0FEA7E07EA0E00A2381C01C0A63838 0380A41307131F383FFFE06C13F03807E3E014147D9318>117 D<38FF87F8138F138738 3800E0EB01C0A3148013E3EA39F31233EB7700A212371376EA3666136EEA3C7CA2EA3838 15147C9318>119 D<381FE3FC13E713E33803C3C000011380EBE700EA00EE13FC137C13 38137813FCEA01DCEA038E12071307120E38FF1FE0EB9FF0EB1FE016147E9318>I<380F F1FE381FF9FF380FF1FE3803807013C0000113E0A213C114C0A23800E380A2EBE700A213 E6136E136C137C1378A21370A25BA2485A12F3EAF780B4C7FC5A1278181E7F9318>I E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fk cmcsc10 12 9 /Fk 9 121 df<141014301460A314C0A3EB0180A2EB0300A31306A25BA35BA35BA25BA3 5BA2485AA348C7FCA31206A25AA35AA25AA35AA35AA214317CA41C>47 D100 D103 D105 D111 DI 115 D<39FFC03F80391E000E001404B2000E5B120F6C5B6C6C5A3800E0C0013FC7FC191A 7E991F>117 D<39FFE07F80391F803E00000F1318000713106C6C5A13E06C6C5A00005B 13F9017DC7FC7FA27F7FEB1780EB37C01323EB41E0EB81F0EA0180EB00780002137C0006 7F000E131E001E133FB4EB7FE01B1A7F991F>120 D E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fl cmtt12 13.14 8 /Fl 8 116 df<387FFFF0B512F8A26C13F015047D921C>45 D103 DI<13E0487EA36C5A90 C7FCA5EA7FF012FF127F1200B2B512E0A313227CA11C>I108 D<38FF0F80EB3FE0EBFFF0EA0FF0EBC078A2 13801300AE39FFF1FF80A319187F971C>110 D<13FE3803FF80000F13E0381F83F0EA1E 0048137848133CA248131EA76C133E0078133C007C137C003C13786C13F0EA1F83380FFF E0000313803800FE0017187E971C>I<3803F9C0EA1FFF5AEA7807EA700312E0A212F000 78C7FCEA7FC0EA3FFCEA0FFF000113C038000FE01301387000F000F01370A27E6C13E0EA FE03B512C000EF1300EAE1FC14187C971C>115 D E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fm cmbx12 13.14 62 /Fm 62 122 df<903907FC0FE090393FFF3FF89039FC03FC783A03F007F0FC3807E00F15 E0D80FC0147802071300A7B71280A23A0FC007E000B3A239FFFC7FFFA226267FA524>11 DI<123C127EB4FCA21380A2127F123D 1201A212031300A21206A25A5A5A122009137CA511>39 D<123C127EB4FCA21380A2127F 123D1201A212031300A21206A25A5A5A122009137C8711>44 D I<123C127E12FFA4127E123C08087C8711>I<131C133C13FC12FFA21200B3AA387FFFFC A216237CA21F>49 D<48B4FC000713C0381E07F0383803F8386001FC387C00FE12FE14FF 147FA2127C003813FFC7FC14FEA2EB01FC14F8EB03F0EB07E01480EB0F00131E5B1370EB E003EA01C038038007380700061206380FFFFE5A5A4813FCB5FCA218237DA21F>I<48B4 FC000713E0381E03F0383801F8003C13FC387E00FEA3123EEA1C01000013FCA2EB03F8EB 07F0EB0FC03801FF00A2380007E0EB01F014F8EB00FC14FE14FFA21210127C12FEA214FE A2387C01FC007013F8383E07F0380FFFC00001130018237DA21F>I<14381478A214F813 01130313071306130C131C13381330136013E0EA01C01380EA03005A120E5A12185A1270 5AB612C0A2390001F800A790387FFFC0A21A237EA21F>I<0018130C001F137CEBFFF814 F014E014C01480EBFC000018C7FCA513FF001B13E0381F03F0381C00F8000813FCC7127E A3147FA2127812FCA3147E5A006013FC1270383801F8381E07E03807FFC03801FE001823 7DA21F>II<1230123C003FB512C0A215 804814005C5C38600018A200E05B485B5CC6485AA249C7FC1306130EA25BA2133CA25BA2 13F8A41201A66C5A13601A257DA41F>II<13FF000313C0380F83E0381F00F04813F8007E137CA214 7E12FEA3147FA4127E14FF123EEA3F01001F137FEA0FFEEA03FCC7FC147EA2123C007E13 FCA214F814F0EA7C01383003E0381C0F80380FFF00EA03F818237DA21F>I63 D<141CA2143EA3147FA24A7EA39038019FC0A29038031FE0140F01077FEB0607A2010C7F 1403011C7FEB1801A2496C7EA2017FB5FCA29039E0007F8049133FA2484880151F000381 90C7120FA2486E7ED8FFF090B51280A229257EA42E>65 DI<9138FF8008010FEBF01890393FC03C789039FE0006F8D801F8130348 4813014848130048481478121F48481438A2007F151890C8FCA2481500A97E16187F123F A26C6C1430120F6C6C14606C6C14C06C6CEB0180D800FEEB070090383FC01E90380FFFF8 010013C025257DA42C>IIII<9138FF8010010FEBE03090393FC078F090 38FE000DD801F81307D807F0130348481301491300001F1570485AA2007F153090C8FCA2 481500A70203B5FCA26C90380007F0A27F123FA26C7E120F7F6C7EEA01F8D800FE130F90 383FC03990390FFFF0700100EB803028257DA430>III75 DIII<903803FF80011F13F090387F01 FC3901FC007FD803F0EB1F804848EB0FC0000F15E04848EB07F0491303003F15F8A2007F 15FC90C71201A24815FEA96C15FCA26D1303003F15F8A26C6CEB07F0A26C6CEB0FE06C6C EB1FC06C6CEB3F806C6CEB7F0039007F01FC90381FFFF00103138027257DA42E>II<903803FF80011F13F090387F01FC3901FC 007F4848EB3F804848EB1FC04848EB0FE04848EB07F0A24848EB03F8A2007F15FC90C712 01A24815FEA96C15FCA26D1303003F15F8A26C6CEB07F0147C3A0FE1FE0FE00007018313 C03A03F3019F80D801FFEBFF0039007F81FC90381FFFF00103140690C7FC1578ED7C1EED 7FFE16FC153FA2ED1FF816F0ED0FE0ED03C027307DA42E>II<01FF13 80000713E3380F80F7381E001F48130F481307140312F81401A27E91C7FCB4FCEA7FE013 FE383FFFE014F86C13FE00077F6C1480C67E010313C0EB003FEC0FE01407A200C01303A3 15C07E6C13076C14806CEB0F0038FFC03E38E3FFF838803FE01B257DA422>I<007FB612 F8A2397E00FE010078EC00780070153800601518A200E0151C160C5AA4C71400B3A390B5 12FEA226247EA32B>I87 D89 D<120212065A5A5AA25AA212E05A A212DEB4FC1380A2127FA2EA3F00121E09137DA511>96 DIIII<137F3803FFC0 3807C1F0380F80F8EA1F0048137C127E147E12FEA2B512FEA248C7FCA3127EA214067E6C 130C380F80183807E0703803FFE038007F8017187E971C>II<3901FF07 C00007EBDFE0380F83F1EA1F01393E00F800007E7FA6003E5B6C485A380F83E0EBFFC000 1190C7FC0030C8FCA21238123C383FFFE06C13FC806C7F481480383C003F48EB0FC000F8 1307A4007CEB0F806CEB1F00381F807E3807FFF8C613C01B247E971F>II<120FEA1F80EA3FC0A4EA1F80EA0F00C7FCA7EA7FC0A2120FB3A2EAFFF8A20D277E A611>I 107 DI<26FF80FE137F903A83FF81FFC03B 0F8E0FC707E0019813CC903A9007E803F001A013F0A201C013E0AF3BFFFC7FFE3FFFA230 187E9733>I<38FF80FE903883FF80390F8E0FC0139890389007E013A0A213C0AF39FFFC 7FFEA21F187E9722>II< 38FFC1FCEBCFFF390FFC1FC09038F007E001C013F0140315F8140115FCA8EC03F8A215F0 EBE0079038F00FE09038DC1F809038CFFF00EBC3F801C0C7FCA9EAFFFCA21E237F9722> I<017F13C03803FFC13807E0E3381FC033EB801FEA3F0048130FA212FEA8127E127F7EEB 801F001F133F380FE0EF3803FF8F3800FE0F1300A9ECFFFCA21E237E9720>I<38FF83E0 EB8FF8380F8C7CEB90FC13B013A01478EBE0005BAEEAFFFEA216187F9719>I<3807F8C0 EA1FFFEA3C07EA7001EAF000A300FC1300B47EEA7FFC7F383FFF80000F13C0120338001F E01303EAC001A212E014C0EAF00338FC078038EFFF00EAC3FC13187E9718>I<13C0A412 01A312031207120F121FB512C0A2380FC000AC1460A63807E0C013E13801FF8038007E00 13237FA218>I<39FFC07FE0A2000F1307B0140FA200071317EBE0673903FFC7FE38007F 071F187E9722>I<39FFF80FF8A2390FC001C015803907E00300A26D5A00031306EBF80E 0001130C13FC00005B13FEEB7E30A26D5AA214E06D5AA26D5AA26DC7FCA21D187F9720> I<3BFFF9FFE0FF80A23B1FC03F001C00000F6D13181580D807E05CA29039F03FC0700003 0137136015E02601F8635BA29038FCE3F1000001C15B15F990267F80FBC7FCA215FF9038 3F007EA2011E133CA3010C131829187F972C>I<39FFF83FF0A2390FC00F003807E00E6C 6C5A6D5A6C6C5A00001360EB7EC06D5AA2131F6D7E497E80EB33F81361EBE0FC3801C07E 3803807F3907003F8048131F39FFC07FF8A21D187F9720>I<39FFF80FF8A2390FC001C0 15803907E00300A26D5A00031306EBF80E0001130C13FC00005B13FEEB7E30A26D5AA214 E06D5AA26D5AA26DC7FCA21306A25B1230EA781CEAFC185B1370EA68E0EA7FC0001FC8FC 1D237F9720>I E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fn cmti10 10.95 17 /Fn 17 119 df12 D<127012F8A212F012E005057B840E>46 D 97 D<137EEA01C138030080EA0E07121E001C1300003CC7FC5AA35AA45B12701302EA30 0CEA1830EA07C011147C9315>99 D<1478EB03F8EB0070A414E0A4EB01C0A213F1EA0389 38070780EA0E03121C123C383807001278A3EAF00EA31420EB1C40A2EA703C135C38308C 80380F070015207C9F17>I<137CEA01C2EA0701120E121C123CEA3802EA780CEA7FF0EA 78005AA4EA7001A21302EA380CEA1830EA07C010147C9315>I103 D<13C0EA01E0A213C0C7FC A7120E12131223EA4380EA4700A21287120EA35AA3EA38401380A21270EA31001232121C 0B1F7C9E0E>105 D108 D<391C0F80F0392630C318394740640C903880680EEB0070 A2008E495A120EA34848485AA3ED70803A3803807100A215E115623970070064D8300313 3821147C9325>I<381C0F80382630C0384740601380EB0070A2008E13E0120EA3381C01 C0A3EB038400381388A2EB0708EB031000701330383001C016147C931A>I<137CEA01C3 38030180000E13C0121E001C13E0123C1278A338F003C0A3EB07801400EA700F130EEA30 18EA1870EA07C013147C9317>I<3801C1E0380262183804741C1378EB701EA2EA08E012 00A33801C03CA3143838038078147014E0EBC1C038072380EB1E0090C7FCA2120EA45AA2 B47E171D809317>I114 D<13FCEA0302EA0601EA0C03130713061300EA0F8013F0 EA07F8EA03FCEA003E130E1270EAF00CA2EAE008EA4010EA2060EA1F8010147D9313>I< EA018013C0EA0380A4EA0700A2EAFFF0EA0700120EA45AA45AA31320EA7040A21380A2EA 3100121E0C1C7C9B0F>I<380E0380EA1307002313C0EA4383EA4701130000871380120E A3381C0100A31302A25BA25BEA0E30EA03C012147C9315>118 D E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fo cmsl10 10.95 54 /Fo 54 122 df<903803F07C90381E0DC69038380F0FEB701E01E0130EEC0C003801C01C A548485A007FB512C03903803800A448485AA6000E5BA648485A001E7F38FF8FFC20207E 9F1B>11 DI<903803F03F9039 1E09E0809039380F80C09039701F01E0EBE03E021E13C02601C01CC7FCA548485A007FB6 12803903803803A43A0700700700A6000EEBE00EA64848485A001EEBE01E3AFF8FF8FFC0 23207E9F26>14 D<13201360A4383061C0383C4380380E4E00EA0778EA01E0A2EA07B8EA 1C9CEA708FEAE083EA0180A490C7FC12147AA117>42 D45 D<13181338EA01F8EA0E701200A513E0A6EA01C0A6EA0380A6EA07001380EAFFFC0E1E7B 9D17>49 DI<137F380183C0380201E0EA0400000713F05A1301A20000 13E0A2EB03C0EB07801400131CEA01F8EA000E7F148014C0130313071230127812F8A200 F0138038800F00EA400E6C5AEA1078EA0FE0141F7D9D17>I<120E121FA2121E120C1200 AA1230127812F81278127008147C930D>58 D<1408140C141C143CA2147C147E149EA2EB 011EA21302801304A21308A20110138014071320A2EB7FFF90384007C0EB8003A2EA0100 A21202EC01E01206001F130339FF801FFE1F207F9F22>65 D<0007B5FC3900F803C09038 7801E0EC00F04913F8A515F03801E001EC03E015C0EC0F809038FFFE009038E00F803903 C003C0EC01E015F0A21400A2485A1401A215E01403EC07C0390F000F80EC3E00B512F01D 1F7E9E20>II<0007B57E3900F801E09038780070 81497F151E150E150FA348481480A6484814005DA3151E153E4848133C5DA25D4A5A4A5A 260F000FC7FC143CB512F0211F7E9E23>I<0007B512FC3900F8007C0178131C150C5B15 04A414043901E00800A31438EBFFF8EBE0383803C010A4EC00081510485AA21520A21560 15C0380F00011407B612801E1F7E9E1F>I<0007B512F83900F800780178133815185B15 08A53901E00800A314181438EBFFF83803C0301410A491C7FC485AA648C8FC7FEAFFFC1D 1F7E9E1E>I<3A07FF83FFC03A00F8007C000178133CA2495BA648485BA490B5FCEBE000 4848485AA64848485AA64848485A01807F39FFF07FF8221F7E9E22>72 D<3807FF803800F8001378A25BA6485AA6485AA6485AA648C7FC7FEAFFF0111F7E9E10> I<3A07FF803FE03A00F8001F000178130C5D4913205D5D4AC7FC1402140848485A5C1460 14F013E1EBE4F83803C878EBD07CEBE03CEBC03E141E141F48487E81140781140381380F 00016D487E39FFF00FFE231F7E9E23>75 D<3807FFE0D800FCC7FC1378A25BA6485AA648 5AA41580EC0100EA0780A25C14021406140E380F001E147CB512FC191F7E9E1C>IIII<0007B5FC3900F803C0903878 00F015785B157CA41578484813F815F0EC01E0EC03C0EC0F00EBFFFCD803C0C7FCA6485A A648C8FC7FEAFFF81E1F7E9E1F>I<3807FFFE3900F8078090387801E0EC00F05B15F8A4 15F03801E00115E0EC03C0EC0780EC1E00EBFFF03803C03880141E140EA2140F48485AA5 1501D80F0013029038800F8239FFF8078CC7EA01F020207E9E22>82 DI<003FB512F0383C0780003014301260 39400F0010A212C01280A3D8001E1300A65BA65BA65B7F383FFFE01C1F7A9E21>I<39FF F00FF8391F0003E06CEB01801400001EEB0100A6481302A6485BA600705BA25CA200785B 1238001813C06C48C7FCEA0706EA01F81D20799E22>I<3BFFF07FF81FF03B1F000FC007 C0001E903907800380001FED01006C1502140F5EEC17C002135B142301805C000713435E 14C3913883E0401481D981015B13C1D803C213E193C7FC13C415F2EBC80015F4EA01F015 F85B5D5B15605B000014402C207A9E2F>87 D<3A03FFC0FFC03A007F003E00013C131801 3E1310011E5B011F5B6D5B0281C7FCEB078314C2EB03C414E8EB01F0A2130080A2EB017C EB023CEB043EEB0C1EEB081F497E132001407FEB8007000180EB0003000780391F8007F0 39FFC01FFE221F7F9E22>I97 D<1207123F120F7EA2120EA65A137CEA1D83381E0180001C13C0EB00E05A14F0A5387001 E0A214C013031480EB0700EAE80EEACC38EA83E014207B9F19>I<13FEEA0383380E0780 121C0038130090C7FC12785AA45AA37E5BEA70026C5AEA1C18EA07E011147D9314>I<14 38EB01F8EB00781438A21470A614E013FCEA0382EA0601121CEA3C00383801C0127812F0 A438E00380A412F0EA700738380F00381C37803807C7E015207D9F19>I<13F8EA070EEA 0E07381C038012381278127012F0B5FC00F0C7FCA25AA46C5AEA7002EA3004EA1C18EA07 E011147D9314>II<140EEB3E11EBE1A33801C1C2380381 E0EA07801301120FA3380703C01480EB8700EA04FC48C7FCA21218121CEA0FFF14C014E0 381800F04813305A5AA3006013606C13C0381C0700EA07FC181F809417>I<13E0120712 011200A2485AA6485AEB8F80EB90E013A0EBC0601380000713E01300A5380E01C0A6381C 0380001E13C038FF8FF014207E9F19>III<13E0120712011200A2485AA6485AEB81FCEB80F014C0EB81801400EA0704 5B13181338137C131C120E7FA2130F7F1480EA1C03381E07C038FF8FF016207E9F18>I< 13E0120712011200A2EA01C0A6EA0380A6EA0700A6120EA65A121EEAFF800B207F9F0C> I<390387C07C391F9861863907A072073903C03403EB80380007EB7807EB0070A5000EEB E00EA64848485A001EEBE01E3AFFCFFCFFC022147E9326>I<38038F80381F90E0EA07A0 3803C0601380000713E01300A5380E01C0A6381C0380001E13C038FF8FF014147E9319> I<13FCEA0387380E0180381C00C04813E0A24813F012F0A438E001E0A214C0130300F013 8038700700EA380E6C5AEA07E014147D9317>IIIII<1380EA0100 A35A5A5A121EEAFFF8EA0E00A45AA65A1310A41320A2EA1840EA0F800D1C7C9B12>I<38 1C0380EAFC1FEA3C07EA1C03A238380700A6EA700EA4131EA25BEA305E381F9F8011147B 9319>I<38FF83F8381E00E0001C13C01480121E380E01005B13025B12075BA25BEA0390 13A013E05B5B120190C7FC15147C9318>I<39FF9FE1FC393C078070391C030060148015 401580EA0E0790380D81001309EB19C21311380F21C4EA0720EB40C814E8EB80F0A26C48 5A1460000213401E147C9321>I<381FF0FF3803C0780001137014403800E0C0EBE180EB 73001376133CA2131C132E134E1387EA0107380203801204380C01C0383C03E038FE07FC 18147F9318>I<390FF83F803901E00E00EBC00C140813E000005B143014205C13705CA2 0171C7FC1339133A133E133C133813181310A25BA25BEA70C0EAF08000F1C8FC12E61278 191D809318>I E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fp cmcsc10 10.95 24 /Fp 24 121 df45 D<14801301EB0300A31306A35BA35BA35BA3 5BA35BA2485AA348C7FCA31206A35AA35AA35AA35AA35AA2112D7CA119>47 D50 D<38180180381FFF005B5B13E00010C7FCA6EA11F8EA120EEA1C073818038012 10380001C0A214E0A3127012F0A200E013C0EA4003148000201300EA1006EA0C1CEA03F0 131F7D9D19>53 D56 DI<1318A2133CA3134EA213CF1387A238010380A2000313C0EA0201A23807 FFE0EA0400A2481370A2001813380038137838FE01FF18177F961C>97 DIIIIII105 D108 D<00FCEB07F0001C1480A20016130BA200131313 A338118023A23810C043A3EB6083A2EB3103A3131AA2130C123800FEEB1FF01C177E9622 >I<38FC01FC381E007014201217EA1380A2EA11C0EA10E0A213701338A2131C130E1307 A2EB03A0EB01E0A213001460123800FE132016177E961C>I<13FE38038380380E00E048 1370003C1378003813380078133C0070131C00F0131EA70070131C0078133C0038133800 3C1378001C13706C13E0380383803800FE0017177E961D>II114 DI<387FFFFC3870381C00401304A200C0130600801302A300001300AE3803FF8017177F 961B>I<38FF81FC381C00701420B0000C1340120E6C138038018300EA007C16177E961C> I<38FF80FE381F0070000E13606C1340EB80803803C100EA01C3EA00E213F4137813387F 133E134E13C7EB8780380103C0EA0201380600E0000413F0000C1370003C137800FE13FF 18177F961C>120 D E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fq cmbx12 17.28 52 /Fq 52 122 df<91393FFC07F80103B5EA3FFE903A0FF807FF0F903B3FC003FC1F80903B 7F0007F83FC001FE130F000115F05B0003EE1F80EF060094C7FCA8B812F0A32803FC000F F0C7FCB3A8267FFFE1B512C0A332327FB12F>11 DI48 DIII<157015F0140114031407140FA2141F143F147714F714E7EB 01C7EB0387EB0707130F130E131C1338137013F013E0EA01C0EA0380EA07005A120E5A5A 5A5AB712E0A3C7380FF000A9010FB512E0A3232E7EAD28>I<000C1430390FC007F090B5 12E015C0158015005C14F85C1480000EC8FCA8EB1FF0EBFFFE390FE03F809038000FC000 0EEB07E0000C14F0C713F8140315FCA215FEA21218123E127F5AA215FCA25A0078EB07F8 15F06CEB0FE06CEB1FC0390FC07F806CB51200000113FC38003FE01F2E7CAD28>I<14FF 010713E0011F7F90387F80F89038FE003CD801F8137C484813FE00071301EA0FE0A2EA1F C0003F6D5A157892C7FC485AA338FF83FC90388FFF8090389C0FC09038B003F06E7E01E0 7F01C07F140081A2491480A4127FA4003F15007F121F5D000F495AEA07E06C6C485A3901 FC0FE06CB55A013F90C7FCEB0FFC212E7DAD28>I<1238123E003FB612C0A31680481500 5D5D5D0078C7123800705C5D00F0495A48495A4AC7FCA2C7120E5C5C1478147014F0495A A213035C1307A2130FA2131F5CA2133FA4137FA86DC8FC131E22307CAF28>III<1578A215FCA34A7EA24A7EA24A7FA34A7F EC0E7F021E7FEC1C3FA202387F151F02787FEC700FA202E07F1507010180ECC003A24948 6C7EA201078191C7FC498191B6FCA24981011CC7123F013C810138141FA24981160F01F0 81491407A2484881486C1403B549B512FCA336317DB03D>65 DI<913A03FF800180023FEBF00349B5EAFC07010790 38003F0FD91FF8EB079FD93FC0EB01FFD9FF807F4848C8127F4848153F0007161F49150F 485A001F1607A2485A1703127FA24992C7FCA212FFA9127FA27FEF0380123FA26C7E1707 000F17006C7E6D150E0003161E6C6C151C6C6C6C1478D93FC05CD91FF8EB03E0D907FFEB 3F800101D9FFFEC7FCD9003F13F80203138031317CB03A>IIII72 DI<017FB512C0A39039001FF000B3AF121C123E127FEAFF80A25D143FD87F005B00 7E5C003C49C7FC381F01FE3807FFF8C613C022317DB02A>I76 DI80 D82 D<90391FF8018090B51203000314C73907F007EF390F8000FF48 C7127F003E141F150F5A150712FCA215037EA26C91C7FC13C0EA7FF0EBFF806C13F8ECFF 806C14F06C806C806C14FFC6FC013F1480010114C0D9001F13E01401EC003FED1FF0150F 1507126000E01403A316E07EA26CEC07C07EB4EC0F8001C0EB1F00D8FBFC13FE00F1B512 F8D8E03F5BD8C003138024317CB02D>I<007FB8FCA39039C00FF801D87E00EC003F007C 82007882A200708200F01780A3481603A5C792C7FCB3AA017FB6FCA331307DAF38>IIII 97 DI III I<90391FF007C09039FFFE3FE03A01F83F79F03907E00FC3000F14E19039C007E0E0001F ECF000A2003F80A5001F5CA2000F5CEBE00F00075C2603F83FC7FC3806FFFE380E1FF090 C9FC121EA2121F7F90B57E6C14F015FC6C806C801680000F15C0003FC7127F007EEC1FE0 007C140F00FC1407A4007EEC0FC0003E1580003F141FD80FC0EB7E003907F803FC0001B5 12F0D8001F90C7FC242F7E9F28>II II108 D<2703F007F8EB1FE000FFD93FFEEBFFF8913A783F01E0FC02C090388300FE280FF1801F C6137F2607F30013CC01F602F8148001FC5CA3495CB3B500C3B5380FFFFCA33E207D9F43 >I<3903F007F800FFEB3FFEEC783F02C013803A0FF1801FC03807F30001F614E013FCA3 5BB3B500C3B5FCA328207D9F2D>II<3901F83FE000FFEBFFFC9038FBE07F9039FF003F80D80FFEEB1FC06C48EB0FE049 14F0ED07F8A216FC1503A216FEA816FC1507A216F8A2ED0FF06D14E06DEB1FC06DEB3F80 9039FBC0FE009038F8FFF8EC3FC091C8FCABB512C0A3272E7E9F2D>I<3803F03F00FFEB 7FC09038F1C3E01487390FF30FF0EA07F6A29038FC07E0EC03C091C7FCA25BB2B512E0A3 1C207E9F21>114 D<3801FF86000713FEEA1F00003C133E48131E140E12F8A36C90C7FC B47E13FC387FFFC06C13F0806C7F00077F00017FEA003F01001380143F0060131F00E013 0FA27E15007E6C131E6C131C38FF807838F3FFF038C07F8019207D9F20>I<131CA5133C A3137CA213FC120112031207381FFFFEB5FCA2D803FCC7FCB0EC0380A71201EC0700EA00 FEEB7F0EEB3FFCEB07F0192E7FAD1F>I II<3A7FFF807FFCA33A03FC000F006C6C131E6C6C5B EC803890387FC078013F5B90381FE1E090380FF3C0ECFF806D90C7FC6D5A13016D7E8181 5B903803DFE09038078FF08190380F07FC90381E03FEEB3C01496C7E4914804848EB7FC0 0003EC3FE026FFFC01B5FCA328207F9F2B>120 DI E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fr cmsy10 10.95 5 /Fr 5 56 df0 D<14FE903807FFC090381F01F0903878003C01 E0130ED80180130348C7EA01800006EC00C0481560A2481530481518A248150CA4481506 A90060150CA46C1518A26C15306C1560A26C15C06CEC01806C6CEB0300D800E0130E0178 133C90381F01F0903807FFC0D900FEC7FC272B7DA02E>13 D15 D<1506A481A2ED0180ED00C016E016701638B8FCA2C91238167016E016C0ED0180ED0300 A21506A428187D962E>33 D<12C0A712E0A212C0A703107E9200>55 D E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fs cmbx12 14.4 73 /Fs 73 122 df<903901FF81FE010FEBEFFF903A7F81FF8F80D9FE01EB1FC03901F803FE 000314FCEA07F0EE0F80020190C7FCA7B712F0A32707F001FCC7FCB3A33A7FFF1FFFE0A3 2A2A7FA927>11 D<49B4FC011F13C090387F81E0EBFC013901F807F01203EA07F0A4EC01 C091C8FCA3EC3FF8B6FCA33807F003B3A33A7FFF3FFF80A3212A7FA925>I<123E127FEA FF80A6EA7F00A8123EA8121CA4C7FCA5121C123E127FEAFF80A3EA7F00123E121C092A7B A914>33 D<02031306913807800FA2020F5BED001EA34A133E021E133CA2023E137C023C 1378A3027C13F802785BA3007FB712FCB812FEA26C16FC3B0001E003C0000103130702C0 5BA60107130F028090C7FC007FB712FCB812FEA26C16FC27001E003CC7FCA3013E137C01 3C1378A3017C13F801785BA2EBF80101F05BA30001130301E05BA26C486C5A2F367CA938 >35 D<131CA3EB7F803803FFE0000F13F8381F9CFC383E1C1E003C7F007C7F0078EB0F80 00F8131F143FA312FC00FEEB1F0000FF90C7FCEA7FDC13FCEBFFC06C7F6C7F6C13FC7E00 017F6C6C7E131F131CEC3F800038131F127C00FE130FA312FC00F8140012705C0038131E 003C5B381F9CF86CB45A00035BC690C7FC131CA319307CAC22>I<131C133EA438201C02 0078130F00FCEB1F8000FE133F007FEB7F00381FDDFC3807EBF03800FF80011CC7FCEBFF 803807EBF0381FDDFC387F1C7F00FEEB3F8000FC131F0078EB0F0000201302D8003EC7FC A4131C191B7CAC22>42 D<123C127FEAFF80A213C0A3127F123E1200A2EA0180A3EA0300 A21206120E5A5A12100A157B8813>44 DI<121C127FA2EAFF80 A3EA7F00A2121C09097B8813>I48 D<130E131E137EEA07FE12FFA212F81200B3ABB5 12FEA317277BA622>III<140F A25C5C5C5C5BA2EB03BFEB073F130E131C133C1338137013E0EA01C0EA03801207130012 0E5A5A5A12F0B612F8A3C7EA7F00A890381FFFF8A31D277EA622>I<00181303381F801F EBFFFE5C5C5C14C091C7FC001CC8FCA7EB7FC0381DFFF8381F80FC381E003F1208C7EA1F 8015C0A215E0A21218127C12FEA315C05A0078EB3F80A26CEB7F00381F01FE6CB45A0003 13F0C613801B277DA622>II<1238123E003FB512F0A34814E015C0158015003870000EA25C 485B5C5CC6485AA2495A130791C7FC5B5B131E133EA2137E137CA213FCA41201A76C5A13 701C297CA822>III<121C127FA2EAFF80A3EA7F00A2121C C7FCA9121C127FA2EAFF80A3EA7F00A2121C091B7B9A13>I<48B4FC000F13E0381E03F0 383801F8387800FC00FC13FE7EA3127C003813FCEA0001EB03F8EB07E0EB0FC01480EB1E 00A25B1338A25BA790C7FCA5137013F8487E487EA36C5A6C5A1370172A7CA920>63 DII I<91387FE003903907FFFC07011FEBFF0F90397FF00F9F9039FF0001FFD801FC7F484814 7F4848143F4848141F485A160F485A1607127FA290C9FC5AA97E7F1607123FA26C7E160E 6C7E6C6C141C6C6C143C6C6C14786CB4EB01F090397FF007C0011FB512800107EBFE0090 38007FF028297CA831>IIII<91387FE003903907FFFC07011FEBFF0F9039 7FF00F9F9039FF0001FFD801FC7F484880484880484880485A82485A82127FA290CAFC5A A892B512F87E7F03001300123FA26C7EA26C7E6C7E6C7E6C7E6CB45B90387FF007011FB5 129F0107EBFE0F9039007FF0032D297CA835>III<90B512F8A301001300B3A91218127EB4FCA35C387E01FC007C5B383E 07F0380FFFE0000390C7FC1D297EA823>IIIIIIIII<9038FF80600003EBF0E0000F13F838 1F80FD383F001F003E1307481303A200FC1301A214007EA26C140013C0EA7FFCEBFFE06C 13F86C13FE80000714806C14C0C6FC010F13E0EB007FEC1FF0140F140700E01303A46C14 E0A26C13076C14C0B4EB0F80EBE03F39E3FFFE0000E15B38C01FF01C297CA825>I<007F B71280A39039807F807FD87C00140F00781507A20070150300F016C0A2481501A5C791C7 FCB3A490B612C0A32A287EA72F>II II<3B7FFFF01FFFE0A3000190C7EAF0006C6D485A02C05B017F13036D6C485A D91FF090C7FC5D90380FF81E6D6C5A1538903803FE786D6C5A5D6D5B147F6E7EA26E7E81 143F81EC7BFEECF3FFEB01E102C07F01036D7EEB078049486C7E010E6D7E131E496D7E01 386D7E498001F0130348486D7EB5013F13FCA32E297EA833>II91 D93 D<3803FF80000F13F0381F01FC383F80 FE147F801580EA1F00C7FCA4EB3FFF3801FC3FEA0FE0EA1F80EA3F00127E5AA4145F007E 13DF393F839FFC381FFE0F3803FC031E1B7E9A21>97 DIIII< EB07F8EB3FFCEB7E3E3801FC7FEA03F813F01207143E1400A7B512C0A33807F000B3A338 7FFF80A3182A7EA915>I<9038FF80F00003EBE3F8390FC1FE1C391F007C7C48137E003E EB3E10007EEB3F00A6003E133E003F137E6C137C380FC1F8380BFFE00018138090C8FC12 38A2123C383FFFF814FF6C14C06C14E06C14F0121F383C0007007CEB01F8481300A4007C EB01F0A2003FEB07E0390FC01F806CB5120038007FF01E287E9A22>II<1207EA0F80EA1FC0EA3FE0A3EA1FC0EA0F80EA0700C7FCA7EAFFE0A3120F B3A3EAFFFEA30F2B7EAA12>I<1307EB0F80EB1FC0EB3FE0A3EB1FC0EB0F80EB070090C7 FCA7EBFFE0A3130FB3AA127C12FE14C0EB1F801400EA7C3EEA3FFCEA0FF0133784AA15> I II<26FFC07FEB1FC0903AC1FFC07FF0903A C307E0C1F8D80FC49038F101FC9039C803F20001D801FE7F01D05BA201E05BB03CFFFE3F FF8FFFE0A3331B7D9A38>I<38FFC07E9038C1FF809038C30FC0D80FC413E0EBC80701D8 13F013D0A213E0B039FFFE3FFFA3201B7D9A25>II<38FFE1FE9038EFFF80 9038FE0FE0390FF803F09038F001F801E013FC140015FEA2157FA8157E15FEA215FC1401 01F013F89038F807F09038FC0FE09038EFFF809038E1FC0001E0C7FCA9EAFFFEA320277E 9A25>I<38FFC1F0EBC7FCEBC63E380FCC7F13D813D0A2EBF03EEBE000B0B5FCA3181B7F 9A1B>114 D<3803FE30380FFFF0EA3E03EA7800127000F01370A27E00FE1300EAFFE06C B4FC14C06C13E06C13F0000713F8C6FCEB07FC130000E0137C143C7E14387E6C137038FF 01E038E7FFC000C11300161B7E9A1B>I<13E0A41201A31203A21207120F381FFFE0B5FC A2380FE000AD1470A73807F0E0000313C03801FF8038007F0014267FA51A>I<39FFE07F F0A3000F1307B2140FA2000713173903F067FF3801FFC738007F87201B7D9A25>I<39FF FC03FFA3390FF000F0000714E07F0003EB01C0A2EBFC0300011480EBFE070000140013FF EB7F0EA2149EEB3F9C14FC6D5AA26D5AA36D5AA26D5AA2201B7F9A23>I<3BFFFC7FFC1F FCA33B0FE00FE001C02607F007EB0380A201F8EBF00700031600EC0FF801FC5C0001150E EC1FFC2600FE1C5B15FE9039FF387E3C017F1438EC787F6D486C5A16F0ECE01F011F5CA2 6D486C5AA2EC800701075CA22E1B7F9A31>I<39FFFC1FFEA33907F003803803F8079038 FC0F003801FE1E00005BEB7F3814F86D5A6D5A130F806D7E130F497EEB3CFEEB38FFEB78 7F9038F03F803901E01FC0D803C013E0EB800F39FFF03FFFA3201B7F9A23>I<39FFFC03 FFA3390FF000F0000714E07F0003EB01C0A2EBFC0300011480EBFE070000140013FFEB7F 0EA2149EEB3F9C14FC6D5AA26D5AA36D5AA26D5AA25CA21307003890C7FCEA7C0FEAFE0E 131E131C5BEA74F0EA3FE0EA0F8020277F9A23>I E %EndDVIPSBitmapFont %DVIPSBitmapFont: Ft cmtt10 10.95 93 /Ft 93 127 df<127012F8B012701200A5127012F8A31270051C779B18>33 DI I<13C01201A3EA03F0EA0FFCEA3FFEEA7DCFEA71C738E1C38013C7A338F1C0001279123F 6C7EEA0FF8EA01FC13DE13CF13C73861C38012F1A212E1EBC7001271EA79DEEA3FFEEA1F F8EA07E0EA01C0A3120011247D9F18>III<1238127CA2127E 123E120EA3121CA2123812F812F012C0070E789B18>I<137013F0EA01E0EA03C0EA0780 EA0F00121E121C5AA25AA45AA81270A47EA27E121E7EEA0780EA03C0EA01F0120013700C 24799F18>I<126012F012787E7E7EEA07801203EA01C0A2EA00E0A41370A813E0A4EA01 C0A2EA03801207EA0F00121E5A5A5A12600C247C9F18>II<136013F0A7387FFFC0B512E0A26C13C03800F000A7136013147E9718>I<121C 123E127E127F123F121F1207120E121E127C12F81260080C788518>I<387FFFC0B512E0 A26C13C013047E8F18>I<1230127812FCA2127812300606778518>I<1303EB0780A2130F 14005B131EA2133E133C137C1378A213F85B12015B12035BA212075B120F90C7FCA25A12 1E123E123CA2127C127812F85AA2126011247D9F18>IIIII<131F5B1377A213E7120113C7EA03 8712071307120E121E123C1238127812F0B512F8A338000700A6EB7FF0A3151C7F9B18> I<383FFF80A30038C7FCA8EA3BF8EA3FFE7F383C0780383003C0EA0001EB00E0A2126012 F0A238E001C0EA7003387C0F80383FFF00EA1FFCEA03F0131C7E9B18>I<137E48B4FC00 071380380F83C0EA1E03121C3838018090C7FC5AA2EAE1F8EAE7FEB5FC38FE078038F803 C0EAF001EB00E05AA21270A3383801C0EA3C03381E0780380FFF006C5AEA01F8131C7E9B 18>I<12E0B512E0A214C038E00380EB0700C65A131E131C5BA25B13F05BA2485AA3485A A448C7FCA7131D7E9C18>III<1230127812FCA2 127812301200A81230127812FCA2127812300614779318>I<1218123C127EA2123C1218 1200A81218123C127EA2123E121E120E121C123C127812F01260071A789318>I<14C0EB 03E01307EB1FC0EB3F80EBFE00485AEA07F0485AEA3F8048C7FC12FCA2127F6C7EEA0FE0 6C7EEA01FC6C7EEB3F80EB1FC0EB07E01303EB00C013187E9918>I<387FFFC0B512E0A2 6C13C0C8FCA4387FFFC0B512E0A26C13C0130C7E9318>I<126012F87E127F6C7EEA0FE0 6C7EEA01FC6C7EEB3F80EB1FC0EB07E0A2EB1FC0EB3F80EBFE00485AEA07F0485AEA3F80 48C7FC12FC5A126013187E9918>II<137CEA01 FEEA07FF380F8780381E03C0EA3C1DEA387F3870FFE0EA71E313C112E1EAE380A638E1C1 C0127113E33870FF8038387F00EA3C1C381E00E0EA0F833807FFC00001138038007E0013 1C7E9B18>I<137013F8A213D8A2EA01DCA3138CEA038EA4EA0707A5380FFF80A3EA0E03 381C01C0A3387F07F000FF13F8007F13F0151C7F9B18>IIIIII<38 01F1C0EA03FDEA0FFFEA1F0FEA1C03123813011270A290C7FC5AA5EB0FF0131F130F3870 01C0A213031238A2EA1C07EA1F0FEA0FFFEA03FDEA01F1141C7E9B18>I<387F07F038FF 8FF8387F07F0381C01C0A9EA1FFFA3EA1C01AA387F07F038FF8FF8387F07F0151C7F9B18 >II<387F07F038 FF87F8387F07F0381C03C0EB07801400130E131E5B13385B13F0121DA2EA1FB8A2131C12 1EEA1C0EA27FA2EB0380A2EB01C0387F03F038FF87F8387F03F0151C7F9B18>75 DI<38FC01F8EAFE03A2383B06E0A4 138EA2EA398CA213DCA3EA38D8A213F81370A21300A638FE03F8A3151C7F9B18>I<387E 07F038FF0FF8387F07F0381D81C0A313C1121CA213E1A313611371A213311339A31319A2 131D130DA3EA7F07EAFF87EA7F03151C7F9B18>II< EAFFFEEBFF8014C0EA1C03EB01E013001470A514E01301EB03C0EA1FFF1480EBFE00001C C7FCA8B47EA3141C7F9B18>III<3803F1C0 EA1FFF5AEA7C0FEA7003EAE001A390C7FC12701278123FEA1FF0EA07FEC67EEB0F80EB03 C01301EB00E0A2126012E0130100F013C038F80780B5FCEBFE00EAE7F8131C7E9B18>I< 387FFFF8B5FCA238E07038A400001300B2EA07FFA3151C7F9B18>I<38FF83FEA3381C00 70B36C13E0EA0F01380783C03803FF806C1300EA007C171C809B18>I<38FE03F8EAFF07 EAFE03383C01E0001C13C0A3EA1E03000E1380A438070700A4EA038EA4EA018C13DCA3EA 00D813F8A21370151C7F9B18>I<38FE03F8A338700070A36C13E0A513F8EA39FC13DCA2 001913C0A3138CA2EA1D8DA31305000D1380EA0F07A2EA0E03151C7F9B18>I<387F0FE0 139F130F380E0700120FEA070E138EEA039C13DCEA01F8A212005B137013F07F487E13DC EA039E138EEA070F7F000E13801303001E13C0387F07F000FF13F8007F13F0151C7F9B18 >I<38FE03F8EAFF07EAFE03381C01C0EA1E03000E1380EA0F0700071300A2EA038EA2EA 01DCA3EA00F8A21370A9EA01FC487E6C5A151C7F9B18>I<383FFFE05AA2387001C01303 EB07801400C65A131E131C133C5B137013F0485A5B1203485A90C7FC5A001E13E0121C12 3C5A1270B5FCA3131C7E9B18>II<126012 F0A27E1278127C123CA2123E121E121F7EA27F12077F1203A27F12017F12007F1378A213 7C133C133E131EA2131F7F14801307A2EB030011247D9F18>III<387F FFC0B512E0A26C13C013047E7F18>I<1206121E123E12381270A212E0A312F812FC127C A21238070E789E18>II<127E12FE127E 120EA5133EEBFF80000F13C0EBC1E01380EB0070120E1438A6000F1370A2EB80E013C1EB FFC0000E138038063E00151C809B18>IIIII<3801E1F03807FFF85A381E1E30381C0E00487EA5EA 1C0EEA1E1EEA1FFC5BEA39E00038C7FC7EEA1FFEEBFFC04813E0387801F0387000704813 38A4007813F0EA7E03381FFFC06C13803801FC00151F7F9318>I<127E12FE127E120EA5 133EEBFF80000F13C013C1EB80E01300120EAB387FC7FC38FFE7FE387FC7FC171C809B18 >II<1338 137CA313381300A4EA0FFCA3EA001CB3A4EA6038EAF078EAFFF0EA7FE0EA3F800E277E9C 18>I<127E12FE127E120EA5EB3FF0A3EB0780EB0F00131E5B5B5BEA0FF87F139C130EEA 0E0F7FEB038014C0387FC7F812FF127F151C7F9B18>II<38F9C1C038FFF7F013FF383E3E38EA3C3CA2EA3838AB38FE3E3EEB7E7EEB 3E3E1714809318>III< EA7E3E38FEFF80007F13C0380FC1E01380EB0070120E1438A6000F1370A2EB80E013C1EB FFC0000E1380EB3E0090C7FCA7EA7FC0487E6C5A151E809318>I<3801F380EA07FBEA1F FFEA3E1FEA380FEA7007A2EAE003A6EA7007A2EA380FEA3C1FEA1FFFEA0FFBEA03E3EA00 03A7EB1FF0EB3FF8EB1FF0151E7E9318>I<38FF0FC0EB3FE0EB7FF0EA07F0EBE060EBC0 005BA290C7FCA9EAFFFC7F5B14147E9318>II<487E1203A4387FFFC0B5FCA238038000A9144014E0A33801C1C013FF6C1380 EB3E0013197F9818>I<387E07E0EAFE0FEA7E07EA0E00AC1301EA0F033807FFFC6C13FE 3801FCFC1714809318>I<387F8FF000FF13F8007F13F0381C01C0380E0380A338070700 A3138FEA038EA3EA01DCA3EA00F8A2137015147F9318>I<38FF07F8138F1307383800E0 A4381C01C0137113F9A213D9EA1DDD000D1380A3138DEA0F8FA23807070015147F9318> I<387F8FF0139F138F380F0700EA078EEA039EEA01DC13F81200137013F07FEA01DCEA03 9E138EEA0707000E1380387F8FF000FF13F8007F13F015147F9318>I<387F8FF000FF13 F8007F13F0380E01C0EB0380A21207EB0700A2EA0387A2138EEA01CEA213CC120013DC13 78A31370A313F05B1279EA7BC0EA7F806CC7FC121E151E7F9318>I<383FFFF05AA23870 01E0EB03C0EB078038000F00131E5B13F8485AEA03C0485A380F0070121E5A5AB512F0A3 14147F9318>II<126012F0B3B012600424769F18>I<127CB4FC13C0 1203C67EAB7FEB7FC0EB3FE0A2EB7FC0EBF0005BABEA03C012FF90C7FC127C13247E9F18 >II E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fu cmr10 10.95 82 /Fu 82 123 df<90381F83E09038F06E303901C07878380380F8903800F03048EB7000A7 B612803907007000B2383FE3FF1D20809F1B>11 D<133FEBE0C0EA01C0380381E0EA0701 A290C7FCA6B512E0EA0700B2383FC3FC1620809F19>II<90381F81F89038F04F043901C07C063903 80F80FEB00F05A0270C7FCA6B7FC3907007007B23A3FE3FE3FE02320809F26>I<127012 F8A71270AA1220A51200A5127012F8A3127005217CA00D>33 D<1340A2EA03F0EA0C4EEA 10413820408012600040134038C041C01343A238E04180EB40001270127CEA3FC0EA1FF8 6C7EEA03FEEA007FEB4F801343EB41C0A2EAF040A312801480EA404100201300EA3042EA 0C4CEA03F0EA0040A312257EA117>36 DI<127012F812 FCA212741204A31208A21210A212201240060E7C9F0D>39 D<13401380EA01005A120612 04120C5AA212381230A212701260A412E0AC1260A412701230A212381218A27E12041206 7E7EEA008013400A2E7BA112>I<7E12407E12307E1208120C7EA212077EA213801201A4 13C0AC1380A412031300A25A1206A25A120812185A12205A5A0A2E7EA112>I<127012F0 12F8A212781208A31210A31220A21240050E7C840D>44 DI<12 7012F8A3127005057C840D>I<144014C0EB0180A3EB0300A31306A25BA35BA35BA25BA3 5BA3485AA348C7FCA21206A35AA35AA25AA35AA35AA2122D7EA117>II<13801203120F12F31203B3A6EA07C0EA7FFE0F1E7C9D17>III<1306A2130EA2131E132EA2134E138EA2EA010E1202A212041208A2121012 20A2124012C0B512F038000E00A7EBFFE0141E7F9D17>II<137CEA0182EA0701380E0380EA0C0712 183838030090C7FC12781270A2EAF1F0EAF21CEAF406EAF807EB0380A200F013C0A51270 A214801238EB07001218EA0C0E6C5AEA01F0121F7E9D17>I<1240387FFFE014C0A23840 008038800100A21302485AA25B5BA25BA21360A213E05B1201A41203A76C5A131F7E9D17 >III<127012F8A312701200AA127012F8A312700514 7C930D>I<127012F8A312701200AA127012F012F8A212781208A31210A31220A2124005 1D7C930D>I63 D<5B497EA3497EA3EB09E0A3EB10F0A3EB2078A3497EA2EBC03EEB801EA248B5FCEB000F A20002EB0780A348EB03C0A2120C001E14E039FF801FFE1F207F9F22>65 DI<90380FE0109038381C30 9038E002703803C00139078000F048C71270121E15305A1510127C127800F81400A91278 007C1410123CA26C1420A27E6C6C13406C6C13803900E00300EB380CEB0FF01C217E9F21 >IIII<90380FE02090 387818609038E004E03803800238070001481300001E1460A25A1520127C127800F81400 A7EC7FFCEC03E000781301127C123CA27EA27E7E380380023900E0046090387818209038 0FE0001E217D9F24>I<39FFF07FF8390F000780AD90B5FCEB0007AF39FFF07FF81D1F7E 9E22>II<3807FFC038003E00131EB3A3122012 F8A3EAF01CEA403CEA6038EA1070EA0FC012207F9E17>I<39FFF007FC390F0003E0EC01 80150014025C5C5C5C5C5C49C7FC5B497E130FEB13C0EB21E01341EB80F0EB0078A28080 A280EC0780A2EC03C015E015F039FFF01FFE1F1F7E9E23>IIIIII II<3803F040380C0CC0EA1803EA3001EA6000A212E01440A36C13007E127CEA7F80EA3F F86CB4FC00071380C613C0EB1FE013031301EB00F014707EA46C136014E06C13C038F801 8038C60300EA81FC14217E9F19>I<007FB512E038780F010060EB006000401420A200C0 143000801410A400001400B3497E3803FFFC1C1F7E9E21>I<39FFF00FF8390F0003E0EC 0080B3A46CEB01001380120314026C6C5A6C6C5AEB3830EB0FC01D207E9E22>I<39FFF0 03FE391F8000F86CC7126015206C6C1340A36C6C1380A2EBE00100011400A23800F002A2 13F8EB7804A26D5AA36D5AA2131F6D5AA2EB07C0A36D5AA36DC7FC1F207F9E22>I<3BFF F07FF81FF03B1F000FC007C06C903907800180170015C001805C00071502EC09E013C000 035DEC19F01410D801E05CA2EC2078D800F05CA2EC403C01785CA2EC801E017C1460013C 144090383D000F133F6D5CA2011E1307010E91C7FCA2010C7F010413022C207F9E2F>I< 397FF81FF8390FE007C03907C0030000031302EBE0063801F00400005BEBF818EB78106D 5AEB3E60EB1E406D5AA213076D7E497E1305EB08F0EB18F8EB1078EB207CEB603EEB401E EB801F3901000F801407000214C000061303001FEB07E039FFC01FFE1F1F7F9E22>I<39 FFF001FF391F800078000F146012076D1340000314807F3901F001001200EBF802EB7C06 EB3C04EB3E08131EEB1F10EB0FB0EB07A014E06D5AACEB3FFC201F7F9E22>I<387FFFFE 387E003C127800701378006013F814F0384001E0130314C0EB07801200EB0F00131EA25B 137C13785B1201EBE002EA03C0A2EA0780000F13061300001E1304003E130C123C48133C 14FCB5FC171F7E9E1C>I<12FFA212C0B3B3A512FFA2082D7CA10D>I<12FFA21203B3B3A5 12FFA2082D80A10D>93 D<120812101220A21240A21280A312B812FCA2127C1238060E7D 9F0D>96 DI<121C12FC121CAA137CEA1D87381E 0180EB00C0001C13E01470A21478A6147014F014E0001E13C0381A018038198700EA107C 15207E9F19>III< EA03F0EA0E1C487E487EA238700380A212F0B5FC00F0C7FCA41270A26C1380A2381C0100 EA0706EA01F811147F9314>I<137CEA01C6EA030F1207EA0E061300A7EAFFF0EA0E00B2 EA7FE01020809F0E>I<14E03803E330EA0E3CEA1C1C38380E00EA780FA5EA380E6C5AEA 1E38EA33E00020C7FCA21230A2EA3FFE381FFF8014C0383001E038600070481330A40060 13606C13C0381C03803803FC00141F7F9417>I<121C12FC121CAA137C1386EA1D03001E 1380A2121CAE38FF8FF014207E9F19>I<1238127CA31238C7FCA6121C12FC121CB1EAFF 80091F7F9E0C>I<13E0EA01F0A3EA00E01300A61370EA07F012001370B3A31260EAF060 13C0EA6180EA3F000C28829E0E>I<121C12FC121CAAEB1FE0EB0780EB060013045B5B5B 136013E0EA1DF0EA1E70EA1C38133C131C7F130F7F148014C038FF9FF014207E9F18>I< 121C12FC121CB3ABEAFF8009207F9F0C>I<391C3E03E039FCC30C30391D019018001EEB E01CA2001C13C0AE3AFF8FF8FF8021147E9326>IIII<3801F04038070CC0EA0E02EA1C03EA38011278127012 F0A6127012781238EA1C03EA0C05EA0709EA01F1EA0001A8EB0FF8151D7F9318>III<1202A31206A2120EA2123EEAFFF8EA0E00AB1304A5EA07081203EA01 F00E1C7F9B12>I<381C0380EAFC1FEA1C03AE1307120CEA061B3803E3F014147E9319>I< 38FF83F8383E00E0001C13C06C1380A338070100A21383EA0382A2EA01C4A213E4EA00E8 A21370A3132015147F9318>I<39FF9FE1FC393C078070391C030060EC8020000E1440A2 14C0D80704138014E0A239038861001471A23801D032143A143E3800E01CA2EB6018EB40 081E147F9321>I<38FF87F8381E03C0380E0180EB0300EA0702EA0384EA01C813D8EA00 F01370137813F8139CEA010E1202EA060738040380000C13C0003C13E038FE07FC16147F 9318>I<38FF83F8383E00E0001C13C06C1380A338070100A21383EA0382A2EA01C4A213 E4EA00E8A21370A31320A25BA3EAF080A200F1C7FC1262123C151D7F9318>II E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fv cmbx12 20.736 13 /Fv 13 118 df66 D77 D82 D97 D<903801FFF0010F13FE013FEBFF809039FF801FC03901FE003F4848EB7FE0485A 485A121F4848EB3FC0ED1F80007FEC0F004990C7FCA212FFAA127F7FA2123F6D14F0121F 6C6CEB01E012076C6CEB03C06CB4EB0F806C9038C03F0090383FFFFE010F13F8010113C0 24267DA52B>99 D<49B47E010F13F0017F13FC9038FF81FE3A03FE007F80D807F8133F48 48EB1FC0ED0FE0485A003F15F01507485A16F8A212FFA290B6FCA301C0C8FCA4127FA36C 7E1678121F7F000F15F06C6C13016C6CEB03E06C6CEB0FC03A00FFC07F8090393FFFFE00 010F13F8010013C025267DA52C>101 DI<13FE12FFA412071203B0EDFF80020313F0020F7F9138 1E03FC91383801FE02607F4A7E01FF15805C91C7FCA35BB3A4B5D8F83F13FEA42F3C7CBB 36>104 D<13FE12FFA412071203B3B3AEB512F8A4153C7DBB1A>108 D110 D<3901FC03F000FFEB0FFC4AB4FC91383C3F80EC707F00079038E0FFC000035BEBFD80A2 01FFEB7F809138003F00151E92C7FC5BB3A3B512FCA422267DA528>114 D<90383FF0383903FFFE7848EBFFF8381FC00F383F0003003E13005A157812FCA27E6C14 0013C013FC387FFFF06C13FEECFF806C14C06C14E0000314F0C614F8011F13FCEB007FEC 07FE0070130100F01300157E7EA27E157C6C14FC6C14F890388001F09038F00FE000F9B5 12C0D8F07F130038C01FF81F267DA526>I<01FEEC3F8000FFEC3FFFA400071401000380 B3A45DA25D120115066C6C4913C090267F807813FE6DB45A6D5B010313802F267CA536> 117 D E %EndDVIPSBitmapFont end %%EndProlog %%BeginSetup %%Feature: *Resolution 300dpi TeXDict begin %%BeginPaperSize: Letter letter %%EndPaperSize %%EndSetup %%Page: 1 1 1 0 bop 75 659 a Fv(Bash)32 b(Reference)g(Man)m(ual)p 75 692 1800 17 v 1181 741 a Fu(Reference)15 b(Do)q(cumen)o(tation)g (for)g(Bash)1146 795 y(Edition)h(2.5a,)e(for)g Ft(Bash)h Fu(V)l(ersion)h(2.05a.)1569 849 y(No)o(v)o(em)o(b)q(er)f(2001)75 2467 y Fs(Chet)22 b(Ramey)-6 b(,)23 b(Case)e(W)-6 b(estern)23 b(Reserv)n(e)f(Univ)n(ersit)n(y)75 2534 y(Brian)h(F)-6 b(o)n(x,)23 b(F)-6 b(ree)23 b(Soft)n(w)n(are)f(F)-6 b(oundation)p 75 2570 1800 9 v eop %%Page: 2 2 2 1 bop 75 2185 a Fu(Cop)o(yrigh)o(t)301 2184 y(c)289 2185 y Fr(\015)14 b Fu(1991-1999)f(F)l(ree)i(Soft)o(w)o(are)f(F)l (oundation,)h(Inc.)75 2253 y(P)o(ermission)i(is)f(gran)o(ted)g(to)f (mak)o(e)h(and)g(distribute)i(v)o(erbatim)d(copies)i(of)f(this)h(man)o (ual)f(pro)o(vided)h(the)75 2307 y(cop)o(yrigh)o(t)e(notice)h(and)f (this)h(p)q(ermission)g(notice)g(are)f(preserv)o(ed)h(on)f(all)h (copies.)75 2375 y(P)o(ermission)c(is)h(gran)o(ted)e(to)g(cop)o(y)h (and)g(distribute)h(mo)q(di\014ed)g(v)o(ersions)f(of)f(this)h(man)o (ual)g(under)h(the)f(con-)75 2430 y(ditions)k(for)e(v)o(erbatim)h(cop)o (ying,)g(pro)o(vided)h(that)e(the)h(en)o(tire)h(resulting)g(deriv)o(ed) g(w)o(ork)e(is)h(distributed)75 2484 y(under)h(the)f(terms)g(of)g(a)f (p)q(ermission)j(notice)f(iden)o(tical)h(to)e(this)g(one.)75 2552 y(P)o(ermission)i(is)g(gran)o(ted)f(to)g(cop)o(y)h(and)f (distribute)i(translations)f(of)f(this)h(man)o(ual)g(in)o(to)f(another) g(lan-)75 2606 y(guage,)e(under)h(the)f(ab)q(o)o(v)o(e)g(conditions)i (for)d(mo)q(di\014ed)j(v)o(ersions,)e(except)h(that)f(this)h(p)q (ermission)g(notice)75 2661 y(ma)o(y)f(b)q(e)i(stated)f(in)h(a)f (translation)g(appro)o(v)o(ed)g(b)o(y)g(the)g(F)l(ree)h(Soft)o(w)o(are) d(F)l(oundation.)p eop %%Page: 1 3 1 2 bop 75 -58 a Fu(Chapter)15 b(1:)k(In)o(tro)q(duction)1297 b(1)75 149 y Fq(1)41 b(In)n(tro)r(duction)75 328 y Fs(1.1)33 b(What)23 b(is)f(Bash?)137 424 y Fu(Bash)15 b(is)g(the)g(shell,)h(or)f (command)f(language)h(in)o(terpreter,)g(for)f(the)h Fp(gnu)f Fu(op)q(erating)h(system.)20 b(The)75 479 y(name)c(is)h(an)g(acron)o (ym)e(for)h(the)h(`)p Ft(Bourne-Again)c(SHell)p Fu(',)i(a)h(pun)h(on)g (Stephen)g(Bourne,)g(the)g(author)75 534 y(of)h(the)h(direct)h (ancestor)e(of)g(the)h(curren)o(t)g(Unix)h(shell)g Ft(/bin/sh)p Fu(,)e(whic)o(h)i(app)q(eared)f(in)h(the)f(Sev)o(en)o(th)75 589 y(Edition)d(Bell)h(Labs)f(Researc)o(h)e(v)o(ersion)i(of)e(Unix.)137 656 y(Bash)h(is)g(largely)g(compatible)h(with)f Ft(sh)f Fu(and)h(incorp)q(orates)g(useful)h(features)e(from)g(the)h(Korn)f (shell)75 711 y Ft(ksh)19 b Fu(and)g(the)g(C)g(shell)i Ft(csh)p Fu(.)31 b(It)19 b(is)h(in)o(tended)g(to)e(b)q(e)i(a)f (conforman)o(t)f(implemen)o(tation)i(of)f(the)g Fp(ieee)75 765 y(posix)j Fu(Shell)j(and)d(T)l(o)q(ols)h(sp)q(eci\014cation)i(\()p Fp(ieee)e Fu(W)l(orking)f(Group)h(1003.2\).)39 b(It)23 b(o\013ers)f(functional)75 820 y(impro)o(v)o(emen)o(ts)15 b(o)o(v)o(er)f Ft(sh)h Fu(for)g(b)q(oth)g(in)o(teractiv)o(e)h(and)f (programming)f(use.)137 888 y(While)j(the)e Fp(gnu)g Fu(op)q(erating)h(system)f(pro)o(vides)h(other)f(shells,)h(including)i (a)d(v)o(ersion)h(of)e Ft(csh)p Fu(,)h(Bash)75 942 y(is)i(the)g (default)g(shell.)26 b(Lik)o(e)17 b(other)f Fp(gnu)h Fu(soft)o(w)o(are,)e(Bash)h(is)i(quite)f(p)q(ortable.)24 b(It)17 b(curren)o(tly)g(runs)g(on)75 997 y(nearly)d(ev)o(ery)g(v)o (ersion)g(of)f(Unix)i(and)f(a)f(few)h(other)f(op)q(erating)h(systems)f Fr(\000)h Fu(indep)q(enden)o(tly-su)q(pp)q(orted)75 1052 y(p)q(orts)h(exist)g(for)g Fp(ms-dos)p Fu(,)g Fp(os/2)p Fu(,)f(Windo)o(ws)i Fp(95/98)p Fu(,)f(and)g(Windo)o(ws)h Fp(nt)p Fu(.)75 1181 y Fs(1.2)33 b(What)23 b(is)f(a)g(shell?)137 1277 y Fu(A)o(t)13 b(its)h(base,)f(a)g(shell)i(is)f(simply)g(a)f(macro) g(pro)q(cessor)g(that)g(executes)h(commands.)19 b(A)13 b(Unix)i(shell)f(is)75 1332 y(b)q(oth)d(a)f(command)g(in)o(terpreter,)i (whic)o(h)f(pro)o(vides)g(the)g(user)g(in)o(terface)f(to)g(the)h(ric)o (h)g(set)g(of)f Fp(gnu)g Fu(utilities,)75 1386 y(and)20 b(a)g(programming)f(language,)i(allo)o(wing)g(these)f(utilitites)h(to)f (b)q(e)g(com)o(bined.)35 b(Files)21 b(con)o(taining)75 1441 y(commands)15 b(can)g(b)q(e)g(created,)g(and)g(b)q(ecome)g (commands)g(themselv)o(es.)20 b(These)c(new)f(commands)f(ha)o(v)o(e)75 1496 y(the)g(same)g(status)f(as)g(system)h(commands)f(in)i(directories) g(suc)o(h)f(as)g(`)p Ft(/bin)p Fu(',)e(allo)o(wing)j(users)f(or)f (groups)75 1551 y(to)i(establish)h(custom)f(en)o(vironmen)o(ts.)137 1618 y(A)21 b(shell)h(allo)o(ws)f(execution)g(of)f Fp(gnu)h Fu(commands,)g(b)q(oth)g(sync)o(hronously)g(and)g(async)o(hronously)l (.)75 1673 y(The)15 b(shell)h(w)o(aits)e(for)g(sync)o(hronous)h (commands)f(to)g(complete)i(b)q(efore)f(accepting)g(more)f(input;)i (asyn-)75 1728 y(c)o(hronous)11 b(commands)g(con)o(tin)o(ue)h(to)f (execute)h(in)g(parallel)h(with)f(the)f(shell)i(while)g(it)f(reads)f (and)g(executes)75 1782 y(additional)18 b(commands.)25 b(The)17 b Fo(redirection)h Fu(constructs)e(p)q(ermit)i(\014ne-grained) g(con)o(trol)f(of)f(the)h(input)75 1837 y(and)c(output)f(of)g(those)g (commands.)19 b(Moreo)o(v)o(er,)11 b(the)h(shell)i(allo)o(ws)f(con)o (trol)f(o)o(v)o(er)g(the)g(con)o(ten)o(ts)g(of)g(com-)75 1892 y(mands')18 b(en)o(vironmen)o(ts.)30 b(Shells)20 b(ma)o(y)e(b)q(e)h(used)g(in)o(teractiv)o(ely)h(or)d(non-in)o(teractiv) o(ely:)28 b(they)19 b(accept)75 1947 y(input)d(t)o(yp)q(ed)g(from)e (the)h(k)o(eyb)q(oard)h(or)e(from)h(a)g(\014le.)137 2014 y(Shells)20 b(also)d(pro)o(vide)h(a)g(small)g(set)f(of)g(built-in)j (commands)e(\()p Fo(builtins)r Fu(\))h(implemen)o(ting)g(function-)75 2069 y(alit)o(y)g(imp)q(ossible)h(or)e(incon)o(v)o(enien)o(t)h(to)f (obtain)g(via)h(separate)f(utilities.)31 b(F)l(or)17 b(example,)j Ft(cd)p Fu(,)e Ft(break)p Fu(,)75 2124 y Ft(continue)p Fu(,)j(and)h Ft(exec)p Fu(\))e(cannot)h(b)q(e)h(implemen) o(ted)h(outside)e(of)g(the)g(shell)i(b)q(ecause)f(they)g(directly)75 2178 y(manipulate)d(the)g(shell)h(itself.)30 b(The)18 b Ft(history)p Fu(,)g Ft(getopts)p Fu(,)g Ft(kill)p Fu(,)g(or)g Ft(pwd)f Fu(builtins,)k(among)d(others,)75 2233 y(could)f(b)q(e)g (implemen)o(ted)i(in)e(separate)f(utilities,)i(but)f(they)f(are)g(more) g(con)o(v)o(enien)o(t)h(to)f(use)h(as)f(builtin)75 2288 y(commands.)k(All)c(of)f(the)g(shell)i(builtins)g(are)e(describ)q(ed)i (in)f(subsequen)o(t)g(sections.)137 2355 y(While)21 b(executing)f (commands)f(is)h(essen)o(tial,)h(most)e(of)f(the)i(p)q(o)o(w)o(er)f (\(and)g(complexit)o(y\))h(of)e(shells)75 2410 y(is)f(due)h(to)e(their) i(em)o(b)q(edded)g(programming)f(languages.)25 b(Lik)o(e)18 b(an)o(y)f(high-lev)o(el)i(language,)e(the)g(shell)75 2465 y(pro)o(vides)f(v)m(ariables,)g(\015o)o(w)f(con)o(trol)f (constructs,)h(quoting,)g(and)g(functions.)137 2532 y(Shells)e(o\013er) d(features)h(geared)g(sp)q(eci\014cally)j(for)d(in)o(teractiv)o(e)g (use)g(rather)g(than)g(to)f(augmen)o(t)h(the)g(pro-)75 2587 y(gramming)16 b(language.)22 b(These)17 b(in)o(teractiv)o(e)f (features)g(include)j(job)d(con)o(trol,)f(command)h(line)i(editing,)75 2642 y(history)d(and)h(aliases.)k(Eac)o(h)15 b(of)g(these)g(features)g (is)h(describ)q(ed)h(in)f(this)g(man)o(ual.)p eop %%Page: 2 4 2 3 bop 75 -58 a Fu(2)1308 b(Bash)15 b(Reference)h(Man)o(ual)p eop %%Page: 3 5 3 4 bop 75 -58 a Fu(Chapter)15 b(2:)k(De\014nitions)1332 b(3)75 149 y Fq(2)41 b(De\014nitions)137 263 y Fu(These)16 b(de\014nitions)h(are)e(used)g(throughout)g(the)g(remainder)h(of)f (this)h(man)o(ual.)75 342 y Ft(POSIX)120 b Fu(A)21 b(family)g(of)f(op)q (en)h(system)f(standards)g(based)h(on)f(Unix.)37 b(Bash)20 b(is)h(concerned)h(with)315 397 y Fp(posix)15 b Fu(1003.2,)e(the)i (Shell)i(and)f(T)l(o)q(ols)f(Standard.)75 475 y Ft(blank)120 b Fu(A)15 b(space)h(or)e(tab)h(c)o(haracter.)75 554 y Ft(builtin)72 b Fu(A)17 b(command)h(that)e(is)i(implemen)o(ted)i(in)o (ternally)e(b)o(y)g(the)f(shell)i(itself,)g(rather)e(than)g(b)o(y)315 609 y(an)e(executable)i(program)d(somewhere)h(in)h(the)f(\014le)h (system.)75 687 y Ft(control)e(operator)315 742 y Fu(A)e Ft(word)f Fu(that)g(p)q(erforms)h(a)f(con)o(trol)h(function.)19 b(It)12 b(is)h(a)e Ft(newline)g Fu(or)g(one)h(of)g(the)g(follo)o(wing:) 315 797 y(`)p Ft(||)p Fu(',)i(`)p Ft(&&)p Fu(',)g(`)p Ft(&)p Fu(',)f(`)p Ft(;)p Fu(',)h(`)p Ft(;;)p Fu(',)g(`)p Ft(|)p Fu(',)g(`)p Ft(\()p Fu(',)g(or)h(`)p Ft(\))p Fu('.)75 875 y Ft(exit)g(status)315 930 y Fu(The)f(v)m(alue)i(returned)e(b)o(y)h (a)e(command)i(to)e(its)h(caller.)21 b(The)15 b(v)m(alue)g(is)g (restricted)f(to)g(eigh)o(t)315 985 y(bits,)h(so)g(the)g(maxim)o(um)g (v)m(alue)i(is)f(255.)75 1063 y Ft(field)120 b Fu(A)14 b(unit)g(of)f(text)g(that)g(is)h(the)f(result)h(of)g(one)f(of)g(the)h (shell)h(expansions.)20 b(After)13 b(expansion,)315 1118 y(when)g(executing)h(a)f(command,)f(the)h(resulting)h(\014elds)g(are)f (used)g(as)f(the)h(command)g(name)315 1173 y(and)i(argumen)o(ts.)75 1251 y Ft(filename)48 b Fu(A)15 b(string)g(of)g(c)o(haracters)g(used)g (to)g(iden)o(tify)h(a)f(\014le.)75 1330 y Ft(job)168 b Fu(A)16 b(set)f(of)g(pro)q(cesses)h(comprising)g(a)g(pip)q(eline,)i (and)e(an)o(y)f(pro)q(cesses)h(descended)h(from)e(it,)315 1385 y(that)f(are)h(all)i(in)f(the)f(same)g(pro)q(cess)g(group.)75 1463 y Ft(job)g(control)315 1518 y Fu(A)c(mec)o(hanism)g(b)o(y)g(whic)o (h)h(users)f(can)g(selectiv)o(ely)i(stop)d(\(susp)q(end\))i(and)f (restart)e(\(resume\))315 1573 y(execution)16 b(of)f(pro)q(cesses.)75 1651 y Ft(metacharacter)315 1706 y Fu(A)e(c)o(haracter)f(that,)g(when)h (unquoted,)g(separates)f(w)o(ords.)18 b(A)13 b(metac)o(haracter)e(is)i (a)g Ft(blank)315 1761 y Fu(or)i(one)g(of)g(the)g(follo)o(wing)h(c)o (haracters:)j(`)p Ft(|)p Fu(',)14 b(`)p Ft(&)p Fu(',)g(`)p Ft(;)p Fu(',)g(`)p Ft(\()p Fu(',)g(`)p Ft(\))p Fu(',)g(`)p Ft(<)p Fu(',)f(or)i(`)p Ft(>)p Fu('.)75 1839 y Ft(name)144 b Fu(A)19 b Ft(word)f Fu(consisting)h(solely)h(of)e(letters,)h(n)o(um)o (b)q(ers,)h(and)e(underscores,)i(and)f(b)q(eginning)315 1894 y(with)12 b(a)f(letter)h(or)f(underscore.)19 b Ft(Name)p Fu(s)11 b(are)g(used)h(as)f(shell)i(v)m(ariable)g(and)f(function)g (names.)315 1949 y(Also)k(referred)f(to)f(as)h(an)g Ft(identifier)p Fu(.)75 2027 y Ft(operator)48 b Fu(A)19 b Ft(control)14 b(operator)k Fu(or)g(a)h Ft(redirection)13 b(operator)p Fu(.)30 b(See)20 b(Section)g(3.6)d([Redirec-)315 2082 y(tions],)e(page)g(22,)f(for)g(a)h(list)h(of)f(redirection)i(op)q (erators.)75 2161 y Ft(process)d(group)315 2215 y Fu(A)h(collection)i (of)e(related)h(pro)q(cesses)f(eac)o(h)h(ha)o(ving)f(the)g(same)g(pro)q (cess)h(group)f Fp(id)p Fu(.)75 2294 y Ft(process)f(group)h(ID)315 2349 y Fu(A)g(unique)i(iden)o(tifer)f(that)f(represen)o(ts)g(a)g Ft(process)f(group)h Fu(during)h(its)f(lifetime.)75 2427 y Ft(reserved)f(word)315 2482 y Fu(A)g Ft(word)g Fu(that)f(has)h(a)g (sp)q(ecial)i(meaning)f(to)f(the)g(shell.)21 b(Most)13 b(reserv)o(ed)i(w)o(ords)e(in)o(tro)q(duce)315 2537 y(shell)k(\015o)o (w)d(con)o(trol)h(constructs,)g(suc)o(h)g(as)g Ft(for)g Fu(and)g Ft(while)p Fu(.)75 2615 y Ft(return)f(status)315 2670 y Fu(A)h(synon)o(ym)g(for)g Ft(exit)f(status)p Fu(.)p eop %%Page: 4 6 4 5 bop 75 -58 a Fu(4)1308 b(Bash)15 b(Reference)h(Man)o(ual)75 149 y Ft(signal)96 b Fu(A)20 b(mec)o(hanism)h(b)o(y)f(whic)o(h)h(a)e (pro)q(cess)i(ma)o(y)e(b)q(e)i(noti\014ed)g(b)o(y)f(the)g(k)o(ernel)h (of)e(an)h(ev)o(en)o(t)315 204 y(o)q(ccurring)c(in)g(the)f(system.)75 284 y Ft(special)f(builtin)315 339 y Fu(A)f(shell)i(builtin)g(command)e (that)g(has)g(b)q(een)h(classi\014ed)h(as)e(sp)q(ecial)i(b)o(y)e(the)g Fp(posix)g Fu(1003.2)315 394 y(standard.)75 473 y Ft(token)120 b Fu(A)19 b(sequence)h(of)f(c)o(haracters)f(considered)j(a)d(single)j (unit)f(b)o(y)f(the)g(shell.)33 b(It)19 b(is)g(either)h(a)315 528 y Ft(word)15 b Fu(or)f(an)h Ft(operator)p Fu(.)75 608 y Ft(word)144 b Fu(A)15 b Ft(token)g Fu(that)f(is)i(not)f(an)g Ft(operator)p Fu(.)p eop %%Page: 5 7 5 6 bop 75 -58 a Fu(Chapter)15 b(3:)k(Basic)d(Shell)h(F)l(eatures)1145 b(5)75 149 y Fq(3)41 b(Basic)26 b(Shell)g(F)-7 b(eatures)137 281 y Fu(Bash)14 b(is)g(an)g(acron)o(ym)e(for)h(`)p Ft(Bourne-Again)h (SHell)p Fu('.)k(The)c(Bourne)g(shell)h(is)f(the)g(traditional)g(Unix) 75 336 y(shell)k(originally)h(written)e(b)o(y)f(Stephen)i(Bourne.)25 b(All)18 b(of)e(the)h(Bourne)g(shell)i(builtin)g(commands)d(are)75 391 y(a)o(v)m(ailable)f(in)f(Bash,)g(and)f(the)h(rules)g(for)f(ev)m (aluation)h(and)g(quoting)g(are)f(tak)o(en)g(from)f(the)i Fp(posix)f Fu(1003.2)75 446 y(sp)q(eci\014cation)k(for)e(the)g (`standard')f(Unix)i(shell.)137 518 y(This)h(c)o(hapter)f(brie\015y)h (summarizes)g(the)f(shell's)h(`building)h(blo)q(c)o(ks':)k(commands,)16 b(con)o(trol)g(struc-)75 573 y(tures,)i(shell)i(functions,)f(shell)h Fn(p)n(ar)n(ameters)p Fu(,)e(shell)i(expansions,)f Fn(r)n(e)n(dir)n(e)n (ctions)p Fu(,)e(whic)o(h)i(are)f(a)g(w)o(a)o(y)f(to)75 627 y(direct)f(input)g(and)g(output)f(from)f(and)h(to)g(named)g (\014les,)h(and)g(ho)o(w)e(the)i(shell)g(executes)g(commands.)75 768 y Fs(3.1)33 b(Shell)24 b(Syn)n(tax)137 869 y Fu(When)17 b(the)g(shell)h(reads)e(input,)h(it)g(pro)q(ceeds)g(through)f(a)g (sequence)i(of)e(op)q(erations.)24 b(If)16 b(the)h(input)75 924 y(indicates)f(the)f(b)q(eginning)i(of)e(a)f(commen)o(t,)h(the)g (shell)h(ignores)f(the)g(commen)o(t)g(sym)o(b)q(ol)g(\(`)p Ft(#)p Fu('\),)e(and)i(the)75 979 y(rest)g(of)g(that)f(line.)137 1051 y(Otherwise,)j(roughly)f(sp)q(eaking,)h(the)f(shell)i(reads)d(its) i(input)g(and)f(divides)i(the)e(input)h(in)o(to)f(w)o(ords)75 1106 y(and)c(op)q(erators,)f(emplo)o(ying)i(the)f(quoting)g(rules)h(to) e(select)i(whic)o(h)g(meanings)f(to)f(assign)h(v)m(arious)h(w)o(ords)75 1161 y(and)i(c)o(haracters.)137 1233 y(The)20 b(shell)h(then)e(parses)h (these)f(tok)o(ens)g(in)o(to)g(commands)g(and)h(other)f(constructs,)g (remo)o(v)o(es)g(the)75 1288 y(sp)q(ecial)e(meaning)e(of)g(certain)h(w) o(ords)e(or)g(c)o(haracters,)g(expands)i(others,)e(redirects)i(input)g (and)f(output)75 1342 y(as)d(needed,)i(executes)g(the)e(sp)q(eci\014ed) j(command,)e(w)o(aits)f(for)g(the)h(command's)f(exit)h(status,)f(and)h (mak)o(es)75 1397 y(that)h(exit)i(status)e(a)o(v)m(ailable)j(for)e (further)g(insp)q(ection)i(or)e(pro)q(cessing.)75 1519 y Fm(3.1.1)30 b(Shell)21 b(Op)r(eration)137 1620 y Fu(The)15 b(follo)o(wing)g(is)g(a)f(brief)h(description)h(of)e(the)h(shell's)g (op)q(eration)g(when)g(it)f(reads)h(and)f(executes)h(a)75 1675 y(command.)20 b(Basically)l(,)c(the)g(shell)g(do)q(es)g(the)f (follo)o(wing:)100 1747 y(1.)29 b(Reads)21 b(its)g(input)h(from)e(a)h (\014le)h(\(see)f(Section)h(3.8)e([Shell)j(Scripts],)g(page)e(29\),)g (from)f(a)h(string)165 1802 y(supplied)16 b(as)d(an)h(argumen)o(t)f(to) g(the)g(`)p Ft(-c)p Fu(')g(in)o(v)o(o)q(cation)h(option)g(\(see)g (Section)g(6.1)f([In)o(v)o(oking)h(Bash],)165 1857 y(page)h(59\),)f(or) h(from)f(the)h(user's)g(terminal.)100 1927 y(2.)29 b(Breaks)21 b(the)g(input)i(in)o(to)e(w)o(ords)g(and)g(op)q(erators,)h(ob)q(eying)g (the)f(quoting)h(rules)g(describ)q(ed)h(in)165 1981 y(Section)14 b(3.1.2)e([Quoting],)h(page)g(6.)19 b(These)14 b(tok)o(ens)e(are)h (separated)g(b)o(y)h Ft(metacharacters)p Fu(.)j(Alias)165 2036 y(expansion)f(is)g(p)q(erformed)f(b)o(y)g(this)h(step)f(\(see)g (Section)h(6.6)f([Aliases],)g(page)g(67\).)100 2106 y(3.)29 b(P)o(arses)16 b(the)i(tok)o(ens)f(in)o(to)g(simple)h(and)g(comp)q (ound)g(commands)f(\(see)g(Section)h(3.2)f([Shell)h(Com-)165 2161 y(mands],)c(page)i(7\).)100 2230 y(4.)29 b(P)o(erforms)19 b(the)h(v)m(arious)h(shell)h(expansions)f(\(see)f(Section)h(3.5)e ([Shell)j(Expansions],)f(page)f(15\),)165 2285 y(breaking)e(the)g (expanded)g(tok)o(ens)f(in)o(to)h(lists)g(of)f(\014lenames)i(\(see)e (Section)i(3.5.8)d([Filename)i(Ex-)165 2340 y(pansion],)d(page)g(20\))g (and)g(commands)g(and)g(argumen)o(ts.)100 2410 y(5.)29 b(P)o(erforms)17 b(an)o(y)h(necessary)h(redirections)h(\(see)e(Section) h(3.6)f([Redirections],)h(page)f(22\))f(and)i(re-)165 2464 y(mo)o(v)o(es)14 b(the)i(redirection)g(op)q(erators)e(and)i(their) g(op)q(erands)f(from)g(the)g(argumen)o(t)f(list.)100 2534 y(6.)29 b(Executes)16 b(the)f(command)g(\(see)g(Section)h(3.7)e ([Executing)i(Commands],)e(page)h(25\).)100 2604 y(7.)29 b(Optionally)21 b(w)o(aits)e(for)g(the)h(command)f(to)g(complete)i(and) e(collects)i(its)f(exit)g(status)f(\(see)g(Sec-)165 2659 y(tion)c(3.7.5)f([Exit)h(Status],)f(page)h(28\).)p eop %%Page: 6 8 6 7 bop 75 -58 a Fu(6)1308 b(Bash)15 b(Reference)h(Man)o(ual)75 149 y Fm(3.1.2)30 b(Quoting)137 246 y Fu(Quoting)13 b(is)f(used)h(to)e (remo)o(v)o(e)g(the)h(sp)q(ecial)i(meaning)f(of)e(certain)i(c)o (haracters)e(or)g(w)o(ords)g(to)h(the)g(shell.)75 301 y(Quoting)i(can)g(b)q(e)g(used)h(to)e(disable)i(sp)q(ecial)g(treatmen)o (t)e(for)g(sp)q(ecial)j(c)o(haracters,)c(to)h(prev)o(en)o(t)h(reserv)o (ed)75 356 y(w)o(ords)g(from)h(b)q(eing)h(recognized)h(as)e(suc)o(h,)g (and)g(to)g(prev)o(en)o(t)g(parameter)f(expansion.)137 424 y(Eac)o(h)d(of)g(the)g(shell)h(metac)o(haracters)e(\(see)h(Chapter) f(2)h([De\014nitions],)h(page)f(3\))f(has)h(sp)q(ecial)h(meaning)75 479 y(to)19 b(the)h(shell)h(and)f(m)o(ust)f(b)q(e)h(quoted)g(if)g(it)g (is)h(to)e(represen)o(t)g(itself.)35 b(When)20 b(the)f(command)h (history)75 533 y(expansion)g(facilities)h(are)e(b)q(eing)i(used,)f (the)f Fo(history)g(expansion)h Fu(c)o(haracter,)f(usually)i(`)p Ft(!)p Fu(',)e(m)o(ust)f(b)q(e)75 588 y(quoted)g(to)g(prev)o(en)o(t)g (history)h(expansion.)30 b(See)19 b(Section)h(9.1)d([Bash)h(History)g (F)l(acilities],)j(page)d(103,)75 643 y(for)g(more)f(details)i (concerning)h(history)e(expansion.)30 b(There)18 b(are)g(three)g (quoting)g(mec)o(hanisms:)27 b(the)75 698 y Fo(escap)q(e)16 b(c)o(haracter)p Fu(,)e(single)j(quotes,)d(and)h(double)i(quotes.)75 811 y Fm(3.1.2.1)30 b(Escap)r(e)20 b(Character)137 908 y Fu(A)14 b(non-quoted)g(bac)o(kslash)g(`)p Ft(\\)p Fu(')e(is)j(the)e (Bash)h(escap)q(e)g(c)o(haracter.)19 b(It)13 b(preserv)o(es)h(the)g (literal)h(v)m(alue)f(of)75 963 y(the)f(next)h(c)o(haracter)e(that)h (follo)o(ws,)g(with)h(the)f(exception)i(of)e Ft(newline)p Fu(.)18 b(If)13 b(a)g Ft(\\newline)g Fu(pair)g(app)q(ears,)75 1018 y(and)i(the)h(bac)o(kslash)f(itself)i(is)e(not)g(quoted,)g(the)h Ft(\\newline)e Fu(is)i(treated)e(as)h(a)g(line)i(con)o(tin)o(uation)f (\(that)75 1072 y(is,)f(it)h(is)f(remo)o(v)o(ed)g(from)g(the)g(input)h (stream)e(and)i(e\013ectiv)o(ely)g(ignored\).)75 1186 y Fm(3.1.2.2)30 b(Single)20 b(Quotes)137 1283 y Fu(Enclosing)g(c)o (haracters)d(in)i(single)g(quotes)f(\(`)p Ft(')p Fu('\))e(preserv)o(es) i(the)g(literal)i(v)m(alue)f(of)f(eac)o(h)g(c)o(haracter)75 1338 y(within)c(the)e(quotes.)19 b(A)12 b(single)i(quote)e(ma)o(y)g (not)g(o)q(ccur)g(b)q(et)o(w)o(een)h(single)h(quotes,)e(ev)o(en)h(when) g(preceded)75 1392 y(b)o(y)i(a)g(bac)o(kslash.)75 1506 y Fm(3.1.2.3)30 b(Double)20 b(Quotes)137 1603 y Fu(Enclosing)g(c)o (haracters)d(in)i(double)g(quotes)f(\(`)p Ft(")p Fu('\))f(preserv)o(es) h(the)g(literal)i(v)m(alue)f(of)f(all)h(c)o(haracters)75 1657 y(within)f(the)e(quotes,)g(with)g(the)h(exception)g(of)f(`)p Ft($)p Fu(',)f(`)p Ft(`)p Fu(',)h(and)g(`)p Ft(\\)p Fu('.)22 b(The)17 b(c)o(haracters)e(`)p Ft($)p Fu(')h(and)g(`)p Ft(`)p Fu(')g(retain)75 1712 y(their)j(sp)q(ecial)h(meaning)e(within)i (double)f(quotes)f(\(see)g(Section)h(3.5)f([Shell)h(Expansions],)g (page)f(15\).)75 1767 y(The)d(bac)o(kslash)h(retains)f(its)g(sp)q (ecial)i(meaning)f(only)g(when)g(follo)o(w)o(ed)f(b)o(y)g(one)g(of)g (the)g(follo)o(wing)h(c)o(har-)75 1822 y(acters:)26 b(`)p Ft($)p Fu(',)18 b(`)p Ft(`)p Fu(',)f(`)p Ft(")p Fu(',)h(`)p Ft(\\)p Fu(',)g(or)g Ft(newline)p Fu(.)28 b(Within)20 b(double)g(quotes,)e(bac)o(kslashes)h(that)f(are)g(follo)o(w)o(ed)75 1877 y(b)o(y)g(one)g(of)g(these)g(c)o(haracters)f(are)h(remo)o(v)o(ed.) 27 b(Bac)o(kslashes)19 b(preceding)g(c)o(haracters)f(without)g(a)f(sp)q (e-)75 1931 y(cial)g(meaning)g(are)f(left)g(unmo)q(di\014ed.)25 b(A)16 b(double)i(quote)e(ma)o(y)f(b)q(e)i(quoted)f(within)i(double)f (quotes)f(b)o(y)75 1986 y(preceding)h(it)e(with)h(a)f(bac)o(kslash.)137 2054 y(The)21 b(sp)q(ecial)i(parameters)d(`)p Ft(*)p Fu(')g(and)h(`)p Ft(@)p Fu(')e(ha)o(v)o(e)i(sp)q(ecial)h(meaning)g (when)f(in)g(double)h(quotes)f(\(see)75 2109 y(Section)16 b(3.5.3)e([Shell)i(P)o(arameter)e(Expansion],)h(page)g(17\).)75 2222 y Fm(3.1.2.4)30 b(ANSI-C)21 b(Quoting)137 2319 y Fu(W)l(ords)e(of)f(the)h(form)f Ft($')p Fo(string)t Ft(')g Fu(are)h(treated)f(sp)q(ecially)l(.)34 b(The)19 b(w)o(ord)f(expands)h (to)f Fo(string)p Fu(,)i(with)75 2374 y(bac)o(kslash-escap)q(ed)j(c)o (haracters)e(replaced)i(as)e(sp)q(eci\014ed)j(b)o(y)e(the)g(ANSI)g(C)g (standard.)39 b(Bac)o(kslash)75 2429 y(escap)q(e)16 b(sequences,)g(if)g (presen)o(t,)e(are)h(deco)q(ded)i(as)e(follo)o(ws:)75 2509 y Ft(\\a)192 b Fu(alert)15 b(\(b)q(ell\))75 2590 y Ft(\\b)192 b Fu(bac)o(kspace)75 2670 y Ft(\\e)g Fu(an)15 b(escap)q(e)h(c)o(haracter)f(\(not)f(ANSI)i(C\))p eop %%Page: 7 9 7 8 bop 75 -58 a Fu(Chapter)15 b(3:)k(Basic)d(Shell)h(F)l(eatures)1145 b(7)75 149 y Ft(\\f)192 b Fu(form)14 b(feed)75 239 y Ft(\\n)192 b Fu(newline)75 328 y Ft(\\r)g Fu(carriage)15 b(return)75 418 y Ft(\\t)192 b Fu(horizon)o(tal)16 b(tab)75 507 y Ft(\\v)192 b Fu(v)o(ertical)16 b(tab)75 597 y Ft(\\\\)192 b Fu(bac)o(kslash)75 686 y Ft(\\')g Fu(single)17 b(quote)75 776 y Ft(\\)p Fo(nnn)141 b Fu(the)15 b(eigh)o(t-bit)h(c)o(haracter)f (whose)g(v)m(alue)h(is)g(the)f(o)q(ctal)h(v)m(alue)g Fo(nnn)g Fu(\(one)f(to)g(three)g(digits\))75 865 y Ft(\\x)p Fo(HH)124 b Fu(the)18 b(eigh)o(t-bit)h(c)o(haracter)e(whose)h(v)m(alue) h(is)f(the)g(hexadecimal)i(v)m(alue)f Fo(HH)k Fu(\(one)18 b(or)f(t)o(w)o(o)315 920 y(hex)f(digits\))75 1014 y(The)f(expanded)i (result)e(is)h(single-quoted,)g(as)f(if)h(the)f(dollar)h(sign)g(had)f (not)g(b)q(een)h(presen)o(t.)75 1146 y Fm(3.1.2.5)30 b(Lo)r(cale-Sp)r(eci\014c)20 b(T)-5 b(ranslation)137 1252 y Fu(A)16 b(double-quoted)g(string)g(preceded)g(b)o(y)f(a)g (dollar)h(sign)g(\(`)p Ft($)p Fu('\))e(will)j(cause)e(the)h(string)f (to)g(b)q(e)g(trans-)75 1307 y(lated)h(according)h(to)e(the)i(curren)o (t)e(lo)q(cale.)24 b(If)16 b(the)h(curren)o(t)f(lo)q(cale)h(is)f Ft(C)g Fu(or)g Ft(POSIX)p Fu(,)f(the)h(dollar)h(sign)f(is)75 1362 y(ignored.)k(If)c(the)f(string)g(is)h(translated)f(and)g (replaced,)h(the)g(replacemen)o(t)g(is)f(double-quoted.)137 1439 y(Some)c(systems)e(use)i(the)g(message)e(catalog)h(selected)i(b)o (y)e(the)g Ft(LC_MESSAGES)f Fu(shell)j(v)m(ariable.)20 b(Others)75 1493 y(create)e(the)h(name)f(of)g(the)h(message)f(catalog)g (from)g(the)g(v)m(alue)i(of)e(the)h Ft(TEXTDOMAIN)e Fu(shell)j(v)m (ariable,)75 1548 y(p)q(ossibly)d(adding)g(a)e(su\016x)h(of)f(`)p Ft(.mo)p Fu('.)21 b(If)16 b(y)o(ou)f(use)h(the)g Ft(TEXTDOMAIN)e Fu(v)m(ariable,)j(y)o(ou)e(ma)o(y)g(need)i(to)e(set)75 1603 y(the)c Ft(TEXTDOMAINDIR)e Fu(v)m(ariable)k(to)d(the)i(lo)q (cation)f(of)g(the)g(message)g(catalog)f(\014les.)20 b(Still)13 b(others)d(use)i(b)q(oth)75 1658 y(v)m(ariables)17 b(in)f(this)f(fashion:)20 b Ft(TEXTDOMAINDIR)p Fu(/)p Ft(LC_MESSAGES)p Fu(/LC)p 1264 1658 14 2 v 13 w(MESSA)o(GES/)p Ft(TEXTDOMAIN)p Fu(.mo.)75 1789 y Fm(3.1.3)30 b(Commen)n(ts)137 1895 y Fu(In)19 b(a)e(non-in)o(teractiv)o(e)i(shell,)h(or)d(an)h(in)o (teractiv)o(e)g(shell)h(in)g(whic)o(h)g(the)f Ft(interactive_comments) 75 1950 y Fu(option)h(to)f(the)h Ft(shopt)e Fu(builtin)k(is)f(enabled)g (\(see)e(Section)i(4.2)d([Bash)i(Builtins],)i(page)d(36\),)g(a)h(w)o (ord)75 2005 y(b)q(eginning)c(with)f(`)p Ft(#)p Fu(')e(causes)h(that)g (w)o(ord)f(and)i(all)g(remaining)g(c)o(haracters)e(on)h(that)g(line)h (to)f(b)q(e)h(ignored.)75 2060 y(An)22 b(in)o(teractiv)o(e)g(shell)h (without)f(the)g Ft(interactive_comments)d Fu(option)i(enabled)i(do)q (es)f(not)g(allo)o(w)75 2115 y(commen)o(ts.)k(The)18 b Ft(interactive_comments)d Fu(option)j(is)g(on)f(b)o(y)h(default)g(in) g(in)o(teractiv)o(e)g(shells.)28 b(See)75 2169 y(Section)15 b(6.3)f([In)o(teractiv)o(e)g(Shells],)i(page)e(63,)f(for)h(a)g (description)i(of)e(what)g(mak)o(es)g(a)g(shell)i(in)o(teractiv)o(e.)75 2323 y Fs(3.2)33 b(Shell)24 b(Commands)137 2429 y Fu(A)16 b(simple)i(shell)g(command)e(suc)o(h)g(as)g Ft(echo)e(a)h(b)g(c)h Fu(consists)h(of)e(the)i(command)f(itself)h(follo)o(w)o(ed)f(b)o(y)75 2483 y(argumen)o(ts,)e(separated)h(b)o(y)g(spaces.)137 2560 y(More)g(complex)h(shell)i(commands)d(are)g(comp)q(osed)h(of)f (simple)i(commands)e(arranged)g(together)g(in)75 2615 y(a)g(v)m(ariet)o(y)g(of)g(w)o(a)o(ys:)k(in)d(a)f(pip)q(eline)k(in)d (whic)o(h)g(the)f(output)g(of)g(one)h(command)f(b)q(ecomes)h(the)f (input)h(of)75 2670 y(a)f(second,)g(in)h(a)f(lo)q(op)h(or)f (conditional)h(construct,)f(or)g(in)h(some)f(other)f(grouping.)p eop %%Page: 8 10 8 9 bop 75 -58 a Fu(8)1308 b(Bash)15 b(Reference)h(Man)o(ual)75 149 y Fm(3.2.1)30 b(Simple)21 b(Commands)137 244 y Fu(A)14 b(simple)h(command)e(is)h(the)f(kind)i(of)e(command)g(encoun)o(tered)h (most)f(often.)19 b(It's)13 b(just)g(a)g(sequence)75 299 y(of)g(w)o(ords)g(separated)g(b)o(y)g Ft(blank)p Fu(s,)g(terminated)g(b)o(y)g(one)h(of)f(the)g(shell's)i(con)o(trol)e (op)q(erators)f(\(see)i(Chap-)75 354 y(ter)j(2)f([De\014nitions],)i (page)e(3\).)25 b(The)17 b(\014rst)f(w)o(ord)g(generally)j(sp)q (eci\014es)f(a)f(command)g(to)f(b)q(e)h(executed,)75 408 y(with)f(the)f(rest)g(of)f(the)i(w)o(ords)e(b)q(eing)j(that)d (command's)h(argumen)o(ts.)137 474 y(The)i(return)f(status)f(\(see)h (Section)h(3.7.5)e([Exit)h(Status],)f(page)h(28\))g(of)f(a)h(simple)i (command)e(is)h(its)75 529 y(exit)i(status)e(as)h(pro)o(vided)i(b)o(y)e (the)g Fp(posix)g Fu(1003.1)f Ft(waitpid)h Fu(function,)h(or)f(128)p Ft(+)p Fo(n)g Fu(if)h(the)f(command)75 584 y(w)o(as)c(terminated)i(b)o (y)f(signal)h Fo(n)p Fu(.)75 691 y Fm(3.2.2)30 b(Pip)r(elines)137 785 y Fu(A)16 b Ft(pipeline)e Fu(is)h(a)g(sequence)i(of)d(simple)j (commands)e(separated)g(b)o(y)g(`)p Ft(|)p Fu('.)137 851 y(The)h(format)e(for)g(a)h(pip)q(eline)j(is)195 913 y Ft([time)23 b([-p]])g([!])h Fo(command1)j Ft([|)d Fo(command2)j Ft(...)o(])75 979 y Fu(The)19 b(output)f(of)g(eac)o(h)g(command)h(in)g (the)f(pip)q(elin)q(e)j(is)e(connected)g(via)g(a)f(pip)q(e)i(to)e(the)g (input)i(of)e(the)75 1034 y(next)d(command.)20 b(That)15 b(is,)g(eac)o(h)g(command)g(reads)g(the)h(previous)g(command's)e (output.)137 1099 y(The)19 b(reserv)o(ed)f(w)o(ord)g Ft(time)f Fu(causes)i(timing)g(statistics)f(to)g(b)q(e)h(prin)o(ted)g (for)e(the)i(pip)q(eline)i(once)e(it)75 1154 y(\014nishes.)27 b(The)17 b(statistics)g(curren)o(tly)h(consist)f(of)g(elapsed)h(\(w)o (all-clo)q(c)o(k\))g(time)g(and)f(user)g(and)g(system)75 1209 y(time)h(consumed)g(b)o(y)g(the)g(command's)f(execution.)29 b(The)18 b(`)p Ft(-p)p Fu(')e(option)i(c)o(hanges)g(the)g(output)f (format)75 1264 y(to)g(that)h(sp)q(eci\014ed)i(b)o(y)e Fp(posix)p Fu(.)27 b(The)19 b Ft(TIMEFORMAT)d Fu(v)m(ariable)k(ma)o(y)d (b)q(e)h(set)g(to)f(a)h(format)f(string)h(that)75 1319 y(sp)q(eci\014es)e(ho)o(w)e(the)h(timing)g(information)g(should)g(b)q (e)g(displa)o(y)o(ed.)21 b(See)15 b(Section)h(5.2)d([Bash)i(V)l (ariables],)75 1373 y(page)f(51,)f(for)h(a)g(description)h(of)f(the)g (a)o(v)m(ailable)i(formats.)i(The)c(use)h(of)f Ft(time)f Fu(as)h(a)g(reserv)o(ed)g(w)o(ord)f(p)q(er-)75 1428 y(mits)h(the)g (timing)h(of)e(shell)j(builtins,)g(shell)f(functions,)g(and)f(pip)q (elines.)22 b(An)14 b(external)h Ft(time)e Fu(command)75 1483 y(cannot)i(time)h(these)f(easily)l(.)137 1549 y(If)e(the)g(pip)q (eline)i(is)f(not)e(executed)h(async)o(hronously)g(\(see)f(Section)i (3.2.3)d([Lists],)h(page)h(8\),)f(the)g(shell)75 1603 y(w)o(aits)j(for)f(all)i(commands)f(in)h(the)g(pip)q(eline)i(to)d (complete.)137 1669 y(Eac)o(h)e(command)f(in)h(a)g(pip)q(eline)j(is)d (executed)g(in)g(its)g(o)o(wn)f(subshell)j(\(see)d(Section)i(3.7.3)d ([Command)75 1724 y(Execution)19 b(En)o(vironmen)o(t],)f(page)f(26\).) 27 b(The)18 b(exit)h(status)e(of)g(a)h(pip)q(eline)j(is)d(the)g(exit)g (status)f(of)h(the)75 1778 y(last)c(command)f(in)i(the)f(pip)q(eline.) 22 b(If)14 b(the)g(reserv)o(ed)g(w)o(ord)f(`)p Ft(!)p Fu(')f(precedes)j(the)f(pip)q(eline,)j(the)d(exit)g(status)75 1833 y(is)i(the)f(logical)h(negation)g(of)f(the)g(exit)g(status)g(of)g (the)g(last)g(command.)75 1940 y Fm(3.2.3)30 b(Lists)20 b(of)g(Commands)137 2035 y Fu(A)15 b Ft(list)f Fu(is)h(a)g(sequence)h (of)e(one)h(or)f(more)g(pip)q(elines)k(separated)c(b)o(y)h(one)g(of)f (the)h(op)q(erators)f(`)p Ft(;)p Fu(',)f(`)p Ft(&)p Fu(',)75 2090 y(`)p Ft(&&)p Fu(',)h(or)g(`)p Ft(||)p Fu(',)g(and)i(optionally)g (terminated)f(b)o(y)h(one)f(of)g(`)p Ft(;)p Fu(',)f(`)p Ft(&)p Fu(',)f(or)i(a)g Ft(newline)p Fu(.)137 2155 y(Of)d(these)g(list) h(op)q(erators,)e(`)p Ft(&&)p Fu(')g(and)h(`)p Ft(||)p Fu(')f(ha)o(v)o(e)g(equal)i(precedence,)h(follo)o(w)o(ed)e(b)o(y)g(`)p Ft(;)p Fu(')f(and)h(`)p Ft(&)p Fu(',)f(whic)o(h)75 2210 y(ha)o(v)o(e)k(equal)h(precedence.)137 2276 y(If)e(a)g(command)g(is)g (terminated)g(b)o(y)g(the)g(con)o(trol)f(op)q(erator)g(`)p Ft(&)p Fu(',)g(the)h(shell)i(executes)e(the)g(command)75 2330 y(async)o(hronously)h(in)g(a)f(subshell.)22 b(This)15 b(is)f(kno)o(wn)h(as)f(executing)h(the)g(command)f(in)h(the)f Fo(bac)o(kground)p Fu(.)75 2385 y(The)g(shell)i(do)q(es)f(not)f(w)o (ait)g(for)f(the)i(command)f(to)f(\014nish,)j(and)e(the)g(return)h (status)e(is)i(0)f(\(true\).)19 b(When)75 2440 y(job)h(con)o(trol)g(is) g(not)g(activ)o(e)g(\(see)g(Chapter)g(7)g([Job)g(Con)o(trol],)g(page)g (75\),)g(the)g(standard)f(input)j(for)75 2495 y(async)o(hronous)g (commands,)h(in)f(the)g(absence)h(of)e(an)o(y)h(explicit)i (redirections,)g(is)f(redirected)g(from)75 2550 y Ft(/dev/null)p Fu(.)137 2615 y(Commands)10 b(separated)g(b)o(y)h(a)f(`)p Ft(;)p Fu(')g(are)g(executed)h(sequen)o(tially;)j(the)c(shell)j(w)o (aits)d(for)f(eac)o(h)i(command)75 2670 y(to)k(terminate)g(in)h(turn.)k (The)15 b(return)g(status)g(is)g(the)h(exit)f(status)f(of)h(the)h(last) f(command)g(executed.)p eop %%Page: 9 11 9 10 bop 75 -58 a Fu(Chapter)15 b(3:)k(Basic)d(Shell)h(F)l(eatures)1145 b(9)137 149 y(The)16 b(con)o(trol)e(op)q(erators)h(`)p Ft(&&)p Fu(')f(and)h(`)p Ft(||)p Fu(')f(denote)h Fp(and)h Fu(lists)g(and)f Fp(or)g Fu(lists,)h(resp)q(ectiv)o(ely)l(.)21 b(An)16 b Fp(and)75 204 y Fu(list)g(has)f(the)g(form)195 268 y Fo(command1)27 b Ft(&&)d Fo(command2)75 334 y(command2)18 b Fu(is)e(executed)g(if,)g(and)f(only)h(if,)f Fo(command1)j Fu(returns)d(an)h(exit)f(status)g(of)f(zero.)137 400 y(An)i Fp(or)f Fu(list)h(has)f(the)h(form)195 463 y Fo(command1)27 b Ft(||)d Fo(command2)75 530 y(command2)18 b Fu(is)e(executed)g(if,)g (and)f(only)h(if,)f Fo(command1)j Fu(returns)d(a)g(non-zero)h(exit)f (status.)137 596 y(The)i(return)g(status)e(of)h Fp(and)h Fu(and)g Fp(or)g Fu(lists)g(is)g(the)g(exit)g(status)e(of)h(the)h(last) g(command)f(executed)75 651 y(in)g(the)f(list.)75 760 y Fm(3.2.4)30 b(Lo)r(oping)19 b(Constructs)137 855 y Fu(Bash)d(supp)q(orts)f(the)g(follo)o(wing)h(lo)q(oping)g(constructs.) 137 921 y(Note)h(that)f(wherev)o(er)h(a)g(`)p Ft(;)p Fu(')f(app)q(ears)h(in)h(the)f(description)h(of)f(a)f(command's)h(syn)o (tax,)f(it)h(ma)o(y)f(b)q(e)75 976 y(replaced)g(with)g(one)f(or)g(more) g(newlines.)75 1054 y Ft(until)120 b Fu(The)15 b(syn)o(tax)g(of)g(the)g Ft(until)f Fu(command)h(is:)435 1117 y Ft(until)23 b Fo(test-commands)r Ft(;)g(do)h Fo(consequen)o(t-commands)r Ft(;)g(done)315 1183 y Fu(Execute)d Fo(consequen)o(t-commands)i Fu(as)d(long)h(as)f Fo(test-commands)i Fu(has)e(an)h(exit)g(status)315 1238 y(whic)o(h)f(is)g(not)f(zero.)32 b(The)20 b(return)f(status)g(is)h (the)f(exit)h(status)e(of)h(the)h(last)f(command)315 1293 y(executed)d(in)g Fo(consequen)o(t-commands)p Fu(,)f(or)g(zero)g (if)h(none)f(w)o(as)g(executed.)75 1370 y Ft(while)120 b Fu(The)15 b(syn)o(tax)g(of)g(the)g Ft(while)f Fu(command)h(is:)435 1434 y Ft(while)23 b Fo(test-commands)r Ft(;)g(do)h Fo(consequen)o (t-commands)r Ft(;)g(done)315 1500 y Fu(Execute)d Fo(consequen)o (t-commands)i Fu(as)d(long)h(as)f Fo(test-commands)i Fu(has)e(an)h(exit)g(status)315 1555 y(of)c(zero.)25 b(The)17 b(return)g(status)g(is)g(the)g(exit)h(status)e(of)h(the)g (last)g(command)g(executed)h(in)315 1609 y Fo(consequen)o(t-commands)p Fu(,)d(or)g(zero)g(if)h(none)f(w)o(as)g(executed.)75 1687 y Ft(for)168 b Fu(The)15 b(syn)o(tax)g(of)g(the)g Ft(for)g Fu(command)g(is:)435 1750 y Ft(for)23 b Fo(name)k Ft([in)c Fo(w)o(ords)i Ft(...];)f(do)f Fo(commands)r Ft(;)h(done)315 1817 y Fu(Expand)17 b Fo(w)o(ords)p Fu(,)e(and)i (execute)g Fo(commands)h Fu(once)f(for)e(eac)o(h)i(mem)o(b)q(er)f(in)i (the)e(resultan)o(t)315 1871 y(list,)f(with)g Fo(name)i Fu(b)q(ound)f(to)e(the)h(curren)o(t)f(mem)o(b)q(er.)20 b(If)15 b(`)p Ft(in)g Fo(w)o(ords)r Fu(')e(is)i(not)f(presen)o(t,)h (the)315 1926 y Ft(for)f Fu(command)h(executes)g(the)g Fo(commands)i Fu(once)e(for)f(eac)o(h)h(p)q(ositional)h(parameter)e (that)315 1981 y(is)g(set,)f(as)g(if)h(`)p Ft(in)g("$@")p Fu(')f(had)g(b)q(een)i(sp)q(eci\014ed)h(\(see)d(Section)h(3.4.2)e([Sp)q (ecial)j(P)o(arameters],)315 2036 y(page)c(14\).)17 b(The)11 b(return)g(status)f(is)i(the)f(exit)g(status)f(of)h(the)g(last)g (command)g(that)f(executes.)315 2091 y(If)j(there)f(are)g(no)h(items)f (in)i(the)e(expansion)i(of)e Fo(w)o(ords)p Fu(,)f(no)i(commands)f(are)g (executed,)i(and)315 2145 y(the)h(return)g(status)g(is)g(zero.)315 2212 y(An)g(alternate)h(form)e(of)h(the)g Ft(for)g Fu(command)g(is)h (also)f(supp)q(orted:)435 2275 y Ft(for)23 b(\(\()h Fo(expr1)k Ft(;)23 b Fo(expr2)28 b Ft(;)23 b Fo(expr3)28 b Ft(\)\))23 b(;)h(do)g Fo(commands)h Ft(;)f(done)315 2341 y Fu(First,)18 b(the)g(arithmetic)h(expression)g Fo(expr1)j Fu(is)d(ev)m(aluated)g (according)g(to)e(the)h(rules)h(de-)315 2396 y(scrib)q(ed)k(b)q(elo)o (w)e(\(see)g(Section)h(6.5)e([Shell)j(Arithmetic],)g(page)e(66\).)36 b(The)21 b(arithmetic)315 2451 y(expression)d Fo(expr2)i Fu(is)d(then)h(ev)m(aluated)g(rep)q(eatedly)g(un)o(til)g(it)f(ev)m (aluates)g(to)f(zero.)25 b(Eac)o(h)315 2506 y(time)12 b Fo(expr2)j Fu(ev)m(aluates)d(to)f(a)g(non-zero)g(v)m(alue,)i Fo(commands)g Fu(are)e(executed)i(and)e(the)h(arith-)315 2560 y(metic)j(expression)g Fo(expr3)i Fu(is)e(ev)m(aluated.)21 b(If)14 b(an)o(y)g(expression)h(is)g(omitted,)f(it)g(b)q(eha)o(v)o(es)g (as)315 2615 y(if)i(it)g(ev)m(aluates)g(to)f(1.)21 b(The)16 b(return)f(v)m(alue)i(is)f(the)g(exit)g(status)e(of)i(the)f(last)h (command)f(in)315 2670 y Fo(list)i Fu(that)d(is)i(executed,)g(or)f (false)g(if)h(an)o(y)f(of)f(the)i(expressions)g(is)f(in)o(v)m(alid.)p eop %%Page: 10 12 10 11 bop 75 -58 a Fu(10)1285 b(Bash)15 b(Reference)h(Man)o(ual)137 149 y(The)e Ft(break)f Fu(and)h Ft(continue)f Fu(builtins)j(\(see)d (Section)i(4.1)e([Bourne)g(Shell)j(Builtins],)f(page)f(31\))f(ma)o(y)75 204 y(b)q(e)j(used)g(to)e(con)o(trol)h(lo)q(op)h(execution.)75 323 y Fm(3.2.5)30 b(Conditional)20 b(Constructs)75 437 y Ft(if)192 b Fu(The)15 b(syn)o(tax)g(of)g(the)g Ft(if)g Fu(command)g(is:)435 503 y Ft(if)24 b Fo(test-commands)r Ft(;)f(then)483 555 y Fo(consequen)o(t-commands)r Ft(;)435 607 y([elif)g Fo(more-test-commands)r Ft(;)g(then)483 659 y Fo(more-consequen)o(ts)r Ft(;])435 711 y([else)g Fo(alternate-consequen)o(ts)r Ft(;])435 763 y(fi)315 832 y Fu(The)k Fo(test-commands)h Fu(list)g(is)f(executed,)j(and)d(if)g (its)g(return)g(status)f(is)h(zero,)i(the)315 887 y Fo(consequen)o (t-commands)22 b Fu(list)f(is)g(executed.)35 b(If)20 b Fo(test-commands)h Fu(returns)f(a)g(non-zero)315 942 y(status,)h(eac)o(h)g Ft(elif)f Fu(list)i(is)f(executed)h(in)f(turn,)h (and)f(if)h(its)f(exit)g(status)f(is)h(zero,)h(the)315 996 y(corresp)q(onding)e Fo(more-consequen)o(ts)h Fu(is)e(executed)h (and)f(the)g(command)f(completes.)32 b(If)315 1051 y(`)p Ft(else)14 b Fo(alternate-consequen)o(ts)r Fu(')23 b(is)g(presen)o(t,)i (and)e(the)g(\014nal)h(command)e(in)i(the)f(\014nal)315 1106 y Ft(if)f Fu(or)f Ft(elif)h Fu(clause)h(has)f(a)g(non-zero)g(exit) h(status,)g(then)f Fo(alternate-consequen)o(ts)i Fu(is)315 1161 y(executed.)j(The)18 b(return)f(status)g(is)h(the)f(exit)h(status) e(of)h(the)h(last)f(command)g(executed,)315 1215 y(or)e(zero)g(if)g(no) h(condition)g(tested)f(true.)75 1299 y Ft(case)144 b Fu(The)15 b(syn)o(tax)g(of)g(the)g Ft(case)g Fu(command)g(is:)435 1365 y Ft(case)23 b Fo(w)o(ord)i Ft(in)f([)g([\(])f Fo(pattern)h Ft([|)f Fo(pattern)p Ft(]...)o(\))h Fo(command-list)i Ft(;;]...)d(esac)315 1434 y(case)17 b Fu(will)i(selectiv)o(ely)g (execute)f(the)g Fo(command-list)h Fu(corresp)q(onding)f(to)f(the)g (\014rst)g Fo(pat-)315 1489 y(tern)j Fu(that)g(matc)o(hes)g Fo(w)o(ord)p Fu(.)34 b(The)21 b(`)p Ft(|)p Fu(')e(is)i(used)g(to)f (separate)g(m)o(ultiple)i(patterns,)f(and)315 1543 y(the)16 b(`)p Ft(\))p Fu(')e(op)q(erator)h(terminates)h(a)f(pattern)g(list.)22 b(A)16 b(list)g(of)f(patterns)g(and)h(an)g(asso)q(ciated)315 1598 y(command-list)g(is)g(kno)o(wn)e(as)h(a)g Fo(clause)p Fu(.)21 b(Eac)o(h)14 b(clause)i(m)o(ust)f(b)q(e)h(terminated)f(with)g (`)p Ft(;;)p Fu('.)315 1653 y(The)f Fo(w)o(ord)h Fu(undergo)q(es)f (tilde)h(expansion,)f(parameter)f(expansion,)i(command)e(substitu-)315 1708 y(tion,)19 b(arithmetic)g(expansion,)h(and)e(quote)g(remo)o(v)m (al)h(b)q(efore)g(matc)o(hing)f(is)h(attempted.)315 1763 y(Eac)o(h)d Fo(pattern)h Fu(undergo)q(es)g(tilde)h(expansion,)f (parameter)f(expansion,)i(command)e(sub-)315 1817 y(stitution,)f(and)h (arithmetic)f(expansion.)315 1886 y(There)g(ma)o(y)g(b)q(e)g(an)g (arbitrary)g(n)o(um)o(b)q(er)g(of)f Ft(case)h Fu(clauses,)g(eac)o(h)g (terminated)h(b)o(y)f(a)f(`)p Ft(;;)p Fu('.)315 1941 y(The)h(\014rst)g(pattern)g(that)f(matc)o(hes)h(determines)h(the)g (command-list)g(that)e(is)i(executed.)315 2010 y(Here)i(is)g(an)f (example)h(using)g Ft(case)f Fu(in)i(a)e(script)h(that)e(could)j(b)q(e) f(used)g(to)f(describ)q(e)i(one)315 2065 y(in)o(teresting)d(feature)f (of)g(an)g(animal:)435 2131 y Ft(echo)23 b(-n)h("Enter)f(the)g(name)h (of)f(an)h(animal:)f(")435 2183 y(read)g(ANIMAL)435 2235 y(echo)g(-n)h("The)f($ANIMAL)g(has)h(")435 2287 y(case)f($ANIMAL)g(in) 483 2339 y(horse)g(|)h(dog)f(|)h(cat\))f(echo)g(-n)h("four";;)483 2391 y(man)f(|)h(kangaroo)f(\))g(echo)h(-n)f("two";;)483 2442 y(*\))g(echo)h(-n)f("an)h(unknown)f(number)g(of";;)435 2494 y(esac)435 2546 y(echo)g(")h(legs.")315 2615 y Fu(The)13 b(return)g(status)f(is)i(zero)f(if)h(no)f Fo(pattern)f Fu(is)i(matc)o(hed.)19 b(Otherwise,)14 b(the)f(return)g(status)315 2670 y(is)j(the)f(exit)h(status)e(of)h(the)g Fo(command-list)i Fu(executed.)p eop %%Page: 11 13 11 12 bop 75 -58 a Fu(Chapter)15 b(3:)k(Basic)d(Shell)h(F)l(eatures) 1123 b(11)75 149 y Ft(select)315 219 y Fu(The)17 b Ft(select)f Fu(construct)g(allo)o(ws)h(the)g(easy)g(generation)g(of)f(men)o(us.)25 b(It)17 b(has)g(almost)f(the)315 273 y(same)f(syn)o(tax)f(as)h(the)g Ft(for)g Fu(command:)435 340 y Ft(select)23 b Fo(name)k Ft([in)c Fo(w)o(ords)i Ft(...];)e(do)h Fo(commands)r Ft(;)f(done)315 409 y Fu(The)13 b(list)g(of)g(w)o(ords)e(follo)o(wing)j Ft(in)e Fu(is)h(expanded,)h(generating)f(a)f(list)i(of)e(items.)19 b(The)13 b(set)f(of)315 464 y(expanded)k(w)o(ords)d(is)i(prin)o(ted)h (on)e(the)h(standard)f(error)f(output)i(stream,)e(eac)o(h)i(preceded) 315 519 y(b)o(y)c(a)f(n)o(um)o(b)q(er.)19 b(If)11 b(the)g(`)p Ft(in)j Fo(w)o(ords)r Fu(')c(is)h(omitted,)g(the)g(p)q(ositional)h (parameters)e(are)h(prin)o(ted,)315 573 y(as)j(if)h(`)p Ft(in)g("$@")p Fu(')e(had)i(b)q(een)h(sp)q(ecifed.)21 b(The)15 b Ft(PS3)f Fu(prompt)g(is)h(then)g(displa)o(y)o(ed)h(and)f(a)f (line)315 628 y(is)h(read)f(from)g(the)g(standard)g(input.)21 b(If)14 b(the)h(line)h(consists)e(of)g(a)g(n)o(um)o(b)q(er)h(corresp)q (onding)315 683 y(to)i(one)h(of)f(the)g(displa)o(y)o(ed)i(w)o(ords,)e (then)h(the)g(v)m(alue)h(of)e Fo(name)j Fu(is)e(set)g(to)e(that)h(w)o (ord.)27 b(If)315 738 y(the)19 b(line)h(is)f(empt)o(y)l(,)g(the)f(w)o (ords)g(and)h(prompt)f(are)g(displa)o(y)o(ed)i(again.)30 b(If)18 b Ft(EOF)g Fu(is)h(read,)315 793 y(the)e Ft(select)e Fu(command)i(completes.)24 b(An)o(y)16 b(other)g(v)m(alue)i(read)f (causes)f Fo(name)j Fu(to)d(b)q(e)h(set)315 847 y(to)e(n)o(ull.)21 b(The)15 b(line)i(read)e(is)h(sa)o(v)o(ed)f(in)h(the)f(v)m(ariable)i Ft(REPLY)p Fu(.)315 917 y(The)k Fo(commands)i Fu(are)e(executed)h (after)e(eac)o(h)h(selection)h(un)o(til)h(a)d Ft(break)h Fu(command)f(is)315 971 y(executed,)c(at)e(whic)o(h)i(p)q(oin)o(t)g (the)f Ft(select)g Fu(command)g(completes.)315 1041 y(Here)20 b(is)g(an)f(example)h(that)f(allo)o(ws)h(the)f(user)h(to)f(pic)o(k)h(a) f(\014lename)i(from)e(the)g(curren)o(t)315 1095 y(directory)l(,)c(and)h (displa)o(ys)g(the)f(name)g(and)h(index)g(of)f(the)g(\014le)i (selected.)435 1162 y Ft(select)23 b(fname)g(in)h(*;)435 1214 y(do)435 1265 y(echo)f(you)h(picked)f($fname)g(\\\($REPLY\\\))435 1317 y(break;)435 1369 y(done)75 1453 y(\(\(...)o(\)\))435 1519 y(\(\()h Fo(expression)g Ft(\)\))315 1588 y Fu(The)17 b(arithmetic)h Fo(expression)f Fu(is)h(ev)m(aluated)g(according)f(to)f (the)h(rules)h(describ)q(ed)g(b)q(elo)o(w)315 1643 y(\(see)f(Section)i (6.5)d([Shell)j(Arithmetic],)f(page)f(66\).)26 b(If)18 b(the)f(v)m(alue)i(of)e(the)g(expression)h(is)315 1698 y(non-zero,)13 b(the)g(return)g(status)f(is)h(0;)g(otherwise)g(the)f (return)h(status)f(is)h(1.)19 b(This)13 b(is)h(exactly)315 1753 y(equiv)m(alen)o(t)j(to)435 1819 y Ft(let)23 b(")p Fo(expression)p Ft(")315 1888 y Fu(See)13 b(Section)h(4.2)d([Bash)i (Builtins],)h(page)f(36,)f(for)g(a)g(full)i(description)g(of)e(the)h Ft(let)f Fu(builtin.)75 1972 y Ft([[...)o(]])435 2038 y([[)24 b Fo(expression)g Ft(]])315 2108 y Fu(Return)12 b(a)h(status)f(of)g(0)h(or)f(1)g(dep)q(ending)j(on)e(the)g(ev)m (aluation)h(of)e(the)h(conditional)h(expres-)315 2162 y(sion)i Fo(expression)p Fu(.)k(Expressions)c(are)f(comp)q(osed)g(of)g (the)g(primaries)h(describ)q(ed)h(b)q(elo)o(w)f(in)315 2217 y(Section)j(6.4)e([Bash)g(Conditional)i(Expressions],)f(page)g (64.)27 b(W)l(ord)18 b(splitting)h(and)f(\014le-)315 2272 y(name)12 b(expansion)h(are)f(not)g(p)q(erformed)h(on)f(the)g(w)o (ords)f(b)q(et)o(w)o(een)i(the)f(`)p Ft([[)p Fu(')f(and)i(`)p Ft(]])p Fu(';)f(tilde)315 2327 y(expansion,)k(parameter)e(and)i(v)m (ariable)g(expansion,)g(arithmetic)g(expansion,)g(command)315 2382 y(substitution,)g(pro)q(cess)f(substitution,)h(and)f(quote)g(remo) o(v)m(al)g(are)g(p)q(erformed.)315 2451 y(When)d(the)f(`)p Ft(==)p Fu(')f(and)i(`)p Ft(!=)p Fu(')e(op)q(erators)g(are)h(used,)h (the)g(string)f(to)f(the)i(righ)o(t)f(of)f(the)i(op)q(erator)315 2506 y(is)k(considered)h(a)f(pattern)f(and)h(matc)o(hed)f(according)h (to)f(the)h(rules)g(describ)q(ed)i(b)q(elo)o(w)e(in)315 2560 y(Section)g(3.5.8.1)d([P)o(attern)h(Matc)o(hing],)g(page)h(21.)k (The)c(return)g(v)m(alue)i(is)e(0)g(if)h(the)f(string)315 2615 y(matc)o(hes)d(or)g(do)q(es)h(not)f(matc)o(h)g(the)h(pattern,)f (resp)q(ectiv)o(ely)l(,)j(and)e(1)f(otherwise.)19 b(An)o(y)13 b(part)315 2670 y(of)i(the)g(pattern)g(ma)o(y)f(b)q(e)i(quoted)f(to)g (force)g(it)g(to)g(b)q(e)h(matc)o(hed)f(as)g(a)g(string.)p eop %%Page: 12 14 12 13 bop 75 -58 a Fu(12)1285 b(Bash)15 b(Reference)h(Man)o(ual)315 149 y(Expressions)c(ma)o(y)f(b)q(e)i(com)o(bined)g(using)f(the)g(follo) o(wing)g(op)q(erators,)f(listed)i(in)g(decreasing)315 204 y(order)i(of)g(precedence:)315 277 y Ft(\()g Fo(expression)h Ft(\))555 332 y Fu(Returns)f(the)h(v)m(alue)g(of)f Fo(expression)p Fu(.)22 b(This)16 b(ma)o(y)e(b)q(e)j(used)f(to)e(o)o(v)o(erride)i(the) 555 387 y(normal)f(precedence)i(of)e(op)q(erators.)315 460 y Ft(!)g Fo(expression)555 515 y Fu(T)l(rue)g(if)h Fo(expression)g Fu(is)g(false.)315 588 y Fo(expression1)j Ft(&&)c Fo(expression2)555 643 y Fu(T)l(rue)g(if)h(b)q(oth)f Fo(expression1)20 b Fu(and)15 b Fo(expression2)20 b Fu(are)15 b(true.)315 716 y Fo(expression1)k Ft(||)c Fo(expression2)555 771 y Fu(T)l(rue)g(if)h(either)g Fo(expression1)j Fu(or)c Fo(expression2)20 b Fu(is)15 b(true.)315 844 y(The)d Ft(&&)g Fu(and)g Ft(||)g Fu(commands)g(do)g(not)g(execute)g Fo(expression2)17 b Fu(if)12 b(the)g(v)m(alue)i(of)d Fo(expression1)315 899 y Fu(is)16 b(su\016cien)o(t)g(to)e(determine)i (the)g(return)f(v)m(alue)h(of)f(the)g(en)o(tire)h(conditional)h (expression.)75 1001 y Fm(3.2.6)30 b(Grouping)20 b(Commands)137 1094 y Fu(Bash)11 b(pro)o(vides)h(t)o(w)o(o)e(w)o(a)o(ys)g(to)g(group)h (a)f(list)i(of)f(commands)g(to)f(b)q(e)i(executed)g(as)f(a)f(unit.)20 b(When)11 b(com-)75 1149 y(mands)16 b(are)f(group)q(ed,)h(redirections) h(ma)o(y)e(b)q(e)h(applied)i(to)d(the)h(en)o(tire)g(command)f(list.)22 b(F)l(or)15 b(example,)75 1203 y(the)g(output)g(of)g(all)h(the)f (commands)g(in)h(the)g(list)g(ma)o(y)e(b)q(e)i(redirected)h(to)d(a)h (single)h(stream.)75 1276 y Ft(\(\))435 1338 y(\()24 b Fo(list)h Ft(\))315 1401 y Fu(Placing)13 b(a)f(list)h(of)f(commands)g (b)q(et)o(w)o(een)g(paren)o(theses)h(causes)f(a)g(subshell)i(to)d(b)q (e)i(created,)315 1456 y(and)h(eac)o(h)g(of)f(the)h(commands)g(in)g Fo(list)i Fu(to)d(b)q(e)h(executed)h(in)g(that)e(subshell.)21 b(Since)15 b(the)f Fo(list)315 1511 y Fu(is)h(executed)g(in)g(a)f (subshell,)i(v)m(ariable)g(assignmen)o(ts)e(do)g(not)g(remain)h(in)g (e\013ect)f(after)g(the)315 1566 y(subshell)j(completes.)75 1639 y Ft({})435 1700 y({)24 b Fo(list)q Ft(;)g(})315 1764 y Fu(Placing)16 b(a)e(list)i(of)e(commands)g(b)q(et)o(w)o(een)h (curly)h(braces)f(causes)f(the)h(list)h(to)e(b)q(e)h(executed)315 1819 y(in)f(the)g(curren)o(t)f(shell)i(con)o(text.)j(No)13 b(subshell)j(is)e(created.)19 b(The)13 b(semicolon)i(\(or)d(newline\)) 315 1874 y(follo)o(wing)k Fo(list)h Fu(is)f(required.)137 1947 y(In)h(addition)h(to)e(the)g(creation)h(of)f(a)g(subshell,)i (there)f(is)g(a)f(subtle)h(di\013erence)h(b)q(et)o(w)o(een)f(these)f(t) o(w)o(o)75 2001 y(constructs)21 b(due)h(to)f(historical)h(reasons.)38 b(The)21 b(braces)h(are)f Ft(reserved)14 b(words)p Fu(,)21 b(so)g(they)h(m)o(ust)e(b)q(e)75 2056 y(separated)c(from)f(the)i Fo(list)h Fu(b)o(y)e Ft(blank)p Fu(s.)22 b(The)17 b(paren)o(theses)f (are)g Ft(operators)p Fu(,)f(and)h(are)g(recognized)h(as)75 2111 y(separate)e(tok)o(ens)f(b)o(y)h(the)h(shell)h(ev)o(en)e(if)h (they)f(are)g(not)g(separated)g(from)f(the)h Fo(list)i Fu(b)o(y)e(whitespace.)137 2175 y(The)h(exit)f(status)g(of)f(b)q(oth)i (of)f(these)g(constructs)g(is)g(the)h(exit)f(status)g(of)g Fo(list)p Fu(.)75 2294 y Fs(3.3)33 b(Shell)24 b(F)-6 b(unctions)137 2387 y Fu(Shell)16 b(functions)e(are)g(a)f(w)o(a)o(y)g (to)g(group)g(commands)h(for)f(later)g(execution)i(using)g(a)e(single)i (name)f(for)75 2442 y(the)k(group.)26 b(They)18 b(are)g(executed)g (just)f(lik)o(e)i(a)e Ft(")p Fu(regular)p Ft(")h Fu(command.)27 b(When)18 b(the)f(name)h(of)f(a)g(shell)75 2496 y(function)j(is)g(used) h(as)e(a)g(simple)i(command)e(name,)i(the)e(list)i(of)e(commands)g (asso)q(ciated)h(with)g(that)75 2551 y(function)14 b(name)f(is)g (executed.)20 b(Shell)15 b(functions)e(are)g(executed)h(in)f(the)g (curren)o(t)g(shell)h(con)o(text;)f(no)g(new)75 2606 y(pro)q(cess)i(is)h(created)f(to)g(in)o(terpret)g(them.)137 2670 y(F)l(unctions)h(are)f(declared)i(using)e(this)h(syn)o(tax:)p eop %%Page: 13 15 13 14 bop 75 -58 a Fu(Chapter)15 b(3:)k(Basic)d(Shell)h(F)l(eatures) 1123 b(13)195 149 y Ft([)24 b(function)e(])i Fo(name)j Ft(\(\))c({)h Fo(command-list)q Ft(;)h(})137 219 y Fu(This)17 b(de\014nes)h(a)e(shell)i(function)f(named)f Fo(name)p Fu(.)24 b(The)17 b(reserv)o(ed)f(w)o(ord)g Ft(function)f Fu(is)i(optional.)24 b(If)75 274 y(the)c Ft(function)e Fu(reserv)o(ed)i(w)o(ord)f(is)h(supplied,)j(the)d(paren)o(theses)f(are) h(optional.)34 b(The)19 b Fo(b)q(o)q(dy)25 b Fu(of)19 b(the)75 329 y(function)i(is)h(the)e Fo(command-list)j Fu(b)q(et)o(w)o(een)e Ft({)f Fu(and)h Ft(})p Fu(.)36 b(This)21 b(list)h(is)f(executed)g(whenev)o(er)g Fo(name)i Fu(is)75 384 y(sp)q(eci\014ed)17 b(as)e(the)g(name)g(of)g(a)g(command.) 20 b(The)15 b(exit)h(status)e(of)h(a)f(function)i(is)g(the)f(exit)h (status)e(of)h(the)75 439 y(last)g(command)g(executed)h(in)g(the)g(b)q (o)q(dy)l(.)137 509 y(Note)e(that)f(for)g(historical)i(reasons,)e(the)h (curly)h(braces)e(that)h(surround)g(the)f(b)q(o)q(dy)i(of)e(the)h (function)75 563 y(m)o(ust)k(b)q(e)h(separated)f(from)f(the)i(b)q(o)q (dy)g(b)o(y)f Ft(blank)p Fu(s)g(or)f(newlines.)31 b(This)19 b(is)g(b)q(ecause)g(the)g(braces)f(are)75 618 y(reserv)o(ed)i(w)o(ords) e(and)i(are)f(only)h(recognized)h(as)e(suc)o(h)g(when)h(they)g(are)f (separated)g(b)o(y)g(whitespace.)75 673 y(Also,)c(the)g Fo(command-list)j Fu(m)o(ust)c(b)q(e)i(terminated)f(with)h(a)f (semicolon)h(or)f(a)g(newline.)137 743 y(When)i(a)g(function)g(is)g (executed,)h(the)e(argumen)o(ts)g(to)g(the)h(function)g(b)q(ecome)g (the)g(p)q(ositional)h(pa-)75 798 y(rameters)i(during)i(its)e (execution)i(\(see)f(Section)h(3.4.1)d([P)o(ositional)i(P)o (arameters],)f(page)g(14\).)36 b(The)75 853 y(sp)q(ecial)20 b(parameter)d(`)p Ft(#)p Fu(')g(that)h(expands)g(to)f(the)i(n)o(um)o(b) q(er)f(of)g(p)q(ositional)h(parameters)e(is)i(up)q(dated)g(to)75 907 y(re\015ect)e(the)h(c)o(hange.)25 b(P)o(ositional)18 b(parameter)e Ft(0)h Fu(is)h(unc)o(hanged.)26 b(The)18 b Ft(FUNCNAME)e Fu(v)m(ariable)i(is)g(set)f(to)75 962 y(the)e(name)g(of)g(the)h(function)g(while)g(the)g(function)g(is)f (executing.)137 1032 y(If)k(the)g(builtin)i(command)e Ft(return)f Fu(is)h(executed)h(in)f(a)g(function,)h(the)f(function)g (completes)h(and)75 1087 y(execution)e(resumes)f(with)g(the)g(next)g (command)f(after)g(the)h(function)h(call.)26 b(When)17 b(a)f(function)i(com-)75 1142 y(pletes,)h(the)g(v)m(alues)g(of)f(the)g (p)q(ositional)h(parameters)f(and)g(the)g(sp)q(ecial)i(parameter)d(`)p Ft(#)p Fu(')h(are)f(restored)75 1197 y(to)e(the)g(v)m(alues)h(they)g (had)f(prior)g(to)g(the)g(function's)h(execution.)21 b(If)16 b(a)f(n)o(umeric)h(argumen)o(t)e(is)i(giv)o(en)g(to)75 1251 y Ft(return)p Fu(,)i(that)f(is)i(the)f(function's)g(return)g (status;)h(otherwise)f(the)g(function's)h(return)f(status)f(is)i(the)75 1306 y(exit)d(status)e(of)h(the)g(last)g(command)g(executed)h(b)q (efore)g(the)f Ft(return)p Fu(.)137 1376 y(V)l(ariables)h(lo)q(cal)g (to)f(the)g(function)g(ma)o(y)f(b)q(e)i(declared)g(with)f(the)g Ft(local)f Fu(builtin.)22 b(These)16 b(v)m(ariables)75 1431 y(are)f(visible)i(only)f(to)f(the)g(function)h(and)f(the)h (commands)f(it)g(in)o(v)o(ok)o(es.)137 1501 y(F)l(unctions)h(ma)o(y)f (b)q(e)h(recursiv)o(e.)k(No)15 b(limit)i(is)e(placed)i(on)e(the)g(n)o (um)o(b)q(er)h(of)f(recursiv)o(e)g(calls.)75 1636 y Fs(3.4)33 b(Shell)24 b(P)n(arameters)137 1735 y Fu(A)d Fo(parameter)i Fu(is)d(an)h(en)o(tit)o(y)f(that)g(stores)f(v)m(alues.)37 b(It)20 b(can)h(b)q(e)g(a)f Ft(name)p Fu(,)g(a)g(n)o(um)o(b)q(er,)i(or) e(one)g(of)75 1790 y(the)i(sp)q(ecial)h(c)o(haracters)e(listed)i(b)q (elo)o(w.)39 b(F)l(or)21 b(the)h(shell's)g(purp)q(oses,)i(a)d Fo(v)m(ariable)k Fu(is)d(a)g(parameter)75 1845 y(denoted)e(b)o(y)f(a)g Ft(name)p Fu(.)32 b(A)19 b(v)m(ariable)i(has)e(a)g Fo(v)m(alue)k Fu(and)c(zero)g(or)g(more)g Fo(attributes)p Fu(.)32 b(A)o(ttributes)19 b(are)75 1900 y(assigned)c(using)g(the)f Ft(declare)g Fu(builtin)i(command)e(\(see)h(the)f(description)i(of)e(the)g Ft(declare)g Fu(builtin)i(in)75 1955 y(Section)g(4.2)e([Bash)h (Builtins],)i(page)e(36\).)137 2025 y(A)g(parameter)e(is)i(set)f(if)h (it)f(has)g(b)q(een)i(assigned)e(a)g(v)m(alue.)21 b(The)15 b(n)o(ull)g(string)g(is)f(a)g(v)m(alid)i(v)m(alue.)21 b(Once)75 2079 y(a)15 b(v)m(ariable)h(is)g(set,)f(it)g(ma)o(y)g(b)q(e)h (unset)f(only)h(b)o(y)f(using)h(the)f Ft(unset)g Fu(builtin)i(command.) 137 2149 y(A)f(v)m(ariable)g(ma)o(y)f(b)q(e)g(assigned)h(to)f(b)o(y)g (a)g(statemen)o(t)f(of)h(the)g(form)195 2216 y Fo(name)s Ft(=[)p Fo(v)m(alue)s Ft(])75 2286 y Fu(If)22 b Fo(v)m(alue)j Fu(is)e(not)e(giv)o(en,)i(the)f(v)m(ariable)h(is)g(assigned)f(the)g(n)o (ull)h(string.)39 b(All)23 b Fo(v)m(alue)s Fu(s)g(undergo)f(tilde)75 2341 y(expansion,)13 b(parameter)e(and)h(v)m(ariable)h(expansion,)g (command)f(substitution,)h(arithmetic)f(expansion,)75 2396 y(and)21 b(quote)f(remo)o(v)m(al)g(\(detailed)i(b)q(elo)o(w\).)35 b(If)21 b(the)f(v)m(ariable)i(has)e(its)h Ft(integer)e Fu(attribute)i(set,)g(then)75 2451 y Fo(v)m(alue)h Fu(is)d(sub)s(ject)f (to)g(arithmetic)g(expansion)i(ev)o(en)e(if)h(the)f Ft($\(\(...)o(\)\)) g Fu(expansion)i(is)e(not)g(used)h(\(see)75 2506 y(Section)e(3.5.5)d ([Arithmetic)j(Expansion],)f(page)g(19\).)22 b(W)l(ord)16 b(splitting)h(is)g(not)e(p)q(erformed,)h(with)h(the)75 2560 y(exception)h(of)f Ft("$@")g Fu(as)f(explained)k(b)q(elo)o(w.)26 b(Filename)18 b(expansion)g(is)g(not)f(p)q(erformed.)26 b(Assignmen)o(t)75 2615 y(statemen)o(ts)11 b(ma)o(y)h(also)g(app)q(ear) g(as)g(argumen)o(ts)g(to)f(the)i Ft(declare)p Fu(,)e Ft(typeset)p Fu(,)h Ft(export)p Fu(,)f Ft(readonly)p Fu(,)h(and)75 2670 y Ft(local)i Fu(builtin)k(commands.)p eop %%Page: 14 16 14 15 bop 75 -58 a Fu(14)1285 b(Bash)15 b(Reference)h(Man)o(ual)75 149 y Fm(3.4.1)30 b(P)n(ositional)20 b(P)n(arameters)137 245 y Fu(A)f Fo(p)q(ositional)h(parameter)g Fu(is)f(a)f(parameter)g (denoted)h(b)o(y)f(one)h(or)f(more)g(digits,)i(other)e(than)g(the)75 300 y(single)j(digit)g Ft(0)p Fu(.)34 b(P)o(ositional)21 b(parameters)e(are)h(assigned)g(from)f(the)h(shell's)i(argumen)o(ts)d (when)h(it)g(is)75 355 y(in)o(v)o(ok)o(ed,)f(and)g(ma)o(y)f(b)q(e)h (reassigned)g(using)g(the)g Ft(set)f Fu(builtin)j(command.)29 b(P)o(ositional)19 b(parameter)f Ft(N)75 410 y Fu(ma)o(y)13 b(b)q(e)h(referenced)g(as)f Ft(${N})p Fu(,)g(or)g(as)g Ft($N)g Fu(when)h Ft(N)f Fu(consists)h(of)f(a)g(single)i(digit.)20 b(P)o(ositional)14 b(parameters)75 464 y(ma)o(y)h(not)g(b)q(e)i (assigned)f(to)f(with)h(assignmen)o(t)f(statemen)o(ts.)20 b(The)c Ft(set)f Fu(and)h Ft(shift)f Fu(builtins)j(are)d(used)75 519 y(to)g(set)h(and)g(unset)g(them)g(\(see)g(Chapter)g(4)g([Shell)h (Builtin)h(Commands],)d(page)h(31\).)21 b(The)c(p)q(ositional)75 574 y(parameters)11 b(are)h(temp)q(orarily)g(replaced)h(when)g(a)e (shell)j(function)f(is)f(executed)h(\(see)f(Section)g(3.3)f([Shell)75 629 y(F)l(unctions],)k(page)g(12\).)137 696 y(When)g(a)e(p)q(ositional) j(parameter)d(consisting)i(of)f(more)g(than)f(a)h(single)i(digit)f(is)f (expanded,)h(it)g(m)o(ust)75 750 y(b)q(e)h(enclosed)g(in)g(braces.)75 861 y Fm(3.4.2)30 b(Sp)r(ecial)20 b(P)n(arameters)137 957 y Fu(The)14 b(shell)i(treats)d(sev)o(eral)h(parameters)f(sp)q (ecially)l(.)22 b(These)15 b(parameters)e(ma)o(y)g(only)i(b)q(e)f (referenced;)75 1012 y(assignmen)o(t)h(to)g(them)g(is)h(not)e(allo)o(w) o(ed.)75 1103 y Ft(*)216 b Fu(Expands)15 b(to)g(the)g(p)q(ositional)h (parameters,)e(starting)g(from)h(one.)20 b(When)15 b(the)g(expansion) 315 1157 y(o)q(ccurs)f(within)i(double)f(quotes,)f(it)g(expands)h(to)e (a)h(single)h(w)o(ord)e(with)i(the)f(v)m(alue)h(of)f(eac)o(h)315 1212 y(parameter)g(separated)g(b)o(y)h(the)g(\014rst)f(c)o(haracter)g (of)g(the)h Ft(IFS)f Fu(sp)q(ecial)j(v)m(ariable.)k(That)14 b(is,)315 1267 y Ft("$*")j Fu(is)g(equiv)m(alen)o(t)i(to)e Ft("$1)p Fo(c)s Ft($2)p Fo(c)s Ft(...)n(")p Fu(,)g(where)h Fo(c)i Fu(is)d(the)h(\014rst)e(c)o(haracter)h(of)g(the)g(v)m(alue)315 1322 y(of)e(the)g Ft(IFS)f Fu(v)m(ariable.)22 b(If)15 b Ft(IFS)f Fu(is)i(unset,)f(the)g(parameters)f(are)h(separated)g(b)o(y) g(spaces.)20 b(If)315 1377 y Ft(IFS)15 b Fu(is)g(n)o(ull,)i(the)e (parameters)f(are)h(joined)h(without)g(in)o(terv)o(ening)g(separators.) 75 1467 y Ft(@)216 b Fu(Expands)21 b(to)e(the)h(p)q(ositional)i (parameters,)e(starting)g(from)f(one.)36 b(When)20 b(the)g(expan-)315 1522 y(sion)c(o)q(ccurs)g(within)h(double)f(quotes,)f(eac)o(h)h (parameter)f(expands)h(to)f(a)g(separate)g(w)o(ord.)315 1577 y(That)k(is,)h Ft("$@")f Fu(is)g(equiv)m(alen)o(t)i(to)e Ft("$1")14 b("$2")h(...)p Fu(.)32 b(When)19 b(there)h(are)e(no)i(p)q (ositional)315 1632 y(parameters,)14 b Ft("$@")h Fu(and)g Ft($@)g Fu(expand)h(to)e(nothing)i(\(i.e.,)e(they)i(are)f(remo)o(v)o (ed\).)75 1723 y Ft(#)216 b Fu(Expands)15 b(to)g(the)g(n)o(um)o(b)q(er) h(of)f(p)q(ositional)h(parameters)f(in)h(decimal.)75 1814 y Ft(?)216 b Fu(Expands)15 b(to)g(the)g(exit)h(status)e(of)h(the)g (most)g(recen)o(tly)h(executed)g(foreground)e(pip)q(elin)q(e.)75 1904 y Ft(-)216 b Fu(\(A)15 b(h)o(yphen.\))22 b(Expands)15 b(to)g(the)h(curren)o(t)f(option)h(\015ags)f(as)g(sp)q(eci\014ed)j(up)q (on)e(in)o(v)o(o)q(cation,)315 1959 y(b)o(y)i(the)f Ft(set)h Fu(builtin)h(command,)f(or)f(those)h(set)f(b)o(y)h(the)g(shell)h (itself)f(\(suc)o(h)g(as)f(the)h(`)p Ft(-i)p Fu(')315 2014 y(option\).)75 2105 y Ft($)216 b Fu(Expands)21 b(to)e(the)i(pro)q (cess)g Fp(id)f Fu(of)g(the)h(shell.)37 b(In)21 b(a)f Ft(\(\))g Fu(subshell,)j(it)e(expands)g(to)f(the)315 2160 y(pro)q(cess)15 b Fp(id)h Fu(of)f(the)g(in)o(v)o(oking)h(shell,)g (not)f(the)g(subshell.)75 2250 y Ft(!)216 b Fu(Expands)20 b(to)g(the)g(pro)q(cess)h Fp(id)f Fu(of)g(the)g(most)f(recen)o(tly)i (executed)g(bac)o(kground)f(\(asyn-)315 2305 y(c)o(hronous\))15 b(command.)75 2396 y Ft(0)216 b Fu(Expands)11 b(to)f(the)h(name)g(of)g (the)g(shell)h(or)f(shell)h(script.)19 b(This)12 b(is)f(set)g(at)f (shell)i(initialization.)315 2451 y(If)22 b(Bash)g(is)h(in)o(v)o(ok)o (ed)f(with)h(a)f(\014le)h(of)e(commands)h(\(see)g(Section)h(3.8)e ([Shell)j(Scripts],)315 2506 y(page)19 b(29\),)g Ft($0)f Fu(is)i(set)f(to)f(the)h(name)g(of)g(that)f(\014le.)32 b(If)20 b(Bash)f(is)g(started)g(with)g(the)g(`)p Ft(-c)p Fu(')315 2560 y(option)h(\(see)g(Section)g(6.1)f([In)o(v)o(oking)h (Bash],)g(page)g(59\),)f(then)h Ft($0)g Fu(is)g(set)f(to)h(the)f (\014rst)315 2615 y(argumen)o(t)c(after)f(the)i(string)f(to)g(b)q(e)h (executed,)g(if)f(one)h(is)g(presen)o(t.)k(Otherwise,)c(it)f(is)h(set) 315 2670 y(to)f(the)g(\014lename)h(used)g(to)e(in)o(v)o(ok)o(e)i(Bash,) f(as)f(giv)o(en)i(b)o(y)f(argumen)o(t)g(zero.)p eop %%Page: 15 17 15 16 bop 75 -58 a Fu(Chapter)15 b(3:)k(Basic)d(Shell)h(F)l(eatures) 1123 b(15)75 149 y Ft(_)216 b Fu(\(An)17 b(underscore.\))25 b(A)o(t)16 b(shell)j(startup,)d(set)g(to)h(the)g(absolute)g(\014lename) h(of)e(the)h(shell)h(or)315 204 y(shell)i(script)f(b)q(eing)h(executed) g(as)e(passed)h(in)g(the)g(argumen)o(t)f(list.)31 b(Subsequen)o(tly)l (,)21 b(ex-)315 259 y(pands)e(to)f(the)h(last)g(argumen)o(t)f(to)g(the) h(previous)g(command,)g(after)f(expansion.)32 b(Also)315 314 y(set)14 b(to)g(the)h(full)h(pathname)e(of)g(eac)o(h)h(command)f (executed)i(and)f(placed)g(in)h(the)e(en)o(viron-)315 369 y(men)o(t)k(exp)q(orted)h(to)e(that)h(command.)29 b(When)18 b(c)o(hec)o(king)i(mail,)f(this)g(parameter)e(holds)315 423 y(the)e(name)g(of)g(the)h(mail)g(\014le.)75 552 y Fs(3.5)33 b(Shell)24 b(Expansions)137 649 y Fu(Expansion)16 b(is)f(p)q(erformed)h(on)f(the)g(command)g(line)h(after)e(it)i(has)f(b) q(een)h(split)g(in)o(to)f Ft(token)p Fu(s.)k(There)75 703 y(are)c(sev)o(en)g(kinds)i(of)d(expansion)i(p)q(erformed:)112 771 y Fr(\017)30 b Fu(brace)15 b(expansion)112 838 y Fr(\017)30 b Fu(tilde)17 b(expansion)112 905 y Fr(\017)30 b Fu(parameter)14 b(and)i(v)m(ariable)g(expansion)112 972 y Fr(\017)30 b Fu(command)15 b(substitution)112 1040 y Fr(\017)30 b Fu(arithmetic)16 b(expansion)112 1107 y Fr(\017)30 b Fu(w)o(ord)15 b(splitting)112 1174 y Fr(\017)30 b Fu(\014lename)16 b(expansion)137 1254 y(The)h(order)g(of)g (expansions)g(is:)24 b(brace)17 b(expansion,)h(tilde)g(expansion,)g (parameter,)e(v)m(ariable,)j(and)75 1309 y(arithmetic)k(expansion)h (and)e(command)h(substitution)g(\(done)g(in)g(a)f(left-to-righ)o(t)h (fashion\),)h(w)o(ord)75 1364 y(splitting,)16 b(and)g(\014lename)g (expansion.)137 1431 y(On)23 b(systems)e(that)g(can)h(supp)q(ort)f(it,) j(there)d(is)i(an)e(additional)i(expansion)g(a)o(v)m(ailable:)35 b Fo(pro)q(cess)75 1486 y(substitution)p Fu(.)c(This)19 b(is)g(p)q(erformed)g(at)f(the)g(same)h(time)g(as)f(parameter,)g(v)m (ariable,)j(and)d(arithmetic)75 1541 y(expansion)e(and)f(command)h (substitution.)137 1608 y(Only)k(brace)e(expansion,)h(w)o(ord)f (splitting,)i(and)e(\014lename)i(expansion)f(can)f(c)o(hange)g(the)h(n) o(um)o(b)q(er)75 1663 y(of)f(w)o(ords)f(of)h(the)g(expansion;)j(other)c (expansions)j(expand)e(a)g(single)i(w)o(ord)d(to)h(a)g(single)h(w)o (ord.)29 b(The)75 1717 y(only)17 b(exceptions)g(to)e(this)i(are)f(the)g (expansions)h(of)f Ft("$@")f Fu(\(see)i(Section)g(3.4.2)d([Sp)q(ecial)k (P)o(arameters],)75 1772 y(page)d(14\))f(and)i Ft("${)p Fo(name)s Ft([@]}")d Fu(\(see)j(Section)g(6.7)e([Arra)o(ys],)f(page)i (68\).)137 1840 y(After)21 b(all)g(expansions,)i Ft(quote)15 b(removal)k Fu(\(see)i(Section)h(3.5.9)d([Quote)i(Remo)o(v)m(al],)g (page)g(22\))e(is)75 1894 y(p)q(erformed.)75 2006 y Fm(3.5.1)30 b(Brace)20 b(Expansion)137 2103 y Fu(Brace)11 b(expansion)g(is)g(a)f (mec)o(hanism)h(b)o(y)f(whic)o(h)i(arbitrary)d(strings)i(ma)o(y)e(b)q (e)i(generated.)19 b(This)11 b(mec)o(h-)75 2158 y(anism)18 b(is)g(similar)h(to)e Fo(\014lename)i(expansion)g Fu(\(see)e(Section)i (3.5.8)d([Filename)i(Expansion],)h(page)e(20\),)75 2212 y(but)f(the)g(\014le)h(names)f(generated)g(need)g(not)g(exist.)22 b(P)o(atterns)15 b(to)g(b)q(e)i(brace)f(expanded)h(tak)o(e)e(the)h (form)75 2267 y(of)f(an)g(optional)g Fo(pream)o(ble)p Fu(,)g(follo)o(w)o(ed)h(b)o(y)f(a)f(series)i(of)f(comma-separated)f (strings)h(b)q(et)o(w)o(een)g(a)g(pair)g(of)75 2322 y(braces,)d(follo)o (w)o(ed)g(b)o(y)f(an)g(optional)h Fo(p)q(ostscript)p Fu(.)19 b(The)12 b(pream)o(ble)g(is)g(pre\014xed)h(to)d(eac)o(h)i (string)f(con)o(tained)75 2377 y(within)17 b(the)e(braces,)h(and)g(the) f(p)q(ostscript)h(is)g(then)g(app)q(ended)h(to)e(eac)o(h)h(resulting)g (string,)g(expanding)75 2432 y(left)g(to)e(righ)o(t.)137 2499 y(Brace)19 b(expansions)g(ma)o(y)e(b)q(e)i(nested.)29 b(The)19 b(results)f(of)g(eac)o(h)h(expanded)g(string)f(are)g(not)g (sorted;)75 2554 y(left)e(to)e(righ)o(t)h(order)g(is)h(preserv)o(ed.)k (F)l(or)14 b(example,)195 2618 y Ft(bash$)23 b(echo)g(a{d,c,b}e)195 2670 y(ade)g(ace)h(abe)p eop %%Page: 16 18 16 17 bop 75 -58 a Fu(16)1285 b(Bash)15 b(Reference)h(Man)o(ual)137 149 y(Brace)i(expansion)h(is)f(p)q(erformed)g(b)q(efore)g(an)o(y)g (other)f(expansions,)i(and)f(an)o(y)f(c)o(haracters)g(sp)q(ecial)75 204 y(to)e(other)h(expansions)g(are)g(preserv)o(ed)g(in)h(the)f (result.)22 b(It)16 b(is)g(strictly)h(textual.)22 b(Bash)16 b(do)q(es)g(not)f(apply)75 259 y(an)o(y)e(syn)o(tactic)h(in)o (terpretation)f(to)g(the)h(con)o(text)f(of)g(the)h(expansion)g(or)f (the)h(text)f(b)q(et)o(w)o(een)h(the)f(braces.)75 314 y(T)l(o)18 b(a)o(v)o(oid)g(con\015icts)h(with)f(parameter)f(expansion,) j(the)e(string)g(`)p Ft(${)p Fu(')f(is)h(not)g(considered)i(eligible)h (for)75 369 y(brace)15 b(expansion.)137 435 y(A)g(correctly-formed)g (brace)g(expansion)h(m)o(ust)e(con)o(tain)h(unquoted)g(op)q(ening)h (and)f(closing)h(braces,)75 490 y(and)21 b(at)g(least)h(one)f(unquoted) h(comma.)37 b(An)o(y)22 b(incorrectly)g(formed)f(brace)h(expansion)g (is)g(left)f(un-)75 545 y(c)o(hanged.)137 612 y(This)16 b(construct)g(is)g(t)o(ypically)g(used)h(as)e(shorthand)g(when)h(the)f (common)h(pre\014x)g(of)f(the)g(strings)h(to)75 666 y(b)q(e)g (generated)f(is)h(longer)f(than)g(in)h(the)g(ab)q(o)o(v)o(e)e(example:) 195 730 y Ft(mkdir)23 b(/usr/local/src/bash/{old,ne)o(w,dist,b)o(ugs}) 137 797 y Fu(or)195 861 y Ft(chown)g(root)g (/usr/{ucb/{ex,edit},lib/{ex?.?)o(*,how_e)o(x}})75 971 y Fm(3.5.2)30 b(Tilde)20 b(Expansion)137 1067 y Fu(If)j(a)e(w)o(ord)h (b)q(egins)h(with)f(an)g(unquoted)h(tilde)g(c)o(haracter)e(\(`)p Ft(~)p Fu('\),)h(all)h(of)f(the)g(c)o(haracters)f(up)i(to)75 1122 y(the)17 b(\014rst)g(unquoted)h(slash)g(\(or)e(all)j(c)o (haracters,)d(if)i(there)f(is)h(no)f(unquoted)h(slash\))g(are)f (considered)h(a)75 1176 y Fo(tilde-pre\014x)p Fu(.)29 b(If)18 b(none)g(of)f(the)h(c)o(haracters)e(in)j(the)e(tilde-pre\014x)j (are)d(quoted,)h(the)g(c)o(haracters)e(in)j(the)75 1231 y(tilde-pre\014x)c(follo)o(wing)g(the)e(tilde)i(are)e(treated)g(as)g(a) g(p)q(ossible)i Fo(login)f(name)p Fu(.)20 b(If)13 b(this)h(login)h (name)e(is)h(the)75 1286 y(n)o(ull)j(string,)e(the)h(tilde)h(is)f (replaced)h(with)f(the)g(v)m(alue)h(of)e(the)h Ft(HOME)f Fu(shell)i(v)m(ariable.)23 b(If)16 b Ft(HOME)f Fu(is)h(unset,)75 1341 y(the)i(home)h(directory)f(of)g(the)g(user)h(executing)g(the)f (shell)i(is)f(substituted)g(instead.)29 b(Otherwise,)20 b(the)75 1396 y(tilde-pre\014x)d(is)f(replaced)g(with)g(the)f(home)g (directory)h(asso)q(ciated)f(with)h(the)f(sp)q(eci\014ed)i(login)f (name.)137 1462 y(If)h(the)f(tilde-pre\014x)j(is)e(`)p Ft(~+)p Fu(',)e(the)h(v)m(alue)i(of)e(the)g(shell)i(v)m(ariable)g Ft(PWD)e Fu(replaces)h(the)f(tilde-pre\014x.)26 b(If)75 1517 y(the)15 b(tilde-pre\014x)i(is)f(`)p Ft(~-)p Fu(',)e(the)h(v)m (alue)i(of)d(the)i(shell)g(v)m(ariable)h Ft(OLDPWD)p Fu(,)d(if)i(it)f(is)h(set,)e(is)i(substituted.)137 1584 y(If)f(the)h(c)o(haracters)e(follo)o(wing)h(the)g(tilde)i(in)e(the)h (tilde-pre\014x)g(consist)g(of)e(a)h(n)o(um)o(b)q(er)g Fo(N)p Fu(,)g(optionally)75 1639 y(pre\014xed)e(b)o(y)e(a)g(`)p Ft(+)p Fu(')g(or)g(a)h(`)p Ft(-)p Fu(',)f(the)h(tilde-pre\014x)h(is)f (replaced)h(with)f(the)g(corresp)q(onding)h(elemen)o(t)f(from)f(the)75 1693 y(directory)18 b(stac)o(k,)f(as)h(it)g(w)o(ould)g(b)q(e)g(displa)o (y)o(ed)h(b)o(y)f(the)g Ft(dirs)f Fu(builtin)j(in)o(v)o(ok)o(ed)e(with) g(the)g(c)o(haracters)75 1748 y(follo)o(wing)i(tilde)h(in)f(the)f (tilde-pre\014x)i(as)e(an)h(argumen)o(t)e(\(see)h(Section)i(6.8)d([The) h(Directory)g(Stac)o(k],)75 1803 y(page)f(69\).)26 b(If)18 b(the)g(tilde-pre\014x,)i(sans)d(the)h(tilde,)h(consists)f(of)f(a)h(n)o (um)o(b)q(er)g(without)f(a)h(leading)h(`)p Ft(+)p Fu(')d(or)75 1858 y(`)p Ft(-)p Fu(',)e(`)p Ft(+)p Fu(')g(is)i(assumed.)137 1924 y(If)g(the)f(login)h(name)f(is)h(in)o(v)m(alid,)h(or)e(the)g (tilde)i(expansion)f(fails,)f(the)h(w)o(ord)e(is)i(left)f(unc)o (hanged.)137 1991 y(Eac)o(h)g(v)m(ariable)h(assignmen)o(t)e(is)h(c)o (hec)o(k)o(ed)h(for)e(unquoted)h(tilde-pre\014xes)i(immediately)f (follo)o(wing)f(a)75 2046 y(`)p Ft(:)p Fu(')f(or)h(`)p Ft(=)p Fu('.)20 b(In)15 b(these)h(cases,)f(tilde)i(expansion)f(is)g (also)f(p)q(erformed.)20 b(Consequen)o(tly)l(,)c(one)g(ma)o(y)e(use)i (\014le)75 2101 y(names)e(with)h(tildes)g(in)h(assignmen)o(ts)e(to)f Ft(PATH)p Fu(,)h Ft(MAILPATH)p Fu(,)f(and)h Ft(CDPATH)p Fu(,)g(and)g(the)h(shell)g(assigns)g(the)75 2156 y(expanded)h(v)m (alue.)137 2222 y(The)g(follo)o(wing)g(table)f(sho)o(ws)g(ho)o(w)g (Bash)g(treats)f(unquoted)i(tilde-pre\014xes:)75 2301 y Ft(~)216 b Fu(The)15 b(v)m(alue)i(of)e Ft($HOME)75 2379 y(~/foo)120 b Fu(`)p Ft($HOME/foo)p Fu(')75 2458 y Ft(~fred/foo)315 2513 y Fu(The)15 b(sub)q(directory)i Ft(foo)d Fu(of)h(the)g(home)h(directory)f(of)g(the)g(user)g Ft(fred)75 2591 y(~+/foo)96 b Fu(`)p Ft($PWD/foo)p Fu(')75 2670 y Ft(~-/foo)g Fu(`)p Ft(${OLDPWD-'~-'}/foo)p Fu(')p eop %%Page: 17 19 17 18 bop 75 -58 a Fu(Chapter)15 b(3:)k(Basic)d(Shell)h(F)l(eatures) 1123 b(17)75 149 y Ft(~)p Fo(N)182 b Fu(The)15 b(string)h(that)e(w)o (ould)i(b)q(e)g(displa)o(y)o(ed)g(b)o(y)f(`)p Ft(dirs)f(+)p Fo(N)5 b Fu(')75 234 y Ft(~+)p Fo(N)158 b Fu(The)15 b(string)h(that)e (w)o(ould)i(b)q(e)g(displa)o(y)o(ed)g(b)o(y)f(`)p Ft(dirs)f(+)p Fo(N)5 b Fu(')75 319 y Ft(~-)p Fo(N)158 b Fu(The)15 b(string)h(that)e (w)o(ould)i(b)q(e)g(displa)o(y)o(ed)g(b)o(y)f(`)p Ft(dirs)f(-)p Fo(N)5 b Fu(')75 441 y Fm(3.5.3)30 b(Shell)21 b(P)n(arameter)f (Expansion)137 542 y Fu(The)14 b(`)p Ft($)p Fu(')f(c)o(haracter)g(in)o (tro)q(duces)i(parameter)e(expansion,)h(command)g(substitution,)g(or)f (arithmetic)75 597 y(expansion.)19 b(The)12 b(parameter)e(name)i(or)e (sym)o(b)q(ol)i(to)e(b)q(e)i(expanded)g(ma)o(y)f(b)q(e)h(enclosed)g(in) g(braces,)g(whic)o(h)75 652 y(are)j(optional)h(but)f(serv)o(e)g(to)g (protect)g(the)g(v)m(ariable)h(to)f(b)q(e)h(expanded)g(from)f(c)o (haracters)f(immediately)75 707 y(follo)o(wing)i(it)f(whic)o(h)h(could) h(b)q(e)f(in)o(terpreted)f(as)g(part)g(of)g(the)g(name.)137 779 y(When)23 b(braces)g(are)f(used,)j(the)d(matc)o(hing)h(ending)h (brace)f(is)g(the)f(\014rst)g(`)p Ft(})p Fu(')g(not)g(escap)q(ed)i(b)o (y)e(a)75 834 y(bac)o(kslash)e(or)f(within)i(a)e(quoted)h(string,)g (and)g(not)f(within)i(an)e(em)o(b)q(edded)i(arithmetic)f(expansion,)75 889 y(command)15 b(substitution,)h(or)e(parameter)h(expansion.)137 961 y(The)21 b(basic)g(form)f(of)g(parameter)g(expansion)h(is)g($)p Ft({)p Fo(parameter)s Ft(})p Fu(.)35 b(The)21 b(v)m(alue)g(of)f Fo(parameter)j Fu(is)75 1016 y(substituted.)f(The)16 b(braces)g(are)f(required)i(when)f Fo(parameter)i Fu(is)e(a)f(p)q (ositional)j(parameter)c(with)i(more)75 1071 y(than)g(one)g(digit,)h (or)f(when)g Fo(parameter)j Fu(is)e(follo)o(w)o(ed)f(b)o(y)g(a)g(c)o (haracter)f(that)h(is)g(not)g(to)g(b)q(e)g(in)o(terpreted)75 1125 y(as)f(part)f(of)h(its)h(name.)137 1198 y(If)e(the)g(\014rst)f(c)o (haracter)g(of)h Fo(parameter)i Fu(is)e(an)g(exclamation)g(p)q(oin)o (t,)g(a)f(lev)o(el)i(of)f(v)m(ariable)h(indirection)75 1252 y(is)k(in)o(tro)q(duced.)33 b(Bash)18 b(uses)i(the)f(v)m(alue)h (of)e(the)h(v)m(ariable)h(formed)f(from)f(the)h(rest)g(of)f Fo(parameter)j Fu(as)75 1307 y(the)16 b(name)g(of)g(the)g(v)m(ariable;) i(this)f(v)m(ariable)g(is)g(then)f(expanded)i(and)e(that)f(v)m(alue)j (is)e(used)h(in)g(the)f(rest)75 1362 y(of)g(the)h(substitution,)h (rather)e(than)h(the)f(v)m(alue)i(of)f Fo(parameter)i Fu(itself.)26 b(This)17 b(is)g(kno)o(wn)g(as)f Ft(indirect)75 1417 y(expansion)p Fu(.)j(The)c(exception)h(to)f(this)h(is)f(the)g (expansion)i(of)d($)p Ft({)p Fu(!)p Fo(pre\014x*)p Ft(})h Fu(describ)q(ed)i(b)q(elo)o(w.)137 1489 y(In)k(eac)o(h)f(of)g(the)g (cases)g(b)q(elo)o(w,)i Fo(w)o(ord)f Fu(is)f(sub)s(ject)g(to)g(tilde)h (expansion,)h(parameter)d(expansion,)75 1544 y(command)c(substitution,) h(and)f(arithmetic)h(expansion.)137 1616 y(When)h(not)g(p)q(erforming)g (substring)g(expansion,)g(Bash)g(tests)f(for)g(a)g(parameter)g(that)g (is)i(unset)e(or)75 1671 y(n)o(ull;)k(omitting)e(the)f(colon)h(results) g(in)h(a)e(test)g(only)h(for)f(a)g(parameter)g(that)g(is)h(unset.)27 b(Put)17 b(another)75 1726 y(w)o(a)o(y)l(,)c(if)i(the)g(colon)g(is)g (included,)i(the)d(op)q(erator)g(tests)g(for)f(b)q(oth)i(existence)h (and)e(that)g(the)h(v)m(alue)g(is)g(not)75 1781 y(n)o(ull;)h(if)g(the)f (colon)h(is)g(omitted,)e(the)i(op)q(erator)e(tests)h(only)g(for)g (existence.)75 1868 y Ft(${)p Fo(parameter)s Ft(:)p Fr(\000)p Fo(w)o(ord)r Ft(})315 1923 y Fu(If)g Fo(parameter)j Fu(is)e(unset)f(or) g(n)o(ull,)h(the)f(expansion)h(of)f Fo(w)o(ord)h Fu(is)g(substituted.)k (Otherwise,)315 1977 y(the)15 b(v)m(alue)i(of)d Fo(parameter)k Fu(is)e(substituted.)75 2062 y Ft(${)p Fo(parameter)s Ft(:=)p Fo(w)o(ord)r Ft(})315 2117 y Fu(If)h Fo(parameter)i Fu(is)e(unset)g(or)f(n)o(ull,)h(the)g(expansion)g(of)g Fo(w)o(ord)g Fu(is)g(assigned)g(to)f Fo(parameter)p Fu(.)315 2172 y(The)g(v)m(alue)g(of)g Fo(parameter)i Fu(is)e(then)f (substituted.)22 b(P)o(ositional)16 b(parameters)e(and)i(sp)q(ecial)315 2227 y(parameters)e(ma)o(y)h(not)g(b)q(e)h(assigned)f(to)g(in)h(this)g (w)o(a)o(y)l(.)75 2311 y Ft(${)p Fo(parameter)s Ft(:?)p Fo(w)o(ord)r Ft(})315 2366 y Fu(If)d Fo(parameter)j Fu(is)d(n)o(ull)i (or)e(unset,)g(the)g(expansion)h(of)f Fo(w)o(ord)h Fu(\(or)e(a)h (message)f(to)h(that)f(e\013ect)315 2421 y(if)i Fo(w)o(ord)i Fu(is)e(not)g(presen)o(t\))f(is)i(written)f(to)f(the)h(standard)g (error)f(and)i(the)f(shell,)h(if)g(it)f(is)g(not)315 2476 y(in)o(teractiv)o(e,)h(exits.)20 b(Otherwise,)c(the)f(v)m(alue)i (of)e Fo(parameter)i Fu(is)f(substituted.)75 2560 y Ft(${)p Fo(parameter)s Ft(:+)p Fo(w)o(ord)r Ft(})315 2615 y Fu(If)i Fo(parameter)i Fu(is)e(n)o(ull)i(or)d(unset,)h(nothing)g(is)h (substituted,)f(otherwise)g(the)g(expansion)315 2670 y(of)d Fo(w)o(ord)h Fu(is)g(substituted.)p eop %%Page: 18 20 18 19 bop 75 -58 a Fu(18)1285 b(Bash)15 b(Reference)h(Man)o(ual)75 149 y Ft(${)p Fo(parameter)s Ft(:)p Fo(o\013set)q Ft(})75 204 y(${)p Fo(parameter)s Ft(:)p Fo(o\013set)q Ft(:)p Fo(length)p Ft(})315 259 y Fu(Expands)23 b(to)f(up)h(to)f Fo(length)i Fu(c)o(haracters)d(of)i Fo(parameter)i Fu(starting)d(at)g (the)h(c)o(haracter)315 314 y(sp)q(eci\014ed)18 b(b)o(y)d Fo(o\013set)p Fu(.)k(If)d Fo(length)g Fu(is)g(omitted,)f(expands)h(to)f (the)g(substring)h(of)f Fo(parameter)315 369 y Fu(starting)j(at)g(the)h (c)o(haracter)f(sp)q(eci\014ed)i(b)o(y)f Fo(o\013set)p Fu(.)29 b Fo(length)20 b Fu(and)e Fo(o\013set)h Fu(are)f(arithmetic)315 423 y(expressions)e(\(see)g(Section)g(6.5)e([Shell)j(Arithmetic],)f (page)f(66\).)20 b(This)c(is)g(referred)g(to)e(as)315 478 y(Substring)i(Expansion.)315 551 y Fo(length)g Fu(m)o(ust)f(ev)m (aluate)i(to)e(a)g(n)o(um)o(b)q(er)h(greater)f(than)h(or)f(equal)h(to)f (zero.)21 b(If)16 b Fo(o\013set)g Fu(ev)m(al-)315 606 y(uates)i(to)f(a)g(n)o(um)o(b)q(er)h(less)h(than)f(zero,)g(the)f(v)m (alue)j(is)e(used)g(as)g(an)f(o\013set)g(from)g(the)h(end)315 661 y(of)g(the)h(v)m(alue)h(of)e Fo(parameter)p Fu(.)30 b(If)19 b Fo(parameter)i Fu(is)f(`)p Ft(@)p Fu(',)e(the)h(result)g(is)g Fo(length)h Fu(p)q(ositional)315 716 y(parameters)c(b)q(eginning)k(at)c Fo(o\013set)p Fu(.)25 b(If)17 b Fo(parameter)j Fu(is)e(an)f(arra)o(y)f (name)h(indexed)i(b)o(y)e(`)p Ft(@)p Fu(')315 770 y(or)d(`)p Ft(*)p Fu(',)g(the)h(result)h(is)f(the)g Fo(length)h Fu(mem)o(b)q(ers)f(of)f(the)h(arra)o(y)f(b)q(eginning)j(with)f Ft(${)p Fo(parame-)315 825 y(ter)s Ft([)p Fo(o\013set)q Ft(]})p Fu(.)i(Substring)d(indexing)h(is)f(zero-based)g(unless)g(the)f (p)q(ositional)i(parameters)315 880 y(are)f(used,)g(in)h(whic)o(h)g (case)g(the)f(indexing)i(starts)d(at)g(1.)75 971 y Ft(${!)p Fo(pre\014x)s Ft(*})315 1026 y Fu(Expands)k(to)g(the)g(names)f(of)h(v)m (ariables)h(whose)f(names)g(b)q(egin)h(with)g Fo(pre\014x)p Fu(,)f(separated)315 1081 y(b)o(y)d(the)g(\014rst)g(c)o(haracter)g(of)f (the)i Ft(IFS)f Fu(sp)q(ecial)h(v)m(ariable.)75 1172 y Ft(${#)p Fo(parameter)s Ft(})315 1227 y Fu(The)k(length)h(in)g(c)o (haracters)e(of)h(the)g(expanded)h(v)m(alue)h(of)d Fo(parameter)k Fu(is)e(substituted.)315 1282 y(If)h Fo(parameter)i Fu(is)e(`)p Ft(*)p Fu(')e(or)h(`)p Ft(@)p Fu(',)h(the)f(v)m(alue)i(substituted)f (is)g(the)g(n)o(um)o(b)q(er)g(of)f(p)q(ositional)315 1337 y(parameters.)g(If)16 b Fo(parameter)j Fu(is)d(an)g(arra)o(y)f (name)h(subscripted)h(b)o(y)f(`)p Ft(*)p Fu(')f(or)g(`)p Ft(@)p Fu(',)g(the)h(v)m(alue)315 1391 y(substituted)g(is)g(the)f(n)o (um)o(b)q(er)g(of)g(elemen)o(ts)h(in)g(the)f(arra)o(y)l(.)75 1483 y Ft(${)p Fo(parameter)s Ft(#)p Fo(w)o(ord)r Ft(})75 1538 y(${)p Fo(parameter)s Ft(##)p Fo(w)o(ord)r Ft(})315 1592 y Fu(The)h Fo(w)o(ord)h Fu(is)g(expanded)g(to)e(pro)q(duce)i(a)f (pattern)f(just)h(as)f(in)i(\014lename)g(expansion)g(\(see)315 1647 y(Section)i(3.5.8)d([Filename)i(Expansion],)g(page)g(20\).)26 b(If)18 b(the)g(pattern)f(matc)o(hes)g(the)h(b)q(e-)315 1702 y(ginning)d(of)f(the)g(expanded)h(v)m(alue)h(of)d Fo(parameter)p Fu(,)h(then)g(the)g(result)h(of)e(the)h(expansion)h(is) 315 1757 y(the)j(expanded)h(v)m(alue)g(of)e Fo(parameter)k Fu(with)d(the)g(shortest)f(matc)o(hing)h(pattern)f(\(the)h(`)p Ft(#)p Fu(')315 1812 y(case\))12 b(or)g(the)g(longest)h(matc)o(hing)f (pattern)g(\(the)g(`)p Ft(##)p Fu(')f(case\))h(deleted.)21 b(If)12 b Fo(parameter)j Fu(is)e(`)p Ft(@)p Fu(')315 1866 y(or)h(`)p Ft(*)p Fu(',)f(the)h(pattern)g(remo)o(v)m(al)g(op)q (eration)h(is)f(applied)i(to)e(eac)o(h)g(p)q(ositional)i(parameter)d (in)315 1921 y(turn,)j(and)g(the)g(expansion)g(is)h(the)f(resultan)o(t) g(list.)22 b(If)16 b Fo(parameter)j Fu(is)d(an)g(arra)o(y)f(v)m (ariable)315 1976 y(subscripted)21 b(with)g(`)p Ft(@)p Fu(')e(or)g(`)p Ft(*)p Fu(',)h(the)g(pattern)g(remo)o(v)m(al)g(op)q (eration)g(is)h(applied)h(to)d(eac)o(h)315 2031 y(mem)o(b)q(er)c(of)g (the)g(arra)o(y)f(in)i(turn,)f(and)h(the)f(expansion)h(is)g(the)f (resultan)o(t)g(list.)75 2122 y Ft(${)p Fo(parameter)s Ft(\045)p Fo(w)o(ord)r Ft(})75 2177 y(${)p Fo(parameter)s Ft(\045\045)p Fo(w)o(ord)r Ft(})315 2232 y Fu(The)j Fo(w)o(ord)h Fu(is)f(expanded)h(to)e(pro)q(duce)i(a)e(pattern)g(just)h(as)f(in)i (\014lename)f(expansion.)29 b(If)315 2286 y(the)22 b(pattern)f(matc)o (hes)g(a)g(trailing)h(p)q(ortion)g(of)f(the)h(expanded)g(v)m(alue)h(of) e Fo(parameter)p Fu(,)315 2341 y(then)f(the)g(result)g(of)f(the)h (expansion)g(is)g(the)g(v)m(alue)h(of)e Fo(parameter)j Fu(with)e(the)g(shortest)315 2396 y(matc)o(hing)15 b(pattern)f(\(the)h (`)p Ft(\045)p Fu(')e(case\))i(or)f(the)h(longest)g(matc)o(hing)g (pattern)f(\(the)h(`)p Ft(\045\045)p Fu(')e(case\))315 2451 y(deleted.)25 b(If)17 b Fo(parameter)i Fu(is)e(`)p Ft(@)p Fu(')e(or)h(`)p Ft(*)p Fu(',)g(the)g(pattern)g(remo)o(v)m(al)h (op)q(eration)f(is)h(applied)i(to)315 2506 y(eac)o(h)g(p)q(ositional)h (parameter)d(in)j(turn,)f(and)g(the)f(expansion)i(is)f(the)f(resultan)o (t)h(list.)31 b(If)315 2560 y Fo(parameter)18 b Fu(is)e(an)g(arra)o(y)e (v)m(ariable)j(subscripted)g(with)f(`)p Ft(@)p Fu(')f(or)g(`)p Ft(*)p Fu(',)g(the)h(pattern)f(remo)o(v)m(al)315 2615 y(op)q(eration)g(is)g(applied)i(to)d(eac)o(h)h(mem)o(b)q(er)g(of)g(the) g(arra)o(y)e(in)j(turn,)f(and)g(the)g(expansion)g(is)315 2670 y(the)g(resultan)o(t)g(list.)p eop %%Page: 19 21 19 20 bop 75 -58 a Fu(Chapter)15 b(3:)k(Basic)d(Shell)h(F)l(eatures) 1123 b(19)75 149 y Ft(${)p Fo(parameter)s Ft(/)p Fo(pattern)p Ft(/)p Fo(string)t Ft(})75 204 y(${)p Fo(parameter)s Ft(//)p Fo(pattern)p Ft(/)p Fo(string)t Ft(})315 259 y Fu(The)19 b Fo(pattern)f Fu(is)h(expanded)h(to)e(pro)q(duce)h(a)g (pattern)f(just)g(as)g(in)i(\014lename)f(expansion.)315 314 y Fo(P)o(arameter)i Fu(is)e(expanded)i(and)e(the)g(longest)g(matc)o (h)f(of)h Fo(pattern)f Fu(against)h(its)g(v)m(alue)h(is)315 369 y(replaced)f(with)g Fo(string)p Fu(.)28 b(In)19 b(the)f(\014rst)g (form,)g(only)h(the)f(\014rst)g(matc)o(h)f(is)i(replaced.)30 b(The)315 423 y(second)14 b(form)e(causes)h(all)i(matc)o(hes)d(of)h Fo(pattern)g Fu(to)f(b)q(e)i(replaced)g(with)g Fo(string)p Fu(.)19 b(If)13 b Fo(pattern)315 478 y Fu(b)q(egins)19 b(with)f(`)p Ft(#)p Fu(',)f(it)h(m)o(ust)f(matc)o(h)g(at)g(the)h(b)q (eginning)i(of)d(the)h(expanded)h(v)m(alue)g(of)e Fo(pa-)315 533 y(rameter)p Fu(.)k(If)16 b Fo(pattern)g Fu(b)q(egins)h(with)f(`)p Ft(\045)p Fu(',)f(it)h(m)o(ust)f(matc)o(h)h(at)f(the)h(end)g(of)g(the)g (expanded)315 588 y(v)m(alue)h(of)f Fo(parameter)p Fu(.)23 b(If)16 b Fo(string)k Fu(is)d(n)o(ull,)g(matc)o(hes)f(of)g Fo(pattern)g Fu(are)g(deleted)h(and)g(the)f Ft(/)315 643 y Fu(follo)o(wing)i Fo(pattern)f Fu(ma)o(y)g(b)q(e)i(omitted.)27 b(If)18 b Fo(parameter)i Fu(is)e(`)p Ft(@)p Fu(')e(or)i(`)p Ft(*)p Fu(',)e(the)i(substitution)315 697 y(op)q(eration)d(is)g (applied)h(to)e(eac)o(h)h(p)q(ositional)h(parameter)e(in)h(turn,)f(and) h(the)g(expansion)g(is)315 752 y(the)h(resultan)o(t)f(list.)22 b(If)16 b Fo(parameter)i Fu(is)e(an)g(arra)o(y)e(v)m(ariable)j (subscripted)g(with)f(`)p Ft(@)p Fu(')f(or)g(`)p Ft(*)p Fu(',)315 807 y(the)g(substitution)h(op)q(eration)g(is)f(applied)i(to)e (eac)o(h)g(mem)o(b)q(er)g(of)g(the)g(arra)o(y)f(in)i(turn,)f(and)315 862 y(the)g(expansion)h(is)g(the)f(resultan)o(t)g(list.)75 985 y Fm(3.5.4)30 b(Command)21 b(Substitution)137 1087 y Fu(Command)15 b(substitution)h(allo)o(ws)g(the)g(output)f(of)g(a)g (command)g(to)g(replace)i(the)e(command)g(itself.)75 1141 y(Command)g(substitution)h(o)q(ccurs)f(when)h(a)f(command)g(is)h (enclosed)g(as)f(follo)o(ws:)195 1211 y Ft($\()p Fo(command)r Ft(\))75 1284 y Fu(or)195 1354 y Ft(`)p Fo(command)r Ft(`)75 1427 y Fu(Bash)23 b(p)q(erforms)f(the)g(expansion)i(b)o(y)e (executing)i Fo(command)g Fu(and)f(replacing)g(the)g(command)f(sub-)75 1481 y(stitution)f(with)f(the)g(standard)g(output)g(of)g(the)g (command,)h(with)f(an)o(y)g(trailing)h(newlines)h(deleted.)75 1536 y(Em)o(b)q(edded)17 b(newlines)g(are)f(not)f(deleted,)i(but)f (they)g(ma)o(y)f(b)q(e)h(remo)o(v)o(ed)f(during)i(w)o(ord)e(splitting.) 23 b(The)75 1591 y(command)15 b(substitution)h Ft($\(cat)f Fo(\014le)s Ft(\))g Fu(can)h(b)q(e)f(replaced)i(b)o(y)e(the)g(equiv)m (alen)o(t)i(but)e(faster)g Ft($\(<)g Fo(\014le)s Ft(\))p Fu(.)137 1664 y(When)j(the)f(old-st)o(yle)h(bac)o(kquote)f(form)f(of)h (substitution)g(is)h(used,)g(bac)o(kslash)f(retains)g(its)h(literal)75 1719 y(meaning)i(except)f(when)h(follo)o(w)o(ed)f(b)o(y)g(`)p Ft($)p Fu(',)g(`)p Ft(`)p Fu(',)g(or)f(`)p Ft(\\)p Fu('.)31 b(The)19 b(\014rst)f(bac)o(kquote)h(not)g(preceded)h(b)o(y)f(a)75 1773 y(bac)o(kslash)g(terminates)f(the)g(command)g(substitution.)30 b(When)19 b(using)g(the)g Ft($\()p Fo(command)r Ft(\))e Fu(form,)h(all)75 1828 y(c)o(haracters)c(b)q(et)o(w)o(een)i(the)f (paren)o(theses)h(mak)o(e)e(up)i(the)f(command;)g(none)g(are)g(treated) g(sp)q(ecially)l(.)137 1901 y(Command)c(substitutions)i(ma)o(y)d(b)q(e) j(nested.)19 b(T)l(o)11 b(nest)h(when)g(using)g(the)g(bac)o(kquoted)f (form,)g(escap)q(e)75 1956 y(the)k(inner)i(bac)o(kquotes)d(with)i(bac)o (kslashes.)137 2029 y(If)f(the)g(substitution)g(app)q(ears)g(within)h (double)g(quotes,)e(w)o(ord)g(splitting)i(and)e(\014lename)i(expansion) 75 2083 y(are)f(not)g(p)q(erformed)g(on)g(the)h(results.)75 2206 y Fm(3.5.5)30 b(Arithmetic)21 b(Expansion)137 2308 y Fu(Arithmetic)c(expansion)h(allo)o(ws)e(the)g(ev)m(aluation)i(of)d (an)i(arithmetic)f(expression)h(and)g(the)f(substi-)75 2363 y(tution)f(of)g(the)g(result.)21 b(The)15 b(format)f(for)h (arithmetic)g(expansion)i(is:)195 2433 y Ft($\(\()23 b Fo(expression)i Ft(\)\))137 2506 y Fu(The)17 b(expression)h(is)f (treated)g(as)f(if)h(it)h(w)o(ere)e(within)i(double)g(quotes,)f(but)g (a)f(double)i(quote)f(inside)75 2560 y(the)i(paren)o(theses)g(is)h(not) e(treated)h(sp)q(ecially)l(.)33 b(All)21 b(tok)o(ens)d(in)i(the)f (expression)h(undergo)f(parameter)75 2615 y(expansion,)j(command)e (substitution,)h(and)g(quote)f(remo)o(v)m(al.)34 b(Arithmetic)21 b(substitutions)g(ma)o(y)e(b)q(e)75 2670 y(nested.)p eop %%Page: 20 22 20 21 bop 75 -58 a Fu(20)1285 b(Bash)15 b(Reference)h(Man)o(ual)137 149 y(The)i(ev)m(aluation)h(is)f(p)q(erformed)g(according)h(to)e(the)h (rules)g(listed)h(b)q(elo)o(w)f(\(see)g(Section)h(6.5)d([Shell)75 204 y(Arithmetic],)f(page)h(66\).)j(If)c(the)g(expression)h(is)g(in)o (v)m(alid,)h(Bash)f(prin)o(ts)f(a)g(message)g(indicating)i(failure)75 259 y(to)e(the)g(standard)g(error)f(and)h(no)h(substitution)g(o)q (ccurs.)75 377 y Fm(3.5.6)30 b(Pro)r(cess)20 b(Substitution)137 476 y Fu(Pro)q(cess)d(substitution)h(is)f(supp)q(orted)h(on)f(systems)f (that)g(supp)q(ort)h(named)h(pip)q(es)g(\()p Fp(fif)o(o)p Fu(s\))e(or)h(the)75 531 y(`)p Ft(/dev/fd)p Fu(')c(metho)q(d)j(of)f (naming)g(op)q(en)h(\014les.)21 b(It)15 b(tak)o(es)g(the)g(form)f(of) 195 598 y Ft(<\()p Fo(list)q Ft(\))75 668 y Fu(or)195 735 y Ft(>\()p Fo(list)q Ft(\))75 805 y Fu(The)e(pro)q(cess)g Fo(list)h Fu(is)g(run)f(with)g(its)g(input)g(or)g(output)f(connected)i (to)e(a)g Fp(fif)o(o)h Fu(or)f(some)h(\014le)h(in)f(`)p Ft(/dev/fd)p Fu('.)75 860 y(The)j(name)f(of)g(this)h(\014le)g(is)g (passed)f(as)g(an)h(argumen)o(t)e(to)h(the)g(curren)o(t)h(command)f(as) g(the)g(result)h(of)f(the)75 915 y(expansion.)24 b(If)17 b(the)f Ft(>\()p Fo(list)q Ft(\))h Fu(form)f(is)h(used,)g(writing)f(to) g(the)h(\014le)g(will)h(pro)o(vide)f(input)g(for)f Fo(list)p Fu(.)24 b(If)17 b(the)75 970 y Ft(<\()p Fo(list)q Ft(\))e Fu(form)g(is)g(used,)g(the)g(\014le)h(passed)f(as)g(an)g(argumen)o(t)f (should)i(b)q(e)f(read)g(to)g(obtain)g(the)g(output)f(of)75 1024 y Fo(list)p Fu(.)21 b(Note)14 b(that)g(no)h(space)g(ma)o(y)f(app)q (ear)h(b)q(et)o(w)o(een)g(the)g Ft(<)g Fu(or)f Ft(>)h Fu(and)g(the)g(left)g(paren)o(thesis,)g(otherwise)75 1079 y(the)g(construct)g(w)o(ould)h(b)q(e)g(in)o(terpreted)f(as)g(a)g (redirection.)137 1149 y(When)k(a)o(v)m(ailable,)h(pro)q(cess)f (substitution)g(is)g(p)q(erformed)f(sim)o(ultaneously)i(with)e (parameter)g(and)75 1204 y(v)m(ariable)f(expansion,)e(command)g (substitution,)h(and)f(arithmetic)h(expansion.)75 1322 y Fm(3.5.7)30 b(W)-5 b(ord)20 b(Splitting)137 1421 y Fu(The)f(shell)g(scans)f(the)h(results)f(of)g(parameter)f(expansion,)i (command)f(substitution,)h(and)g(arith-)75 1476 y(metic)d(expansion)g (that)e(did)j(not)d(o)q(ccur)i(within)g(double)h(quotes)e(for)f(w)o (ord)h(splitting.)137 1546 y(The)23 b(shell)g(treats)e(eac)o(h)h(c)o (haracter)g(of)f Ft($IFS)h Fu(as)f(a)h(delimiter,)j(and)e(splits)g(the) f(results)g(of)g(the)75 1601 y(other)d(expansions)i(in)o(to)f(w)o(ords) f(on)h(these)g(c)o(haracters.)33 b(If)20 b Ft(IFS)f Fu(is)i(unset,)g (or)e(its)h(v)m(alue)h(is)g(exactly)75 1655 y Ft() p Fu(,)10 b(the)i(default,)h(then)f(an)o(y)g(sequence)i(of)d Ft(IFS)h Fu(c)o(haracters)g(serv)o(es)g(to)f(delimit)75 1710 y(w)o(ords.)18 b(If)11 b Ft(IFS)g Fu(has)g(a)g(v)m(alue)h(other)f (than)g(the)h(default,)g(then)f(sequences)i(of)d(the)i(whitespace)g(c)o (haracters)75 1765 y Ft(space)h Fu(and)h Ft(tab)g Fu(are)f(ignored)i (at)e(the)h(b)q(eginning)i(and)e(end)g(of)g(the)g(w)o(ord,)f(as)g(long) i(as)e(the)h(whitespace)75 1820 y(c)o(haracter)i(is)g(in)h(the)g(v)m (alue)g(of)f Ft(IFS)g Fu(\(an)g Ft(IFS)g Fu(whitespace)h(c)o (haracter\).)22 b(An)o(y)16 b(c)o(haracter)g(in)h Ft(IFS)f Fu(that)75 1875 y(is)g(not)f Ft(IFS)f Fu(whitespace,)i(along)f(with)h (an)o(y)f(adjacen)o(t)f Ft(IFS)h Fu(whitespace)h(c)o(haracters,)e (delimits)j(a)e(\014eld.)75 1929 y(A)h(sequence)h(of)f Ft(IFS)g Fu(whitespace)h(c)o(haracters)e(is)h(also)h(treated)e(as)h(a)g (delimiter.)24 b(If)16 b(the)g(v)m(alue)i(of)d Ft(IFS)75 1984 y Fu(is)h(n)o(ull,)g(no)f(w)o(ord)g(splitting)h(o)q(ccurs.)137 2054 y(Explicit)24 b(n)o(ull)f(argumen)o(ts)e(\()p Ft("")g Fu(or)g Ft('')p Fu(\))g(are)g(retained.)40 b(Unquoted)22 b(implicit)i(n)o(ull)f(argumen)o(ts,)75 2109 y(resulting)13 b(from)e(the)h(expansion)g(of)g(parameters)e(that)h(ha)o(v)o(e)h(no)f (v)m(alues,)j(are)d(remo)o(v)o(ed.)18 b(If)12 b(a)g(parameter)75 2164 y(with)k(no)f(v)m(alue)h(is)g(expanded)g(within)g(double)h (quotes,)e(a)f(n)o(ull)j(argumen)o(t)d(results)i(and)f(is)h(retained.) 137 2234 y(Note)f(that)g(if)g(no)g(expansion)i(o)q(ccurs,)e(no)g (splitting)h(is)g(p)q(erformed.)75 2352 y Fm(3.5.8)30 b(Filename)20 b(Expansion)137 2451 y Fu(After)11 b(w)o(ord)g (splitting,)i(unless)f(the)f(`)p Ft(-f)p Fu(')g(option)g(has)g(b)q(een) h(set)f(\(see)h(Section)g(4.3)e([The)h(Set)g(Builtin],)75 2506 y(page)i(46\),)f(Bash)i(scans)f(eac)o(h)g(w)o(ord)g(for)f(the)i(c) o(haracters)e(`)p Ft(*)p Fu(',)h(`)p Ft(?)p Fu(',)f(and)h(`)p Ft([)p Fu('.)19 b(If)13 b(one)g(of)g(these)h(c)o(haracters)75 2560 y(app)q(ears,)f(then)h(the)g(w)o(ord)e(is)i(regarded)f(as)g(a)g Fo(pattern)p Fu(,)g(and)h(replaced)g(with)g(an)f(alphab)q(etically)j (sorted)75 2615 y(list)h(of)e(\014le)i(names)f(matc)o(hing)g(the)g (pattern.)22 b(If)16 b(no)g(matc)o(hing)g(\014le)h(names)f(are)f (found,)h(and)g(the)g(shell)75 2670 y(option)e Ft(nullglob)f Fu(is)i(disabled,)g(the)f(w)o(ord)g(is)g(left)h(unc)o(hanged.)20 b(If)14 b(the)g Ft(nullglob)f Fu(option)i(is)f(set,)g(and)p eop %%Page: 21 23 21 22 bop 75 -58 a Fu(Chapter)15 b(3:)k(Basic)d(Shell)h(F)l(eatures) 1123 b(21)75 149 y(no)15 b(matc)o(hes)g(are)g(found,)g(the)g(w)o(ord)f (is)i(remo)o(v)o(ed.)j(If)d(the)f(shell)i(option)e Ft(nocaseglob)f Fu(is)i(enabled,)g(the)75 204 y(matc)o(h)f(is)g(p)q(erformed)h(without) f(regard)g(to)f(the)h(case)h(of)e(alphab)q(etic)j(c)o(haracters.)137 272 y(When)12 b(a)e(pattern)h(is)h(used)f(for)g(\014lename)h (generation,)f(the)h(c)o(haracter)e(`)p Ft(.)p Fu(')g(at)h(the)g(start) e(of)i(a)g(\014lename)75 327 y(or)g(immediately)j(follo)o(wing)e(a)g (slash)g(m)o(ust)f(b)q(e)h(matc)o(hed)g(explicitly)l(,)j(unless)e(the)f (shell)h(option)f Ft(dotglob)75 382 y Fu(is)k(set.)21 b(When)16 b(matc)o(hing)g(a)f(\014le)i(name,)f(the)f(slash)h(c)o (haracter)f(m)o(ust)g(alw)o(a)o(ys)g(b)q(e)i(matc)o(hed)e(explicitly)l (.)75 436 y(In)h(other)f(cases,)f(the)i(`)p Ft(.)p Fu(')e(c)o(haracter) g(is)i(not)f(treated)g(sp)q(ecially)l(.)137 504 y(See)h(the)f (description)h(of)f Ft(shopt)f Fu(in)i(Section)f(4.2)f([Bash)h (Builtins],)h(page)f(36,)f(for)g(a)h(description)h(of)75 559 y(the)f Ft(nocaseglob)p Fu(,)f Ft(nullglob)p Fu(,)f(and)j Ft(dotglob)e Fu(options.)137 627 y(The)20 b Ft(GLOBIGNORE)e Fu(shell)k(v)m(ariable)f(ma)o(y)e(b)q(e)h(used)g(to)f(restrict)h(the)g (set)f(of)g(\014lenames)i(matc)o(hing)75 682 y(a)h(pattern.)40 b(If)22 b Ft(GLOBIGNORE)e Fu(is)j(set,)g(eac)o(h)f(matc)o(hing)g (\014lename)h(that)f(also)g(matc)o(hes)f(one)h(of)g(the)75 736 y(patterns)14 b(in)h Ft(GLOBIGNORE)e Fu(is)i(remo)o(v)o(ed)f(from)f (the)i(list)g(of)f(matc)o(hes.)19 b(The)c(\014lenames)g(`)p Ft(.)p Fu(')e(and)i(`)p Ft(..)p Fu(')e(are)75 791 y(alw)o(a)o(ys)i (ignored,)h(ev)o(en)g(when)g Ft(GLOBIGNORE)e Fu(is)i(set.)22 b(Ho)o(w)o(ev)o(er,)14 b(setting)i Ft(GLOBIGNORE)e Fu(has)h(the)h (e\013ect)75 846 y(of)d(enabling)j(the)d Ft(dotglob)g Fu(shell)i(option,)f(so)g(all)g(other)g(\014lenames)g(b)q(eginning)i (with)e(a)g(`)p Ft(.)p Fu(')f(will)i(matc)o(h.)75 901 y(T)l(o)k(get)f(the)h(old)g(b)q(eha)o(vior)h(of)e(ignoring)i (\014lenames)g(b)q(eginning)h(with)e(a)g(`)p Ft(.)p Fu(',)f(mak)o(e)h (`)p Ft(.*)p Fu(')e(one)i(of)g(the)75 956 y(patterns)c(in)h Ft(GLOBIGNORE)p Fu(.)i(The)e Ft(dotglob)e Fu(option)h(is)h(disabled)h (when)f Ft(GLOBIGNORE)d Fu(is)j(unset.)75 1069 y Fm(3.5.8.1)30 b(P)n(attern)20 b(Matc)n(hing)137 1165 y Fu(An)o(y)d(c)o(haracter)f (that)g(app)q(ears)h(in)g(a)g(pattern,)f(other)g(than)h(the)g(sp)q (ecial)h(pattern)e(c)o(haracters)g(de-)75 1220 y(scrib)q(ed)h(b)q(elo)o (w,)g(matc)o(hes)e(itself.)24 b(The)16 b Fp(nul)g Fu(c)o(haracter)f(ma) o(y)h(not)f(o)q(ccur)i(in)f(a)g(pattern.)22 b(The)16 b(sp)q(ecial)75 1275 y(pattern)f(c)o(haracters)f(m)o(ust)h(b)q(e)h (quoted)f(if)h(they)f(are)g(to)f(b)q(e)i(matc)o(hed)f(literally)l(.)137 1343 y(The)h(sp)q(ecial)h(pattern)d(c)o(haracters)h(ha)o(v)o(e)g(the)g (follo)o(wing)h(meanings:)75 1423 y Ft(*)216 b Fu(Matc)o(hes)15 b(an)o(y)f(string,)h(including)j(the)d(n)o(ull)i(string.)75 1504 y Ft(?)216 b Fu(Matc)o(hes)15 b(an)o(y)f(single)j(c)o(haracter.)75 1584 y Ft([...)o(])121 b Fu(Matc)o(hes)12 b(an)o(y)g(one)g(of)g(the)h (enclosed)h(c)o(haracters.)k(A)12 b(pair)h(of)f(c)o(haracters)g (separated)g(b)o(y)g(a)315 1639 y(h)o(yphen)j(denotes)f(a)f Fo(range)h(expression)p Fu(;)h(an)o(y)e(c)o(haracter)g(that)h(sorts)e (b)q(et)o(w)o(een)j(those)e(t)o(w)o(o)315 1693 y(c)o(haracters,)f (inclusiv)o(e,)j(using)e(the)f(curren)o(t)h(lo)q(cale's)g(collating)h (sequence)f(and)g(c)o(haracter)315 1748 y(set,)i(is)g(matc)o(hed.)20 b(If)15 b(the)h(\014rst)e(c)o(haracter)h(follo)o(wing)h(the)f(`)p Ft([)p Fu(')f(is)i(a)f(`)p Ft(!)p Fu(')f(or)h(a)g(`)p Ft(^)p Fu(')f(then)h(an)o(y)315 1803 y(c)o(haracter)d(not)g(enclosed)h (is)g(matc)o(hed.)19 b(A)12 b(`)p Fr(\000)p Fu(')g(ma)o(y)g(b)q(e)h (matc)o(hed)f(b)o(y)g(including)j(it)e(as)f(the)315 1858 y(\014rst)k(or)g(last)h(c)o(haracter)f(in)h(the)g(set.)23 b(A)17 b(`)p Ft(])p Fu(')f(ma)o(y)f(b)q(e)j(matc)o(hed)e(b)o(y)h (including)i(it)e(as)f(the)315 1913 y(\014rst)c(c)o(haracter)h(in)g (the)g(set.)19 b(The)13 b(sorting)g(order)f(of)h(c)o(haracters)f(in)h (range)g(expressions)g(is)315 1967 y(determined)g(b)o(y)e(the)h(curren) o(t)f(lo)q(cale)i(and)f(the)f(v)m(alue)i(of)e(the)h Ft(LC_COLLATE)e Fu(shell)j(v)m(ariable,)315 2022 y(if)j(set.)315 2090 y(F)l(or)g(example,)h(in)g(the)g(default)g(C)f(lo)q(cale,)i(`)p Ft([a-dx-z])p Fu(')c(is)j(equiv)m(alen)o(t)i(to)c(`)p Ft([abcdxyz])p Fu('.)315 2144 y(Man)o(y)33 b(lo)q(cales)i(sort)e(c)o (haracters)g(in)i(dictionary)f(order,)k(and)c(in)h(these)f(lo)q(cales) 315 2199 y(`)p Ft([a-dx-z])p Fu(')17 b(is)i(t)o(ypically)i(not)d(equiv) m(alen)o(t)j(to)d(`)p Ft([abcdxyz])p Fu(';)h(it)g(migh)o(t)g(b)q(e)g (equiv)m(alen)o(t)315 2254 y(to)d(`)p Ft([aBbCcDdxXyYz])p Fu(',)e(for)h(example.)25 b(T)l(o)16 b(obtain)h(the)g(traditional)g(in) o(terpretation)f(of)315 2309 y(ranges)g(in)h(brac)o(k)o(et)f (expressions,)h(y)o(ou)f(can)g(force)g(the)h(use)f(of)g(the)h(C)f(lo)q (cale)i(b)o(y)e(setting)315 2364 y(the)f Ft(LC_COLLATE)f Fu(or)h Ft(LC_ALL)f Fu(en)o(vironmen)o(t)i(v)m(ariable)g(to)f(the)g(v)m (alue)h(`)p Ft(C)p Fu('.)315 2431 y(Within)d(`)p Ft([)p Fu(')d(and)i(`)p Ft(])p Fu(',)f Fo(c)o(haracter)g(classes)j Fu(can)e(b)q(e)g(sp)q(eci\014ed)i(using)e(the)g(syn)o(tax)f Ft([:)p Fo(class)r Ft(:])p Fu(,)315 2486 y(where)j Fo(class)h Fu(is)f(one)g(of)e(the)i(follo)o(wing)g(classes)g(de\014ned)h(in)f(the) f Fp(posix)g Fu(1003.2)f(standard:)435 2551 y Ft(alnum)71 b(alpha)g(ascii)g(blank)g(cntrl)g(digit)f(graph)h(lower)435 2602 y(print)g(punct)g(space)g(upper)g(xdigit)315 2670 y Fu(A)15 b(c)o(haracter)g(class)g(matc)o(hes)g(an)o(y)g(c)o(haracter)f (b)q(elonging)j(to)e(that)f(class.)p eop %%Page: 22 24 22 23 bop 75 -58 a Fu(22)1285 b(Bash)15 b(Reference)h(Man)o(ual)315 149 y(Within)d(`)p Ft([)p Fu(')f(and)g(`)p Ft(])p Fu(',)f(an)i Fo(equiv)m(alence)h(class)h Fu(can)d(b)q(e)h(sp)q(eci\014ed)h(using)f (the)g(syn)o(tax)e Ft([=)p Fo(c)s Ft(=])p Fu(,)315 204 y(whic)o(h)16 b(matc)o(hes)e(all)i(c)o(haracters)d(with)j(the)e(same)h (collation)h(w)o(eigh)o(t)e(\(as)g(de\014ned)i(b)o(y)f(the)315 259 y(curren)o(t)g(lo)q(cale\))h(as)f(the)g(c)o(haracter)g Fo(c)p Fu(.)315 326 y(Within)d(`)p Ft([)p Fu(')e(and)h(`)p Ft(])p Fu(',)f(the)h(syn)o(tax)f Ft([.)p Fo(sym)o(b)q(ol)r Ft(.])g Fu(matc)o(hes)g(the)h(collating)h(sym)o(b)q(ol)f Fo(sym)o(b)q(ol)p Fu(.)137 406 y(If)k(the)g Ft(extglob)f Fu(shell)i(option)f(is)g(enabled)i(using)e(the)g Ft(shopt)f Fu(builtin,)j(sev)o(eral)e(extended)g(pattern)75 461 y(matc)o(hing)j(op)q(erators)f(are)g(recognized.)29 b(In)18 b(the)g(follo)o(wing)h(description,)g(a)f Fo(pattern-list)h Fu(is)f(a)g(list)g(of)75 516 y(one)e(or)g(more)g(patterns)g(separated)g (b)o(y)g(a)g(`)p Ft(|)p Fu('.)22 b(Comp)q(osite)16 b(patterns)g(ma)o(y) f(b)q(e)i(formed)f(using)h(one)f(or)75 571 y(more)f(of)g(the)g(follo)o (wing)h(sub-patterns:)75 651 y Ft(?\()p Fo(pattern-list)q Ft(\))315 705 y Fu(Matc)o(hes)f(zero)g(or)f(one)i(o)q(ccurrence)g(of)f (the)g(giv)o(en)h(patterns.)75 785 y Ft(*\()p Fo(pattern-list)q Ft(\))315 840 y Fu(Matc)o(hes)f(zero)g(or)f(more)h(o)q(ccurrences)h(of) f(the)g(giv)o(en)h(patterns.)75 920 y Ft(+\()p Fo(pattern-list)q Ft(\))315 975 y Fu(Matc)o(hes)f(one)g(or)g(more)f(o)q(ccurrences)j(of)d (the)i(giv)o(en)f(patterns.)75 1055 y Ft(@\()p Fo(pattern-list)q Ft(\))315 1109 y Fu(Matc)o(hes)g(exactly)g(one)g(of)g(the)g(giv)o(en)h (patterns.)75 1189 y Ft(!\()p Fo(pattern-list)q Ft(\))315 1244 y Fu(Matc)o(hes)f(an)o(ything)g(except)h(one)f(of)g(the)g(giv)o (en)h(patterns.)75 1356 y Fm(3.5.9)30 b(Quote)20 b(Remo)n(v)m(al)137 1453 y Fu(After)c(the)g(preceding)i(expansions,)f(all)g(unquoted)g(o)q (ccurrences)g(of)f(the)g(c)o(haracters)f(`)p Ft(\\)p Fu(',)h(`)p Ft(')p Fu(',)f(and)75 1508 y(`)p Ft(")p Fu(')f(that)h(did)h (not)f(result)g(from)g(one)g(of)g(the)g(ab)q(o)o(v)o(e)g(expansions)h (are)f(remo)o(v)o(ed.)75 1637 y Fs(3.6)33 b(Redirections)137 1733 y Fu(Before)17 b(a)f(command)g(is)h(executed,)g(its)g(input)h(and) e(output)h(ma)o(y)e(b)q(e)i Fo(redirected)j Fu(using)d(a)f(sp)q(ecial) 75 1788 y(notation)g(in)o(terpreted)g(b)o(y)g(the)h(shell.)24 b(Redirection)17 b(ma)o(y)e(also)h(b)q(e)h(used)f(to)g(op)q(en)h(and)f (close)h(\014les)g(for)75 1843 y(the)g(curren)o(t)f(shell)i(execution)g (en)o(vironmen)o(t.)24 b(The)16 b(follo)o(wing)i(redirection)g(op)q (erators)d(ma)o(y)h(precede)75 1898 y(or)e(app)q(ear)h(an)o(ywhere)g (within)h(a)e(simple)i(command)f(or)f(ma)o(y)g(follo)o(w)h(a)f (command.)20 b(Redirections)15 b(are)75 1952 y(pro)q(cessed)h(in)g(the) f(order)g(they)g(app)q(ear,)g(from)g(left)g(to)g(righ)o(t.)137 2020 y(In)g(the)g(follo)o(wing)g(descriptions,)g(if)g(the)f(\014le)i (descriptor)f(n)o(um)o(b)q(er)f(is)h(omitted,)f(and)h(the)f(\014rst)g (c)o(har-)75 2075 y(acter)20 b(of)g(the)g(redirection)i(op)q(erator)d (is)i(`)p Ft(<)p Fu(',)g(the)f(redirection)i(refers)e(to)g(the)g (standard)g(input)h(\(\014le)75 2129 y(descriptor)c(0\).)23 b(If)17 b(the)f(\014rst)g(c)o(haracter)g(of)g(the)h(redirection)h(op)q (erator)d(is)i(`)p Ft(>)p Fu(',)f(the)g(redirection)i(refers)75 2184 y(to)d(the)g(standard)g(output)g(\(\014le)h(descriptor)f(1\).)137 2252 y(The)i(w)o(ord)e(follo)o(wing)i(the)f(redirection)i(op)q(erator)d (in)i(the)f(follo)o(wing)h(descriptions,)h(unless)f(other-)75 2306 y(wise)11 b(noted,)g(is)g(sub)s(jected)g(to)f(brace)h(expansion,)h (tilde)f(expansion,)h(parameter)e(expansion,)i(command)75 2361 y(substitution,)k(arithmetic)g(expansion,)g(quote)g(remo)o(v)m (al,)f(\014lename)h(expansion,)h(and)e(w)o(ord)g(splitting.)75 2416 y(If)g(it)h(expands)g(to)e(more)h(than)g(one)g(w)o(ord,)g(Bash)g (rep)q(orts)g(an)g(error.)137 2483 y(Note)g(that)g(the)g(order)g(of)g (redirections)h(is)g(signi\014can)o(t.)21 b(F)l(or)14 b(example,)i(the)f(command)195 2548 y Ft(ls)24 b(>)f Fo(dirlist)k Ft(2>&1)75 2615 y Fu(directs)14 b(b)q(oth)g(standard)g (output)f(\(\014le)i(descriptor)f(1\))f(and)h(standard)g(error)f (\(\014le)h(descriptor)h(2\))e(to)g(the)75 2670 y(\014le)j Fo(dirlist)p Fu(,)h(while)f(the)g(command)p eop %%Page: 23 25 23 24 bop 75 -58 a Fu(Chapter)15 b(3:)k(Basic)d(Shell)h(F)l(eatures) 1123 b(23)195 149 y Ft(ls)24 b(2>&1)f(>)h Fo(dirlist)75 214 y Fu(directs)17 b(only)h(the)f(standard)f(output)h(to)f(\014le)i Fo(dirlist)p Fu(,)g(b)q(ecause)g(the)f(standard)f(error)g(w)o(as)g (duplicated)75 269 y(as)f(standard)g(output)g(b)q(efore)g(the)g (standard)g(output)g(w)o(as)f(redirected)j(to)d Fo(dirlist)p Fu(.)137 334 y(Bash)f(handles)i(sev)o(eral)e(\014lenames)h(sp)q (ecially)i(when)d(they)g(are)g(used)h(in)g(redirections,)g(as)f (describ)q(ed)75 389 y(in)j(the)f(follo)o(wing)h(table:)75 464 y Ft(/dev/fd/)p Fo(fd)315 518 y Fu(If)f Fo(fd)j Fu(is)d(a)g(v)m (alid)i(in)o(teger,)e(\014le)h(descriptor)g Fo(fd)h Fu(is)f (duplicated.)75 593 y Ft(/dev/stdin)315 648 y Fu(File)g(descriptor)g(0) f(is)g(duplicated.)75 723 y Ft(/dev/stdout)315 778 y Fu(File)h(descriptor)g(1)f(is)g(duplicated.)75 853 y Ft(/dev/stderr)315 907 y Fu(File)h(descriptor)g(2)f(is)g(duplicated.)75 982 y Ft(/dev/tcp/)p Fo(host)q Ft(/)p Fo(p)q(ort)315 1037 y Fu(If)21 b Fo(host)g Fu(is)g(a)g(v)m(alid)h(hostname)e(or)h(In)o (ternet)g(address,)g(and)g Fo(p)q(ort)h Fu(is)f(an)f(in)o(teger)h(p)q (ort)315 1092 y(n)o(um)o(b)q(er)i(or)f(service)h(name,)i(Bash)d (attempts)g(to)g(op)q(en)h(a)f(TCP)g(connection)i(to)e(the)315 1147 y(corresp)q(onding)16 b(so)q(c)o(k)o(et.)75 1222 y Ft(/dev/udp/)p Fo(host)q Ft(/)p Fo(p)q(ort)315 1276 y Fu(If)21 b Fo(host)g Fu(is)g(a)g(v)m(alid)h(hostname)e(or)h(In)o (ternet)g(address,)g(and)g Fo(p)q(ort)h Fu(is)f(an)f(in)o(teger)h(p)q (ort)315 1331 y(n)o(um)o(b)q(er)i(or)e(service)j(name,)f(Bash)g (attempts)e(to)h(op)q(en)h(a)f(UDP)g(connection)h(to)f(the)315 1386 y(corresp)q(onding)16 b(so)q(c)o(k)o(et.)137 1461 y(A)g(failure)g(to)e(op)q(en)i(or)f(create)g(a)g(\014le)h(causes)f(the) h(redirection)g(to)f(fail.)75 1566 y Fm(3.6.1)30 b(Redirecting)20 b(Input)137 1660 y Fu(Redirection)e(of)f(input)h(causes)g(the)f(\014le) h(whose)f(name)g(results)h(from)e(the)i(expansion)g(of)e Fo(w)o(ord)j Fu(to)75 1714 y(b)q(e)f(op)q(ened)g(for)f(reading)h(on)f (\014le)h(descriptor)g Ft(n)p Fu(,)f(or)g(the)g(standard)g(input)h (\(\014le)g(descriptor)g(0\))f(if)g Ft(n)g Fu(is)75 1769 y(not)e(sp)q(eci\014ed.)137 1834 y(The)h(general)f(format)f(for)h (redirecting)h(input)h(is:)195 1896 y Ft([n]<)p Fo(w)o(ord)75 2001 y Fm(3.6.2)30 b(Redirecting)20 b(Output)137 2095 y Fu(Redirection)c(of)f(output)g(causes)h(the)f(\014le)h(whose)f(name)g (results)h(from)e(the)h(expansion)i(of)d Fo(w)o(ord)j Fu(to)75 2150 y(b)q(e)g(op)q(ened)g(for)e(writing)h(on)g(\014le)h (descriptor)g Ft(n)p Fu(,)e(or)h(the)g(standard)f(output)h(\(\014le)h (descriptor)f(1\))f(if)i Ft(n)e Fu(is)75 2204 y(not)h(sp)q(eci\014ed.) 27 b(If)17 b(the)g(\014le)h(do)q(es)f(not)g(exist)g(it)g(is)h(created;) f(if)g(it)g(do)q(es)g(exist)h(it)f(is)g(truncated)g(to)f(zero)75 2259 y(size.)137 2324 y(The)g(general)f(format)f(for)h(redirecting)h (output)f(is:)195 2386 y Ft([n]>[|])p Fo(w)o(ord)137 2451 y Fu(If)h(the)f(redirection)i(op)q(erator)d(is)i(`)p Ft(>)p Fu(',)e(and)i(the)f Ft(noclobber)f Fu(option)i(to)f(the)g Ft(set)g Fu(builtin)j(has)d(b)q(een)75 2506 y(enabled,)i(the)f (redirection)i(will)g(fail)e(if)h(the)f(\014le)h(whose)f(name)g (results)h(from)e(the)h(expansion)h(of)f Fo(w)o(ord)75 2560 y Fu(exists)g(and)f(is)h(a)f(regular)g(\014le.)21 b(If)16 b(the)f(redirection)h(op)q(erator)f(is)h(`)p Ft(>|)p Fu(',)d(or)i(the)g(redirection)i(op)q(erator)d(is)75 2615 y(`)p Ft(>)p Fu(')j(and)h(the)g Ft(noclobber)e Fu(option)i(is)g (not)g(enabled,)h(the)f(redirection)h(is)f(attempted)g(ev)o(en)g(if)g (the)g(\014le)75 2670 y(named)d(b)o(y)h Fo(w)o(ord)g Fu(exists.)p eop %%Page: 24 26 24 25 bop 75 -58 a Fu(24)1285 b(Bash)15 b(Reference)h(Man)o(ual)75 149 y Fm(3.6.3)30 b(App)r(ending)20 b(Redirected)h(Output)137 246 y Fu(Redirection)16 b(of)d(output)i(in)g(this)f(fashion)h(causes)g (the)f(\014le)h(whose)f(name)h(results)f(from)g(the)g(expan-)75 301 y(sion)j(of)g Fo(w)o(ord)h Fu(to)e(b)q(e)i(op)q(ened)g(for)e(app)q (ending)j(on)e(\014le)h(descriptor)f Ft(n)p Fu(,)g(or)f(the)h(standard) g(output)f(\(\014le)75 356 y(descriptor)g(1\))e(if)i Ft(n)f Fu(is)h(not)e(sp)q(eci\014ed.)22 b(If)16 b(the)f(\014le)h(do)q (es)g(not)f(exist)g(it)h(is)f(created.)137 423 y(The)h(general)f (format)f(for)h(app)q(ending)i(output)e(is:)195 487 y Ft([n]>>)p Fo(w)o(ord)75 600 y Fm(3.6.4)30 b(Redirecting)20 b(Standard)h(Output)f(and)h(Standard)f(Error)137 696 y Fu(Bash)c(allo)o(ws)f(b)q(oth)h(the)g(standard)f(output)g(\(\014le)h (descriptor)g(1\))f(and)h(the)f(standard)g(error)g(output)75 751 y(\(\014le)f(descriptor)g(2\))f(to)g(b)q(e)h(redirected)g(to)f(the) h(\014le)g(whose)g(name)f(is)h(the)g(expansion)g(of)f Fo(w)o(ord)i Fu(with)f(this)75 806 y(construct.)137 873 y(There)i(are)f(t)o(w)o(o)e(formats)h(for)h(redirecting)h(standard)f (output)g(and)g(standard)g(error:)195 938 y Ft(&>)p Fo(w)o(ord)75 1005 y Fu(and)195 1070 y Ft(>&)p Fo(w)o(ord)75 1137 y Fu(Of)g(the)h(t)o(w)o(o)e(forms,)g(the)h(\014rst)g(is)g(preferred.)21 b(This)15 b(is)h(seman)o(tically)g(equiv)m(alen)o(t)h(to)195 1202 y Ft(>)p Fo(w)o(ord)25 b Ft(2>&1)75 1314 y Fm(3.6.5)30 b(Here)20 b(Do)r(cumen)n(ts)137 1411 y Fu(This)c(t)o(yp)q(e)e(of)g (redirection)i(instructs)f(the)g(shell)h(to)e(read)h(input)h(from)e (the)g(curren)o(t)h(source)f(un)o(til)i(a)75 1465 y(line)h(con)o (taining)f(only)f Fo(w)o(ord)i Fu(\(with)e(no)g(trailing)h(blanks\))f (is)h(seen.)k(All)d(of)e(the)g(lines)i(read)e(up)g(to)g(that)75 1520 y(p)q(oin)o(t)h(are)f(then)g(used)h(as)f(the)g(standard)g(input)h (for)f(a)f(command.)137 1588 y(The)i(format)e(of)g(here-do)q(cumen)o (ts)i(is)g(as)f(follo)o(ws:)195 1652 y Ft(<<[)p Fr(\000)p Ft(])p Fo(w)o(ord)386 1704 y(here-do)q(cumen)o(t)195 1756 y(delimiter)137 1823 y Fu(No)i(parameter)f(expansion,)h(command)g (substitution,)g(arithmetic)g(expansion,)h(or)e(\014lename)i(ex-)75 1878 y(pansion)g(is)g(p)q(erformed)g(on)g Fo(w)o(ord)p Fu(.)26 b(If)18 b(an)o(y)f(c)o(haracters)g(in)h Fo(w)o(ord)h Fu(are)e(quoted,)h(the)f Fo(delimiter)23 b Fu(is)18 b(the)75 1933 y(result)j(of)e(quote)h(remo)o(v)m(al)h(on)f Fo(w)o(ord)p Fu(,)g(and)h(the)f(lines)i(in)f(the)f(here-do)q(cumen)o(t)i(are)d(not)h (expanded.)75 1988 y(If)d Fo(w)o(ord)g Fu(is)g(unquoted,)g(all)g(lines) h(of)e(the)g(here-do)q(cumen)o(t)h(are)g(sub)s(jected)f(to)g(parameter) f(expansion,)75 2043 y(command)d(substitution,)i(and)e(arithmetic)h (expansion.)20 b(In)13 b(the)g(latter)f(case,)h(the)f(c)o(haracter)g (sequence)75 2097 y Ft(\\newline)i Fu(is)i(ignored,)f(and)h(`)p Ft(\\)p Fu(')e(m)o(ust)g(b)q(e)i(used)g(to)f(quote)g(the)g(c)o (haracters)f(`)p Ft(\\)p Fu(',)g(`)p Ft($)p Fu(',)g(and)h(`)p Ft(`)p Fu('.)137 2165 y(If)d(the)f(redirection)h(op)q(erator)f(is)g(`)p Ft(<<-)p Fu(',)g(then)g(all)i(leading)f(tab)f(c)o(haracters)f(are)h (stripp)q(ed)i(from)d(input)75 2220 y(lines)18 b(and)f(the)f(line)i (con)o(taining)g Fo(delimiter)p Fu(.)25 b(This)17 b(allo)o(ws)g (here-do)q(cumen)o(ts)g(within)h(shell)g(scripts)f(to)75 2274 y(b)q(e)f(inden)o(ted)g(in)h(a)d(natural)i(fashion.)75 2387 y Fm(3.6.6)30 b(Duplicating)20 b(File)g(Descriptors)137 2483 y Fu(The)c(redirection)g(op)q(erator)195 2548 y Ft([n]<&)p Fo(w)o(ord)75 2615 y Fu(is)i(used)g(to)e(duplicate)j(input)g (\014le)f(descriptors.)27 b(If)17 b Fo(w)o(ord)i Fu(expands)f(to)e(one) i(or)e(more)h(digits,)i(the)e(\014le)75 2670 y(descriptor)g(denoted)h (b)o(y)e Ft(n)h Fu(is)h(made)e(to)h(b)q(e)g(a)g(cop)o(y)f(of)h(that)f (\014le)i(descriptor.)25 b(If)17 b(the)g(digits)h(in)g Fo(w)o(ord)p eop %%Page: 25 27 25 26 bop 75 -58 a Fu(Chapter)15 b(3:)k(Basic)d(Shell)h(F)l(eatures) 1123 b(25)75 149 y(do)15 b(not)f(sp)q(ecify)i(a)e(\014le)i(descriptor)f (op)q(en)h(for)e(input,)h(a)f(redirection)i(error)e(o)q(ccurs.)20 b(If)15 b Fo(w)o(ord)h Fu(ev)m(aluates)75 204 y(to)f(`)p Ft(-)p Fu(',)f(\014le)j(descriptor)e Ft(n)h Fu(is)g(closed.)21 b(If)16 b Ft(n)f Fu(is)h(not)f(sp)q(eci\014ed,)i(the)f(standard)f (input)i(\(\014le)f(descriptor)g(0\))75 259 y(is)g(used.)137 332 y(The)g(op)q(erator)195 402 y Ft([n]>&)p Fo(w)o(ord)75 475 y Fu(is)21 b(used)g(similarly)h(to)d(duplicate)j(output)e(\014le)h (descriptors.)36 b(If)20 b Ft(n)g Fu(is)h(not)f(sp)q(eci\014ed,)j(the)d (standard)75 529 y(output)15 b(\(\014le)h(descriptor)f(1\))f(is)i (used.)k(If)15 b(the)h(digits)f(in)h Fo(w)o(ord)g Fu(do)f(not)g(sp)q (ecify)h(a)f(\014le)h(descriptor)f(op)q(en)75 584 y(for)j(output,)i(a)f (redirection)h(error)f(o)q(ccurs.)32 b(As)19 b(a)g(sp)q(ecial)h(case,)g (if)g Ft(n)f Fu(is)g(omitted,)h(and)f Fo(w)o(ord)i Fu(do)q(es)75 639 y(not)14 b(expand)g(to)f(one)h(or)g(more)f(digits,)i(the)f (standard)f(output)h(and)g(standard)f(error)h(are)f(redirected)i(as)75 694 y(describ)q(ed)i(previously)l(.)75 817 y Fm(3.6.7)30 b(Op)r(ening)20 b(File)g(Descriptors)h(for)f(Reading)g(and)h(W)-5 b(riting)137 919 y Fu(The)16 b(redirection)g(op)q(erator)195 989 y Ft([n]<>)p Fo(w)o(ord)75 1062 y Fu(causes)k(the)f(\014le)i(whose) e(name)g(is)h(the)g(expansion)g(of)f Fo(w)o(ord)i Fu(to)e(b)q(e)h(op)q (ened)g(for)f(b)q(oth)h(reading)g(and)75 1117 y(writing)d(on)f(\014le)i (descriptor)f Ft(n)p Fu(,)f(or)g(on)g(\014le)i(descriptor)f(0)f(if)h Ft(n)f Fu(is)h(not)f(sp)q(eci\014ed.)26 b(If)17 b(the)f(\014le)i(do)q (es)e(not)75 1171 y(exist,)f(it)h(is)f(created.)75 1314 y Fs(3.7)33 b(Executing)23 b(Commands)75 1467 y Fm(3.7.1)30 b(Simple)21 b(Command)f(Expansion)137 1568 y Fu(When)e(a)g(simple)h (command)f(is)g(executed,)h(the)f(shell)h(p)q(erforms)f(the)g(follo)o (wing)g(expansions,)h(as-)75 1623 y(signmen)o(ts,)c(and)g (redirections,)h(from)f(left)g(to)g(righ)o(t.)100 1696 y(1.)29 b(The)19 b(w)o(ords)g(that)f(the)h(parser)g(has)g(mark)o(ed)g (as)f(v)m(ariable)j(assignmen)o(ts)e(\(those)f(preceding)j(the)165 1751 y(command)15 b(name\))g(and)g(redirections)i(are)e(sa)o(v)o(ed)f (for)h(later)g(pro)q(cessing.)100 1821 y(2.)29 b(The)20 b(w)o(ords)f(that)g(are)h(not)f(v)m(ariable)j(assignmen)o(ts)d(or)h (redirections)h(are)e(expanded)i(\(see)f(Sec-)165 1876 y(tion)f(3.5)e([Shell)j(Expansions],)f(page)g(15\).)29 b(If)18 b(an)o(y)h(w)o(ords)e(remain)i(after)f(expansion,)i(the)e (\014rst)165 1931 y(w)o(ord)d(is)h(tak)o(en)f(to)g(b)q(e)i(the)e(name)h (of)f(the)h(command)f(and)h(the)g(remaining)g(w)o(ords)f(are)h(the)f (argu-)165 1985 y(men)o(ts.)100 2055 y(3.)29 b(Redirections)13 b(are)f(p)q(erformed)g(as)f(describ)q(ed)j(ab)q(o)o(v)o(e)e(\(see)g (Section)h(3.6)e([Redirections],)h(page)g(22\).)100 2125 y(4.)29 b(The)13 b(text)f(after)g(the)g(`)p Ft(=)p Fu(')g(in)h(eac)o(h) g(v)m(ariable)h(assignmen)o(t)e(undergo)q(es)h(tilde)h(expansion,)g (parameter)165 2180 y(expansion,)25 b(command)e(substitution,)i (arithmetic)e(expansion,)i(and)e(quote)g(remo)o(v)m(al)g(b)q(efore)165 2235 y(b)q(eing)16 b(assigned)g(to)f(the)g(v)m(ariable.)137 2323 y(If)i(no)g(command)f(name)h(results,)g(the)g(v)m(ariable)h (assignmen)o(ts)f(a\013ect)f(the)g(curren)o(t)h(shell)h(en)o(viron-)75 2378 y(men)o(t.)h(Otherwise,)13 b(the)g(v)m(ariables)h(are)e(added)i (to)e(the)h(en)o(vironmen)o(t)g(of)f(the)h(executed)g(command)g(and)75 2433 y(do)k(not)g(a\013ect)g(the)g(curren)o(t)g(shell)i(en)o(vironmen)o (t.)27 b(If)17 b(an)o(y)g(of)g(the)h(assignmen)o(ts)f(attempts)f(to)h (assign)75 2488 y(a)i(v)m(alue)h(to)f(a)g(readonly)h(v)m(ariable,)h(an) e(error)g(o)q(ccurs,)h(and)f(the)g(command)h(exits)f(with)h(a)f (non-zero)75 2542 y(status.)137 2615 y(If)e(no)g(command)g(name)f (results,)i(redirections)g(are)e(p)q(erformed,)h(but)g(do)g(not)f (a\013ect)g(the)h(curren)o(t)75 2670 y(shell)g(en)o(vironmen)o(t.)j(A) 15 b(redirection)i(error)d(causes)i(the)f(command)g(to)g(exit)g(with)h (a)f(non-zero)g(status.)p eop %%Page: 26 28 26 27 bop 75 -58 a Fu(26)1285 b(Bash)15 b(Reference)h(Man)o(ual)137 149 y(If)e(there)g(is)g(a)g(command)f(name)h(left)g(after)f(expansion,) h(execution)h(pro)q(ceeds)g(as)e(describ)q(ed)j(b)q(elo)o(w.)75 204 y(Otherwise,)k(the)f(command)f(exits.)30 b(If)19 b(one)g(of)f(the)h(expansions)g(con)o(tained)h(a)e(command)g(substitu-) 75 259 y(tion,)h(the)f(exit)h(status)e(of)h(the)g(command)g(is)h(the)f (exit)h(status)e(of)h(the)g(last)g(command)g(substitution)75 314 y(p)q(erformed.)28 b(If)18 b(there)g(w)o(ere)f(no)h(command)g (substitutions,)g(the)g(command)g(exits)g(with)g(a)f(status)g(of)75 369 y(zero.)75 478 y Fm(3.7.2)30 b(Command)21 b(Searc)n(h)g(and)f (Execution)137 573 y Fu(After)e(a)f(command)h(has)f(b)q(een)i(split)g (in)o(to)f(w)o(ords,)f(if)h(it)g(results)g(in)h(a)e(simple)i(command)f (and)g(an)75 628 y(optional)e(list)g(of)f(argumen)o(ts,)f(the)h(follo)o (wing)h(actions)f(are)g(tak)o(en.)100 694 y(1.)29 b(If)12 b(the)h(command)f(name)g(con)o(tains)g(no)g(slashes,)h(the)f(shell)i (attempts)d(to)g(lo)q(cate)i(it.)19 b(If)12 b(there)h(exists)165 749 y(a)f(shell)i(function)f(b)o(y)f(that)g(name,)g(that)g(function)h (is)f(in)o(v)o(ok)o(ed)h(as)f(describ)q(ed)i(in)f(Section)g(3.3)e ([Shell)165 804 y(F)l(unctions],)k(page)g(12.)100 870 y(2.)29 b(If)21 b(the)g(name)f(do)q(es)h(not)g(matc)o(h)f(a)g (function,)j(the)d(shell)j(searc)o(hes)d(for)g(it)h(in)h(the)f(list)g (of)f(shell)165 925 y(builtins.)i(If)16 b(a)e(matc)o(h)h(is)h(found,)f (that)f(builtin)k(is)e(in)o(v)o(ok)o(ed.)100 992 y(3.)29 b(If)20 b(the)h(name)f(is)h(neither)g(a)f(shell)h(function)g(nor)f(a)g (builtin,)k(and)c(con)o(tains)g(no)g(slashes,)i(Bash)165 1046 y(searc)o(hes)d(eac)o(h)g(elemen)o(t)h(of)e Ft($PATH)h Fu(for)f(a)h(directory)g(con)o(taining)h(an)e(executable)j(\014le)f(b)o (y)f(that)165 1101 y(name.)28 b(Bash)17 b(uses)h(a)g(hash)g(table)g(to) f(remem)o(b)q(er)h(the)g(full)h(pathnames)f(of)f(executable)i(\014les)g (to)165 1156 y(a)o(v)o(oid)d(m)o(ultiple)h Ft(PATH)e Fu(searc)o(hes)h(\(see)g(the)g(description)h(of)f Ft(hash)f Fu(in)i(Section)f(4.1)f([Bourne)h(Shell)165 1211 y(Builtins],)j(page)f (31\).)26 b(A)17 b(full)i(searc)o(h)e(of)g(the)h(directories)g(in)h Ft($PATH)d Fu(is)i(p)q(erformed)g(only)g(if)g(the)165 1266 y(command)d(is)h(not)g(found)f(in)i(the)e(hash)h(table.)21 b(If)16 b(the)g(searc)o(h)f(is)h(unsuccessful,)h(the)f(shell)h(prin)o (ts)165 1320 y(an)e(error)g(message)f(and)i(returns)f(an)g(exit)h (status)e(of)h(127.)100 1387 y(4.)29 b(If)17 b(the)g(searc)o(h)f(is)h (successful,)h(or)f(if)g(the)f(command)h(name)g(con)o(tains)f(one)h(or) f(more)h(slashes,)g(the)165 1441 y(shell)i(executes)f(the)f(named)h (program)e(in)i(a)f(separate)g(execution)i(en)o(vironmen)o(t.)26 b(Argumen)o(t)17 b(0)165 1496 y(is)f(set)f(to)f(the)i(name)f(giv)o(en,) g(and)h(the)f(remaining)h(argumen)o(ts)e(to)h(the)g(command)g(are)g (set)g(to)g(the)165 1551 y(argumen)o(ts)f(supplied,)k(if)d(an)o(y)l(.) 100 1617 y(5.)29 b(If)18 b(this)g(execution)h(fails)g(b)q(ecause)g(the) f(\014le)h(is)f(not)f(in)i(executable)g(format,)e(and)h(the)g(\014le)h (is)f(not)165 1672 y(a)e(directory)l(,)h(it)f(is)h(assumed)f(to)g(b)q (e)h(a)f Fo(shell)h(script)h Fu(and)f(the)f(shell)i(executes)f(it)f(as) g(describ)q(ed)i(in)165 1727 y(Section)e(3.8)e([Shell)j(Scripts],)e (page)g(29.)100 1793 y(6.)29 b(If)20 b(the)f(command)g(w)o(as)g(not)g (b)q(egun)h(async)o(hronously)l(,)g(the)g(shell)h(w)o(aits)d(for)h(the) g(command)h(to)165 1848 y(complete)c(and)f(collects)i(its)e(exit)h (status.)75 1957 y Fm(3.7.3)30 b(Command)21 b(Execution)g(En)n (vironmen)n(t)137 2053 y Fu(The)16 b(shell)g(has)g(an)f Fo(execution)h(en)o(vironmen)o(t)p Fu(,)f(whic)o(h)h(consists)g(of)e (the)i(follo)o(wing:)112 2119 y Fr(\017)30 b Fu(op)q(en)17 b(\014les)g(inherited)h(b)o(y)e(the)h(shell)h(at)d(in)o(v)o(o)q (cation,)i(as)f(mo)q(di\014ed)h(b)o(y)f(redirections)i(supplied)h(to) 165 2174 y(the)c Ft(exec)g Fu(builtin)112 2240 y Fr(\017)30 b Fu(the)14 b(curren)o(t)g(w)o(orking)g(directory)g(as)g(set)g(b)o(y)g Ft(cd)p Fu(,)g Ft(pushd)p Fu(,)f(or)h Ft(popd)p Fu(,)f(or)h(inherited)i (b)o(y)e(the)g(shell)i(at)165 2295 y(in)o(v)o(o)q(cation)112 2361 y Fr(\017)30 b Fu(the)15 b(\014le)i(creation)e(mo)q(de)g(mask)g (as)g(set)g(b)o(y)g Ft(umask)f Fu(or)h(inherited)i(from)e(the)g (shell's)h(paren)o(t)112 2428 y Fr(\017)30 b Fu(curren)o(t)15 b(traps)g(set)g(b)o(y)g Ft(trap)112 2494 y Fr(\017)30 b Fu(shell)16 b(parameters)e(that)g(are)h(set)f(b)o(y)h(v)m(ariable)h (assignmen)o(t)f(or)f(with)h Ft(set)f Fu(or)g(inherited)j(from)d(the) 165 2549 y(shell's)i(paren)o(t)f(in)h(the)f(en)o(vironmen)o(t)112 2615 y Fr(\017)30 b Fu(shell)23 b(functions)g(de\014ned)g(during)g (execution)g(or)e(inherited)j(from)d(the)h(shell's)h(paren)o(t)e(in)i (the)165 2670 y(en)o(vironmen)o(t)p eop %%Page: 27 29 27 28 bop 75 -58 a Fu(Chapter)15 b(3:)k(Basic)d(Shell)h(F)l(eatures) 1123 b(27)112 149 y Fr(\017)30 b Fu(options)17 b(enabled)h(at)e(in)o(v) o(o)q(cation)h(\(either)f(b)o(y)h(default)g(or)f(with)h(command-line)h (argumen)o(ts\))d(or)165 204 y(b)o(y)g Ft(set)112 270 y Fr(\017)30 b Fu(options)15 b(enabled)i(b)o(y)e Ft(shopt)112 336 y Fr(\017)30 b Fu(shell)17 b(aliases)f(de\014ned)g(with)g Ft(alias)e Fu(\(see)h(Section)i(6.6)d([Aliases],)h(page)g(67\))112 402 y Fr(\017)30 b Fu(v)m(arious)25 b(pro)q(cess)h Fp(id)p Fu(s,)g(includin)q(g)h(those)e(of)f(bac)o(kground)h(jobs)g(\(see)f (Section)i(3.2.3)e([Lists],)165 457 y(page)15 b(8\),)f(the)i(v)m(alue)g (of)f Ft($$)p Fu(,)f(and)i(the)f(v)m(alue)h(of)f Ft($PPID)137 534 y Fu(When)j(a)f(simple)h(command)f(other)g(than)g(a)g(builtin)i(or) e(shell)i(function)f(is)f(to)g(b)q(e)h(executed,)g(it)f(is)75 589 y(in)o(v)o(ok)o(ed)12 b(in)h(a)f(separate)f(execution)i(en)o (vironmen)o(t)f(that)g(consists)g(of)f(the)h(follo)o(wing.)20 b(Unless)13 b(otherwise)75 644 y(noted,)i(the)g(v)m(alues)i(are)d (inherited)j(from)e(the)g(shell.)112 710 y Fr(\017)30 b Fu(the)16 b(shell's)g(op)q(en)h(\014les,)f(plus)g(an)o(y)g(mo)q (di\014cations)g(and)g(additions)h(sp)q(eci\014ed)g(b)o(y)f (redirections)h(to)165 765 y(the)e(command)112 831 y Fr(\017)30 b Fu(the)15 b(curren)o(t)g(w)o(orking)g(directory)112 897 y Fr(\017)30 b Fu(the)15 b(\014le)i(creation)e(mo)q(de)g(mask)112 963 y Fr(\017)30 b Fu(shell)23 b(v)m(ariables)h(mark)o(ed)d(for)g(exp)q (ort,)i(along)f(with)g(v)m(ariables)h(exp)q(orted)f(for)g(the)f (command,)165 1018 y(passed)15 b(in)h(the)g(en)o(vironmen)o(t)f(\(see)g (Section)i(3.7.4)c([En)o(vironmen)o(t],)h(page)h(27\))112 1084 y Fr(\017)30 b Fu(traps)15 b(caugh)o(t)g(b)o(y)h(the)f(shell)i (are)f(reset)f(to)g(the)h(v)m(alues)g(inherited)i(from)c(the)i(shell's) h(paren)o(t,)e(and)165 1139 y(traps)g(ignored)g(b)o(y)g(the)h(shell)g (are)f(ignored)137 1216 y(A)21 b(command)g(in)o(v)o(ok)o(ed)g(in)g (this)g(separate)g(en)o(vironmen)o(t)g(cannot)f(a\013ect)g(the)h (shell's)h(execution)75 1271 y(en)o(vironmen)o(t.)137 1337 y(Command)15 b(substitution)i(and)f(async)o(hronous)f(commands)h (are)f(in)o(v)o(ok)o(ed)h(in)g(a)g(subshell)h(en)o(viron-)75 1392 y(men)o(t)d(that)g(is)h(a)f(duplicate)i(of)e(the)g(shell)i(en)o (vironmen)o(t,)f(except)f(that)g(traps)g(caugh)o(t)g(b)o(y)g(the)g (shell)i(are)75 1446 y(reset)d(to)g(the)h(v)m(alues)h(that)e(the)h (shell)h(inherited)g(from)e(its)h(paren)o(t)f(at)g(in)o(v)o(o)q (cation.)20 b(Builtin)c(commands)75 1501 y(that)d(are)h(in)o(v)o(ok)o (ed)g(as)f(part)h(of)f(a)h(pip)q(eline)j(are)c(also)h(executed)h(in)g (a)e(subshell)j(en)o(vironmen)o(t.)k(Changes)75 1556 y(made)15 b(to)g(the)g(subshell)i(en)o(vironmen)o(t)f(cannot)f (a\013ect)f(the)i(shell's)g(execution)g(en)o(vironmen)o(t.)137 1622 y(If)k(a)f(command)g(is)h(follo)o(w)o(ed)f(b)o(y)h(a)e(`)p Ft(&)p Fu(')h(and)g(job)g(con)o(trol)g(is)h(not)f(activ)o(e,)h(the)g (default)f(standard)75 1677 y(input)h(for)e(the)h(command)g(is)g(the)g (empt)o(y)f(\014le)i(`)p Ft(/dev/null)p Fu('.)29 b(Otherwise,)20 b(the)f(in)o(v)o(ok)o(ed)g(command)75 1732 y(inherits)e(the)e(\014le)h (descriptors)g(of)e(the)i(calling)h(shell)f(as)f(mo)q(di\014ed)i(b)o(y) e(redirections.)75 1840 y Fm(3.7.4)30 b(En)n(vironmen)n(t)137 1935 y Fu(When)16 b(a)g(program)e(is)i(in)o(v)o(ok)o(ed)g(it)g(is)h (giv)o(en)f(an)f(arra)o(y)g(of)g(strings)h(called)h(the)f Fo(en)o(vironmen)o(t)p Fu(.)21 b(This)75 1990 y(is)16 b(a)f(list)h(of)e(name-v)m(alue)j(pairs,)e(of)g(the)g(form)g Ft(name=value)p Fu(.)137 2056 y(Bash)20 b(pro)o(vides)g(sev)o(eral)g(w) o(a)o(ys)f(to)g(manipulate)i(the)f(en)o(vironmen)o(t.)33 b(On)21 b(in)o(v)o(o)q(cation,)g(the)e(shell)75 2111 y(scans)h(its)h(o)o(wn)e(en)o(vironmen)o(t)i(and)f(creates)g(a)g (parameter)f(for)h(eac)o(h)g(name)g(found,)i(automatically)75 2166 y(marking)13 b(it)g(for)f Fo(exp)q(ort)i Fu(to)e(c)o(hild)j(pro)q (cesses.)20 b(Executed)13 b(commands)g(inherit)h(the)f(en)o(vironmen)o (t.)20 b(The)75 2220 y Ft(export)e Fu(and)h(`)p Ft(declare)13 b(-x)p Fu(')18 b(commands)h(allo)o(w)f(parameters)g(and)h(functions)g (to)f(b)q(e)i(added)f(to)f(and)75 2275 y(deleted)12 b(from)d(the)i(en)o (vironmen)o(t.)18 b(If)11 b(the)f(v)m(alue)h(of)f(a)g(parameter)g(in)h (the)f(en)o(vironmen)o(t)h(is)g(mo)q(di\014ed,)h(the)75 2330 y(new)k(v)m(alue)h(b)q(ecomes)f(part)f(of)h(the)f(en)o(vironmen)o (t,)h(replacing)h(the)f(old.)22 b(The)16 b(en)o(vironmen)o(t)g (inherited)75 2385 y(b)o(y)f(an)o(y)h(executed)g(command)f(consists)h (of)f(the)h(shell's)g(initial)i(en)o(vironmen)o(t,)d(whose)h(v)m(alues) h(ma)o(y)d(b)q(e)75 2440 y(mo)q(di\014ed)h(in)f(the)f(shell,)i(less)f (an)o(y)g(pairs)f(remo)o(v)o(ed)g(b)o(y)g(the)h Ft(unset)f Fu(and)g(`)p Ft(export)h(-n)p Fu(')f(commands,)g(plus)75 2494 y(an)o(y)i(additions)h(via)g(the)f Ft(export)f Fu(and)i(`)p Ft(declare)d(-x)p Fu(')i(commands.)137 2560 y(The)j(en)o(vironmen)o(t)f (for)f(an)o(y)h(simple)i(command)e(or)f(function)i(ma)o(y)f(b)q(e)g (augmen)o(ted)g(temp)q(orarily)75 2615 y(b)o(y)e(pre\014xing)i(it)e (with)h(parameter)e(assignmen)o(ts,)h(as)g(describ)q(ed)i(in)g(Section) f(3.4)e([Shell)j(P)o(arameters],)75 2670 y(page)e(13.)k(These)c (assignmen)o(t)f(statemen)o(ts)g(a\013ect)g(only)h(the)g(en)o(vironmen) o(t)g(seen)g(b)o(y)f(that)g(command.)p eop %%Page: 28 30 28 29 bop 75 -58 a Fu(28)1285 b(Bash)15 b(Reference)h(Man)o(ual)137 149 y(If)h(the)f(`)p Ft(-k)p Fu(')f(option)h(is)h(set)f(\(see)g (Section)h(4.3)e([The)h(Set)g(Builtin],)i(page)e(46\),)f(then)i(all)g (parameter)75 204 y(assignmen)o(ts)e(are)f(placed)i(in)g(the)f(en)o (vironmen)o(t)g(for)f(a)h(command,)f(not)h(just)f(those)h(that)f (precede)i(the)75 259 y(command)f(name.)137 328 y(When)h(Bash)f(in)o(v) o(ok)o(es)f(an)h(external)h(command,)e(the)h(v)m(ariable)h(`)p Ft($_)p Fu(')e(is)i(set)f(to)f(the)h(full)h(path)f(name)75 382 y(of)g(the)g(command)g(and)h(passed)f(to)g(that)f(command)h(in)h (its)f(en)o(vironmen)o(t.)75 497 y Fm(3.7.5)30 b(Exit)21 b(Status)137 595 y Fu(F)l(or)16 b(the)f(shell's)j(purp)q(oses,)e(a)f (command)h(whic)o(h)h(exits)f(with)g(a)g(zero)g(exit)g(status)f(has)h (succeeded.)75 649 y(A)f(non-zero)f(exit)i(status)d(indicates)j (failure.)21 b(This)15 b(seemingly)h(coun)o(ter-in)o(tuitiv)o(e)g(sc)o (heme)f(is)g(used)g(so)75 704 y(there)i(is)g(one)g(w)o(ell-de\014ned)j (w)o(a)o(y)c(to)g(indicate)i(success)g(and)f(a)f(v)m(ariet)o(y)i(of)e (w)o(a)o(ys)g(to)g(indicate)i(v)m(arious)75 759 y(failure)i(mo)q(des.) 31 b(When)19 b(a)g(command)g(terminates)f(on)h(a)g(fatal)f(signal)i (whose)f(n)o(um)o(b)q(er)g(is)g Fo(N)p Fu(,)g(Bash)75 814 y(uses)c(the)h(v)m(alue)g(128)p Ft(+)p Fo(N)j Fu(as)c(the)g(exit)h (status.)137 882 y(If)i(a)g(command)g(is)g(not)g(found,)h(the)f(c)o (hild)h(pro)q(cess)g(created)f(to)f(execute)i(it)f(returns)g(a)f (status)g(of)75 937 y(127.)i(If)c(a)g(command)g(is)h(found)g(but)f(is)h (not)e(executable,)j(the)e(return)g(status)f(is)i(126.)137 1006 y(If)h(a)f(command)h(fails)g(b)q(ecause)h(of)e(an)g(error)g (during)i(expansion)f(or)f(redirection,)i(the)f(exit)g(status)75 1060 y(is)f(greater)e(than)h(zero.)137 1129 y(The)d(exit)g(status)f(is) h(used)g(b)o(y)f(the)h(Bash)g(conditional)h(commands)e(\(see)h(Section) g(3.2.5)e([Conditional)75 1184 y(Constructs],)k(page)h(10\))f(and)h (some)g(of)g(the)g(list)h(constructs)f(\(see)g(Section)h(3.2.3)e ([Lists],)h(page)g(8\).)137 1252 y(All)22 b(of)d(the)h(Bash)g(builtins) j(return)d(an)g(exit)g(status)f(of)h(zero)g(if)g(they)g(succeed)i(and)e (a)g(non-zero)75 1307 y(status)c(on)h(failure,)h(so)e(they)h(ma)o(y)f (b)q(e)h(used)h(b)o(y)e(the)h(conditional)i(and)e(list)g(constructs.)25 b(All)18 b(builtins)75 1362 y(return)d(an)g(exit)h(status)e(of)h(2)g (to)f(indicate)j(incorrect)f(usage.)75 1476 y Fm(3.7.6)30 b(Signals)137 1574 y Fu(When)15 b(Bash)f(is)g(in)o(teractiv)o(e,)h(in)f (the)h(absence)f(of)g(an)o(y)g(traps,)f(it)h(ignores)g Ft(SIGTERM)f Fu(\(so)h(that)f(`)p Ft(kill)75 1629 y(0)p Fu(')j(do)q(es)h(not)f(kill)i(an)f(in)o(teractiv)o(e)g(shell\),)g(and)g Ft(SIGINT)f Fu(is)h(caugh)o(t)f(and)g(handled)i(\(so)e(that)g(the)h Ft(wait)75 1684 y Fu(builtin)e(is)d(in)o(terruptible\).)21 b(When)12 b(Bash)h(receiv)o(es)g(a)f Ft(SIGINT)p Fu(,)f(it)i(breaks)f (out)g(of)g(an)o(y)g(executing)h(lo)q(ops.)75 1738 y(In)j(all)h(cases,) f(Bash)g(ignores)g Ft(SIGQUIT)p Fu(.)k(If)c(job)g(con)o(trol)f(is)i(in) f(e\013ect)g(\(see)g(Chapter)f(7)h([Job)f(Con)o(trol],)75 1793 y(page)g(75\),)f(Bash)h(ignores)h Ft(SIGTTIN)p Fu(,)d Ft(SIGTTOU)p Fu(,)h(and)i Ft(SIGTSTP)p Fu(.)137 1862 y(Commands)22 b(started)g(b)o(y)g(Bash)h(ha)o(v)o(e)f(signal)h (handlers)h(set)e(to)g(the)g(v)m(alues)i(inherited)g(b)o(y)f(the)75 1916 y(shell)e(from)e(its)g(paren)o(t.)32 b(When)20 b(job)f(con)o(trol) g(is)h(not)f(in)h(e\013ect,)f(async)o(hronous)h(commands)f(ignore)75 1971 y Ft(SIGINT)d Fu(and)i Ft(SIGQUIT)e Fu(as)h(w)o(ell.)27 b(Commands)17 b(run)g(as)g(a)g(result)h(of)e(command)i(substitution)g (ignore)75 2026 y(the)d(k)o(eyb)q(oard-generated)h(job)f(con)o(trol)g (signals)g Ft(SIGTTIN)p Fu(,)f Ft(SIGTTOU)p Fu(,)g(and)h Ft(SIGTSTP)p Fu(.)137 2095 y(The)h(shell)h(exits)f(b)o(y)g(default)g (up)q(on)g(receipt)h(of)e(a)g Ft(SIGHUP)p Fu(.)21 b(Before)15 b(exiting,)i(an)e(in)o(teractiv)o(e)h(shell)75 2149 y(resends)22 b(the)f Ft(SIGHUP)f Fu(to)h(all)h(jobs,)g(running)g(or)f(stopp)q(ed.)39 b(Stopp)q(ed)22 b(jobs)f(are)f(sen)o(t)h Ft(SIGCONT)g Fu(to)75 2204 y(ensure)c(that)f(they)g(receiv)o(e)i(the)e Ft(SIGHUP)p Fu(.)23 b(T)l(o)16 b(prev)o(en)o(t)g(the)h(shell)h(from)d (sending)j(the)f Ft(SIGHUP)e Fu(signal)75 2259 y(to)h(a)g(particular)h (job,)f(it)g(should)h(b)q(e)g(remo)o(v)o(ed)f(from)g(the)g(jobs)g (table)h(with)g(the)f Ft(disown)f Fu(builtin)k(\(see)75 2314 y(Section)d(7.2)e([Job)h(Con)o(trol)g(Builtins],)h(page)f(76\))f (or)h(mark)o(ed)g(to)f(not)h(receiv)o(e)h Ft(SIGHUP)e Fu(using)i Ft(disown)75 2369 y(-h)p Fu(.)137 2437 y(If)g(the)h Ft(huponexit)d Fu(shell)k(option)e(has)g(b)q(een)h(set)f(with)g Ft(shopt)f Fu(\(see)h(Section)h(4.2)e([Bash)h(Builtins],)75 2492 y(page)f(36\),)f(Bash)h(sends)h(a)f Ft(SIGHUP)f Fu(to)h(all)h(jobs)f(when)g(an)h(in)o(teractiv)o(e)f(login)h(shell)h (exits.)137 2560 y(When)e(Bash)f(receiv)o(es)h(a)f(signal)h(for)f(whic) o(h)h(a)f(trap)f(has)h(b)q(een)i(set)e(while)h(w)o(aiting)g(for)e(a)h (command)75 2615 y(to)k(complete,)h(the)f(trap)g(will)i(not)e(b)q(e)h (executed)g(un)o(til)g(the)g(command)f(completes.)29 b(When)19 b(Bash)f(is)75 2670 y(w)o(aiting)h(for)f(an)g(async)o (hronous)g(command)h(via)g(the)f Ft(wait)g Fu(builtin,)k(the)c (reception)i(of)e(a)g(signal)i(for)p eop %%Page: 29 31 29 30 bop 75 -58 a Fu(Chapter)15 b(3:)k(Basic)d(Shell)h(F)l(eatures) 1123 b(29)75 149 y(whic)o(h)18 b(a)g(trap)e(has)i(b)q(een)g(set)g(will) h(cause)f(the)f Ft(wait)g Fu(builtin)j(to)d(return)g(immediately)i (with)f(an)g(exit)75 204 y(status)c(greater)h(than)g(128,)f (immediately)i(after)f(whic)o(h)h(the)f(trap)g(is)h(executed.)75 333 y Fs(3.8)33 b(Shell)24 b(Scripts)137 429 y Fu(A)d(shell)i(script)e (is)g(a)g(text)f(\014le)i(con)o(taining)g(shell)h(commands.)36 b(When)22 b(suc)o(h)f(a)f(\014le)i(is)g(used)f(as)75 484 y(the)c(\014rst)f(non-option)h(argumen)o(t)e(when)i(in)o(v)o(oking) h(Bash,)e(and)h(neither)g(the)g(`)p Ft(-c)p Fu(')e(nor)h(`)p Ft(-s)p Fu(')g(option)g(is)75 539 y(supplied)22 b(\(see)d(Section)h (6.1)f([In)o(v)o(oking)g(Bash],)h(page)f(59\),)g(Bash)g(reads)h(and)f (executes)h(commands)75 594 y(from)15 b(the)h(\014le,)h(then)f(exits.) 22 b(This)17 b(mo)q(de)f(of)g(op)q(eration)g(creates)f(a)h(non-in)o (teractiv)o(e)h(shell.)23 b(The)16 b(shell)75 648 y(\014rst)d(searc)o (hes)g(for)f(the)i(\014le)g(in)g(the)f(curren)o(t)g(directory)l(,)h (and)f(lo)q(oks)h(in)g(the)f(directories)h(in)g Ft($PATH)f Fu(if)g(not)75 703 y(found)j(there.)137 770 y(When)i(Bash)f(runs)h(a)f (shell)i(script,)f(it)f(sets)g(the)h(sp)q(ecial)h(parameter)d Ft(0)i Fu(to)e(the)i(name)f(of)g(the)g(\014le,)75 825 y(rather)i(than)h(the)f(name)h(of)f(the)h(shell,)i(and)e(the)g(p)q (ositional)h(parameters)e(are)g(set)h(to)f(the)g(remain-)75 880 y(ing)h(argumen)o(ts,)f(if)h(an)o(y)f(are)h(giv)o(en.)33 b(If)19 b(no)h(additional)h(argumen)o(ts)d(are)i(supplied,)i(the)e(p)q (ositional)75 935 y(parameters)14 b(are)h(unset.)137 1002 y(A)20 b(shell)h(script)g(ma)o(y)e(b)q(e)h(made)g(executable)h(b)o (y)e(using)i(the)f Ft(chmod)f Fu(command)g(to)h(turn)f(on)h(the)75 1057 y(execute)h(bit.)37 b(When)21 b(Bash)f(\014nds)i(suc)o(h)f(a)f (\014le)h(while)i(searc)o(hing)e(the)f Ft($PATH)g Fu(for)g(a)g (command,)i(it)75 1112 y(spa)o(wns)15 b(a)g(subshell)i(to)d(execute)i (it.)k(In)c(other)f(w)o(ords,)f(executing)195 1176 y Ft(filename)23 b Fo(argumen)o(ts)75 1243 y Fu(is)16 b(equiv)m(alen)o(t) h(to)d(executing)195 1308 y Ft(bash)23 b(filename)g Fo(argumen)o(ts)75 1375 y Fu(if)15 b Ft(filename)f Fu(is)h(an)g(executable)h(shell)h (script.)j(This)15 b(subshell)i(reinitializes)h(itself,)e(so)e(that)g (the)h(e\013ect)75 1430 y(is)k(as)f(if)g(a)g(new)h(shell)h(had)e(b)q (een)h(in)o(v)o(ok)o(ed)g(to)e(in)o(terpret)i(the)f(script,)h(with)g (the)f(exception)h(that)f(the)75 1484 y(lo)q(cations)13 b(of)e(commands)h(remem)o(b)q(ered)h(b)o(y)f(the)g(paren)o(t)g(\(see)f (the)i(description)g(of)f Ft(hash)f Fu(in)i(Section)g(4.1)75 1539 y([Bourne)i(Shell)i(Builtins],)g(page)e(31\))f(are)h(retained)h(b) o(y)f(the)g(c)o(hild.)137 1606 y(Most)i(v)o(ersions)h(of)f(Unix)i(mak)o (e)e(this)h(a)g(part)f(of)g(the)h(op)q(erating)g(system's)f(command)h (execution)75 1661 y(mec)o(hanism.)25 b(If)17 b(the)g(\014rst)f(line)i (of)f(a)f(script)h(b)q(egins)h(with)f(the)g(t)o(w)o(o)e(c)o(haracters)h (`)p Ft(#!)p Fu(',)f(the)i(remainder)75 1716 y(of)e(the)h(line)h(sp)q (eci\014es)g(an)f(in)o(terpreter)f(for)g(the)h(program.)j(Th)o(us,)c(y) o(ou)h(can)f(sp)q(ecify)i(Bash,)e Ft(awk)p Fu(,)g(P)o(erl,)75 1771 y(or)g(some)g(other)f(in)o(terpreter)i(and)f(write)g(the)h(rest)e (of)h(the)h(script)f(\014le)h(in)g(that)f(language.)137 1838 y(The)21 b(argumen)o(ts)e(to)h(the)g(in)o(terpreter)h(consist)g (of)f(a)g(single)h(optional)g(argumen)o(t)f(follo)o(wing)h(the)75 1893 y(in)o(terpreter)c(name)f(on)h(the)f(\014rst)h(line)h(of)e(the)h (script)f(\014le,)i(follo)o(w)o(ed)f(b)o(y)f(the)h(name)g(of)f(the)g (script)h(\014le,)75 1948 y(follo)o(w)o(ed)f(b)o(y)g(the)g(rest)f(of)g (the)h(argumen)o(ts.)21 b(Bash)16 b(will)h(p)q(erform)f(this)g(action)g (on)f(op)q(erating)h(systems)75 2002 y(that)11 b(do)h(not)f(handle)i (it)f(themselv)o(es.)20 b(Note)11 b(that)g(some)g(older)i(v)o(ersions)f (of)f(Unix)i(limit)g(the)f(in)o(terpreter)75 2057 y(name)j(and)h (argumen)o(t)e(to)h(a)f(maxim)o(um)i(of)e(32)h(c)o(haracters.)137 2125 y(Bash)h(scripts)h(often)f(b)q(egin)h(with)g Ft(#!)d(/bin/bash)h Fu(\(assuming)h(that)g(Bash)g(has)g(b)q(een)h(installed)h(in)75 2179 y(`)p Ft(/bin)p Fu('\),)10 b(since)j(this)f(ensures)g(that)f(Bash) h(will)h(b)q(e)f(used)g(to)f(in)o(terpret)h(the)g(script,)g(ev)o(en)g (if)g(it)g(is)g(executed)75 2234 y(under)k(another)f(shell.)p eop %%Page: 30 32 30 31 bop 75 -58 a Fu(30)1285 b(Bash)15 b(Reference)h(Man)o(ual)p eop %%Page: 31 33 31 32 bop 75 -58 a Fu(Chapter)15 b(4:)k(Shell)f(Builtin)f(Commands)1035 b(31)75 149 y Fq(4)41 b(Shell)25 b(Builtin)g(Commands)137 257 y Fu(Builtin)15 b(commands)d(are)g(con)o(tained)h(within)h(the)e (shell)i(itself.)20 b(When)13 b(the)f(name)g(of)g(a)g(builtin)j(com-)75 312 y(mand)f(is)g(used)g(as)g(the)f(\014rst)h(w)o(ord)f(of)g(a)g (simple)i(command)f(\(see)g(Section)g(3.2.1)e([Simple)j(Commands],)75 367 y(page)10 b(8\),)h(the)f(shell)i(executes)f(the)f(command)h (directly)l(,)h(without)f(in)o(v)o(oking)g(another)f(program.)17 b(Builtin)75 421 y(commands)h(are)g(necessary)g(to)g(implemen)o(t)i (functionalit)o(y)f(imp)q(ossible)i(or)c(incon)o(v)o(enien)o(t)j(to)e (obtain)75 476 y(with)e(separate)e(utilities.)137 542 y(This)k(section)h(brie\015y)f(the)g(builtins)i(whic)o(h)e(Bash)g (inherits)h(from)e(the)h(Bourne)g(Shell,)h(as)f(w)o(ell)g(as)75 596 y(the)d(builtin)j(commands)d(whic)o(h)h(are)f(unique)h(to)f(or)g (ha)o(v)o(e)f(b)q(een)j(extended)f(in)g(Bash.)137 662 y(Sev)o(eral)23 b(builtin)h(commands)e(are)g(describ)q(ed)i(in)f(other) e(c)o(hapters:)34 b(builtin)24 b(commands)e(whic)o(h)75 717 y(pro)o(vide)12 b(the)g(Bash)g(in)o(terface)g(to)f(the)g(job)h(con) o(trol)f(facilities)j(\(see)e(Section)g(7.2)f([Job)h(Con)o(trol)f (Builtins],)75 771 y(page)19 b(76\),)h(the)f(directory)h(stac)o(k)f (\(see)h(Section)g(6.8.1)e([Directory)h(Stac)o(k)g(Builtins],)j(page)d (69\),)h(the)75 826 y(command)12 b(history)f(\(see)h(Section)h(9.2)d ([Bash)i(History)f(Builtins],)j(page)e(103\),)f(and)h(the)f (programmable)75 881 y(completion)16 b(facilities)i(\(see)d(Section)h (8.7)e([Programmable)g(Completion)i(Builtins],)h(page)e(99\).)137 946 y(Man)o(y)g(of)g(the)g(builtins)i(ha)o(v)o(e)e(b)q(een)h(extended)h (b)o(y)e Fp(posix)f Fu(or)h(Bash.)75 1069 y Fs(4.1)33 b(Bourne)22 b(Shell)i(Builtins)137 1164 y Fu(The)16 b(follo)o(wing)h (shell)g(builtin)h(commands)e(are)f(inherited)j(from)d(the)h(Bourne)g (Shell.)24 b(These)16 b(com-)75 1219 y(mands)f(are)g(implemen)o(ted)i (as)e(sp)q(eci\014ed)i(b)o(y)e(the)h Fp(posix)e Fu(1003.2)g(standard.) 75 1295 y Ft(:)h Fu(\(a)g(colon\))435 1346 y Ft(:)24 b([)p Fo(argumen)o(ts)r Ft(])315 1412 y Fu(Do)c(nothing)i(b)q(ey)o(ond) g(expanding)g Fo(argumen)o(ts)g Fu(and)f(p)q(erforming)h(redirections.) 39 b(The)315 1467 y(return)15 b(status)f(is)i(zero.)75 1542 y Ft(.)f Fu(\(a)g(p)q(erio)q(d\))435 1594 y Ft(.)24 b Fo(\014lename)j Ft([)p Fo(argumen)o(ts)r Ft(])315 1660 y Fu(Read)16 b(and)h(execute)h(commands)f(from)f(the)h Fo(\014lename)j Fu(argumen)o(t)c(in)i(the)f(curren)o(t)f(shell)315 1715 y(con)o(text.)21 b(If)16 b Fo(\014lename)j Fu(do)q(es)d(not)f(con) o(tain)h(a)f(slash,)h(the)g Ft(PATH)f Fu(v)m(ariable)i(is)f(used)g(to)f (\014nd)315 1769 y Fo(\014lename)p Fu(.)27 b(When)17 b(Bash)g(is)h(not)f(in)g Fp(posix)g Fu(mo)q(de,)h(the)f(curren)o(t)g (directory)g(is)h(searc)o(hed)315 1824 y(if)e Fo(\014lename)j Fu(is)d(not)f(found)h(in)g Ft($PATH)p Fu(.)k(If)c(an)o(y)f Fo(argumen)o(ts)i Fu(are)e(supplied,)j(they)d(b)q(ecome)315 1879 y(the)g(p)q(ositional)i(parameters)d(when)h Fo(\014lename)k Fu(is)d(executed.)k(Otherwise)c(the)g(p)q(ositional)315 1934 y(parameters)21 b(are)g(unc)o(hanged.)40 b(The)22 b(return)f(status)g(is)h(the)g(exit)g(status)e(of)h(the)h(last)315 1989 y(command)d(executed,)h(or)e(zero)h(if)g(no)f(commands)h(are)f (executed.)32 b(If)19 b Fo(\014lename)j Fu(is)d(not)315 2043 y(found,)11 b(or)f(cannot)g(b)q(e)i(read,)f(the)f(return)g(status) g(is)h(non-zero.)19 b(This)11 b(builtin)h(is)f(equiv)m(alen)o(t)315 2098 y(to)k Ft(source)p Fu(.)75 2174 y Ft(break)435 2236 y(break)23 b([)p Fo(n)p Ft(])315 2302 y Fu(Exit)f(from)g(a)g Ft(for)p Fu(,)h Ft(while)p Fu(,)g Ft(until)p Fu(,)g(or)e Ft(select)h Fu(lo)q(op.)41 b(If)22 b Fo(n)h Fu(is)g(supplied,)j(the)c Fo(n)p Fu(th)315 2357 y(enclosing)g(lo)q(op)e(is)h(exited.)35 b Fo(n)20 b Fu(m)o(ust)g(b)q(e)h(greater)e(than)h(or)f(equal)i(to)f(1.) 34 b(The)20 b(return)315 2411 y(status)14 b(is)i(zero)f(unless)h Fo(n)g Fu(is)g(not)e(greater)h(than)g(or)f(equal)i(to)f(1.)75 2487 y Ft(cd)435 2550 y(cd)24 b([-LP])f([)p Fo(directory)t Ft(])315 2615 y Fu(Change)18 b(the)h(curren)o(t)f(w)o(orking)g (directory)h(to)f Fo(directory)p Fu(.)30 b(If)18 b Fo(directory)23 b Fu(is)c(not)f(giv)o(en,)315 2670 y(the)d(v)m(alue)i(of)e(the)g Ft(HOME)g Fu(shell)i(v)m(ariable)g(is)f(used.)21 b(If)15 b(the)h(shell)h(v)m(ariable)g Ft(CDPATH)d Fu(exists,)p eop %%Page: 32 34 32 33 bop 75 -58 a Fu(32)1285 b(Bash)15 b(Reference)h(Man)o(ual)315 149 y(it)21 b(is)g(used)g(as)f(a)g(searc)o(h)g(path.)36 b(If)21 b Fo(directory)j Fu(b)q(egins)e(with)f(a)f(slash,)i Ft(CDPATH)d Fu(is)i(not)315 204 y(used.)29 b(The)19 b(`)p Ft(-P)p Fu(')e(option)h(means)h(to)e(not)h(follo)o(w)g(sym)o(b)q(olic)i (links;)g(sym)o(b)q(olic)g(links)f(are)315 259 y(follo)o(w)o(ed)e(b)o (y)g(default)g(or)g(with)g(the)g(`)p Ft(-L)p Fu(')e(option.)25 b(If)18 b Fo(directory)j Fu(is)c(`)p Ft(-)p Fu(',)f(it)h(is)g(equiv)m (alen)o(t)315 314 y(to)f Ft($OLDPWD)p Fu(.)23 b(The)17 b(return)g(status)f(is)h(zero)f(if)i(the)e(directory)h(is)g (successfully)i(c)o(hanged,)315 369 y(non-zero)c(otherwise.)75 450 y Ft(continue)435 515 y(continue)23 b([)p Fo(n)p Ft(])315 583 y Fu(Resume)16 b(the)g(next)g(iteration)g(of)g(an)g (enclosing)h Ft(for)p Fu(,)f Ft(while)p Fu(,)f Ft(until)p Fu(,)g(or)h Ft(select)f Fu(lo)q(op.)315 637 y(If)h Fo(n)f Fu(is)h(supplied,)i(the)d(execution)i(of)e(the)g Fo(n)p Fu(th)h(enclosing)h(lo)q(op)f(is)g(resumed.)21 b Fo(n)15 b Fu(m)o(ust)g(b)q(e)315 692 y(greater)j(than)h(or)f(equal)i(to)e(1.)31 b(The)19 b(return)g(status)f(is)i(zero)f(unless)h Fo(n)f Fu(is)g(not)g(greater)315 747 y(than)c(or)g(equal)h(to)e(1.)75 828 y Ft(eval)435 893 y(eval)23 b([)p Fo(argumen)o(ts)r Ft(])315 961 y Fu(The)13 b(argumen)o(ts)f(are)h(concatenated)f (together)g(in)o(to)h(a)g(single)h(command,)f(whic)o(h)g(is)h(then)315 1016 y(read)k(and)g(executed,)g(and)g(its)g(exit)g(status)f(returned)h (as)g(the)g(exit)g(status)f(of)g Ft(eval)p Fu(.)27 b(If)315 1070 y(there)15 b(are)g(no)g(argumen)o(ts)g(or)f(only)i(empt)o(y)f (argumen)o(ts,)f(the)h(return)g(status)g(is)g(zero.)75 1151 y Ft(exec)435 1216 y(exec)23 b([-cl])g([-a)h Fo(name)s Ft(])f([)p Fo(command)j Ft([)p Fo(argumen)o(ts)r Ft(]])315 1284 y Fu(If)14 b Fo(command)i Fu(is)f(supplied,)h(it)e(replaces)h(the) g(shell)g(without)f(creating)h(a)f(new)g(pro)q(cess.)20 b(If)315 1339 y(the)12 b(`)p Ft(-l)p Fu(')g(option)g(is)h(supplied,)i (the)d(shell)i(places)g(a)e(dash)g(at)g(the)g(b)q(eginning)j(of)d(the)g (zeroth)315 1394 y(arg)g(passed)h(to)f Fo(command)p Fu(.)19 b(This)13 b(is)g(what)f(the)h Ft(login)f Fu(program)g(do)q(es.)19 b(The)13 b(`)p Ft(-c)p Fu(')f(option)315 1449 y(causes)g Fo(command)i Fu(to)e(b)q(e)g(executed)h(with)g(an)f(empt)o(y)g(en)o (vironmen)o(t.)19 b(If)12 b(`)p Ft(-a)p Fu(')f(is)i(supplied,)315 1504 y(the)j(shell)i(passes)e Fo(name)i Fu(as)e(the)g(zeroth)g(argumen) o(t)f(to)g Fo(command)p Fu(.)23 b(If)16 b(no)g Fo(command)h Fu(is)315 1558 y(sp)q(eci\014ed,)i(redirections)g(ma)o(y)d(b)q(e)i (used)g(to)f(a\013ect)f(the)i(curren)o(t)f(shell)h(en)o(vironmen)o(t.) 27 b(If)315 1613 y(there)17 b(are)g(no)g(redirection)h(errors,)f(the)g (return)g(status)f(is)i(zero;)g(otherwise)f(the)g(return)315 1668 y(status)d(is)i(non-zero.)75 1749 y Ft(exit)435 1814 y(exit)23 b([)p Fo(n)p Ft(])315 1882 y Fu(Exit)15 b(the)g(shell,)h(returning)g(a)e(status)g(of)h Fo(n)g Fu(to)f(the)h(shell's)h(paren)o(t.)k(If)15 b Fo(n)g Fu(is)g(omitted,)g (the)315 1937 y(exit)f(status)e(is)i(that)f(of)f(the)i(last)f(command)g (executed.)20 b(An)o(y)14 b(trap)e(on)i Ft(EXIT)e Fu(is)i(executed)315 1991 y(b)q(efore)h(the)h(shell)h(terminates.)75 2072 y Ft(export)435 2137 y(export)23 b([-fn])g([-p])h([)p Fo(name)s Ft([=)p Fo(v)m(alue)s Ft(]])315 2205 y Fu(Mark)19 b(eac)o(h)h Fo(name)i Fu(to)e(b)q(e)g(passed)g(to)f(c)o(hild)j(pro)q (cesses)e(in)h(the)f(en)o(vironmen)o(t.)34 b(If)20 b(the)315 2260 y(`)p Ft(-f)p Fu(')14 b(option)h(is)g(supplied,)i(the)e Fo(name)s Fu(s)f(refer)g(to)h(shell)h(functions;)f(otherwise)g(the)g (names)315 2315 y(refer)j(to)g(shell)i(v)m(ariables.)30 b(The)19 b(`)p Ft(-n)p Fu(')e(option)h(means)h(to)e(no)h(longer)h(mark) f(eac)o(h)g Fo(name)315 2370 y Fu(for)h(exp)q(ort.)32 b(If)20 b(no)f Fo(names)j Fu(are)d(supplied,)j(or)d(if)h(the)f(`)p Ft(-p)p Fu(')g(option)g(is)h(giv)o(en,)h(a)e(list)h(of)315 2425 y(exp)q(orted)f(names)f(is)h(displa)o(y)o(ed.)30 b(The)19 b(`)p Ft(-p)p Fu(')e(option)i(displa)o(ys)g(output)f(in)h(a)f (form)g(that)315 2479 y(ma)o(y)f(b)q(e)h(reused)g(as)g(input.)28 b(The)18 b(return)f(status)g(is)h(zero)f(unless)i(an)f(in)o(v)m(alid)i (option)d(is)315 2534 y(supplied,)f(one)e(of)f(the)h(names)g(is)g(not)f (a)h(v)m(alid)h(shell)h(v)m(ariable)f(name,)e(or)h(`)p Ft(-f)p Fu(')e(is)j(supplied)315 2589 y(with)h(a)e(name)i(that)e(is)i (not)f(a)g(shell)h(function.)75 2670 y Ft(getopts)p eop %%Page: 33 35 33 34 bop 75 -58 a Fu(Chapter)15 b(4:)k(Shell)f(Builtin)f(Commands)1035 b(33)435 149 y Ft(getopts)23 b Fo(optstring)k(name)g Ft([)p Fo(args)r Ft(])315 217 y(getopts)14 b Fu(is)i(used)f(b)o(y)g (shell)i(scripts)e(to)g(parse)g(p)q(ositional)h(parameters.)j Fo(optstring)g Fu(con-)315 272 y(tains)i(the)g(option)g(c)o(haracters)f (to)g(b)q(e)h(recognized;)k(if)c(a)f(c)o(haracter)g(is)i(follo)o(w)o (ed)f(b)o(y)f(a)315 327 y(colon,)c(the)g(option)g(is)h(exp)q(ected)g (to)e(ha)o(v)o(e)g(an)h(argumen)o(t,)f(whic)o(h)i(should)g(b)q(e)f (separated)315 382 y(from)i(it)h(b)o(y)g(white)g(space.)31 b(The)19 b(colon)g(\(`)p Ft(:)p Fu('\))e(and)i(question)h(mark)e(\(`)p Ft(?)p Fu('\))f(ma)o(y)h(not)g(b)q(e)315 437 y(used)i(as)f(option)g(c)o (haracters.)31 b(Eac)o(h)19 b(time)h(it)f(is)h(in)o(v)o(ok)o(ed,)g Ft(getopts)e Fu(places)j(the)e(next)315 491 y(option)c(in)g(the)f (shell)i(v)m(ariable)g Fo(name)p Fu(,)e(initializi)q(ng)j Fo(name)g Fu(if)e(it)f(do)q(es)h(not)f(exist,)g(and)h(the)315 546 y(index)j(of)e(the)h(next)g(argumen)o(t)e(to)h(b)q(e)i(pro)q (cessed)f(in)o(to)g(the)f(v)m(ariable)i Ft(OPTIND)p Fu(.)24 b Ft(OPTIND)315 601 y Fu(is)d(initialized)j(to)c(1)g(eac)o(h)g(time)h (the)g(shell)h(or)e(a)g(shell)i(script)f(is)g(in)o(v)o(ok)o(ed.)36 b(When)21 b(an)315 656 y(option)d(requires)g(an)g(argumen)o(t,)f Ft(getopts)f Fu(places)j(that)e(argumen)o(t)f(in)o(to)i(the)g(v)m (ariable)315 710 y Ft(OPTARG)p Fu(.)27 b(The)18 b(shell)h(do)q(es)f (not)g(reset)f Ft(OPTIND)g Fu(automatically;)i(it)f(m)o(ust)g(b)q(e)g (man)o(ually)315 765 y(reset)g(b)q(et)o(w)o(een)h(m)o(ultiple)h(calls)f (to)f Ft(getopts)f Fu(within)j(the)e(same)g(shell)i(in)o(v)o(o)q (cation)f(if)f(a)315 820 y(new)d(set)g(of)g(parameters)g(is)g(to)g(b)q (e)h(used.)315 888 y(When)21 b(the)g(end)g(of)f(options)h(is)h(encoun)o (tered,)g Ft(getopts)e Fu(exits)h(with)g(a)f(return)h(v)m(alue)315 943 y(greater)14 b(than)h(zero.)20 b Ft(OPTIND)14 b Fu(is)i(set)f(to)g (the)g(index)h(of)f(the)h(\014rst)e(non-option)i(argumen)o(t,)315 998 y(and)f Ft(name)g Fu(is)h(set)f(to)f(`)p Ft(?)p Fu('.)315 1065 y Ft(getopts)g Fu(normally)h(parses)f(the)h(p)q(ositional)h (parameters,)d(but)i(if)g(more)g(argumen)o(ts)e(are)315 1120 y(giv)o(en)j(in)g Fo(args)p Fu(,)e Ft(getopts)g Fu(parses)h(those)g(instead.)315 1188 y Ft(getopts)h Fu(can)h(rep)q(ort)f(errors)g(in)i(t)o(w)o(o)d(w)o(a)o(ys.)24 b(If)17 b(the)g(\014rst)f(c)o(haracter)g(of)h Fo(optstring)j Fu(is)d(a)315 1243 y(colon,)h Fo(silen)o(t)h Fu(error)d(rep)q(orting)i (is)f(used.)26 b(In)18 b(normal)f(op)q(eration)h(diagnostic)f(messages) 315 1298 y(are)d(prin)o(ted)i(when)f(in)o(v)m(alid)i(options)d(or)g (missing)i(option)f(argumen)o(ts)e(are)i(encoun)o(tered.)315 1352 y(If)i(the)g(v)m(ariable)i Ft(OPTERR)d Fu(is)i(set)e(to)h(0,)g(no) f(error)h(messages)f(will)j(b)q(e)f(displa)o(y)o(ed,)g(ev)o(en)f(if)315 1407 y(the)e(\014rst)g(c)o(haracter)g(of)f Ft(optstring)g Fu(is)i(not)f(a)g(colon.)315 1475 y(If)20 b(an)g(in)o(v)m(alid)i (option)e(is)h(seen,)g Ft(getopts)e Fu(places)i(`)p Ft(?)p Fu(')e(in)o(to)h Fo(name)i Fu(and,)f(if)g(not)e(silen)o(t,)315 1530 y(prin)o(ts)h(an)g(error)f(message)g(and)h(unsets)g Ft(OPTARG)p Fu(.)33 b(If)20 b Ft(getopts)f Fu(is)h(silen)o(t,)i(the)e (option)315 1585 y(c)o(haracter)14 b(found)i(is)g(placed)g(in)g Ft(OPTARG)e Fu(and)i(no)f(diagnostic)h(message)f(is)g(prin)o(ted.)315 1653 y(If)f(a)f(required)i(argumen)o(t)d(is)i(not)g(found,)f(and)h Ft(getopts)f Fu(is)h(not)f(silen)o(t,)h(a)f(question)i(mark)315 1707 y(\(`)p Ft(?)p Fu('\))d(is)i(placed)h(in)g Fo(name)p Fu(,)e Ft(OPTARG)g Fu(is)i(unset,)e(and)h(a)g(diagnostic)g(message)f (is)i(prin)o(ted.)20 b(If)315 1762 y Ft(getopts)14 b Fu(is)h(silen)o(t,)h(then)f(a)f(colon)h(\(`)p Ft(:)p Fu('\))f(is)h(placed)h(in)g Fo(name)h Fu(and)e Ft(OPTARG)f Fu(is)h(set)g(to)f(the)315 1817 y(option)h(c)o(haracter)g(found.)75 1898 y Ft(hash)435 1963 y(hash)23 b([-r])h([-p)f Fo(\014lename)s Ft(])i([-t])e([)p Fo(name)s Ft(])315 2031 y Fu(Remem)o(b)q(er)18 b(the)g(full)i(pathnames)e(of)f(commands)h(sp)q(eci\014ed)i(as)e Fo(name)j Fu(argumen)o(ts,)c(so)315 2086 y(they)g(need)h(not)f(b)q(e)h (searc)o(hed)f(for)g(on)g(subsequen)o(t)h(in)o(v)o(o)q(cations.)26 b(The)17 b(commands)g(are)315 2140 y(found)k(b)o(y)f(searc)o(hing)g (through)g(the)h(directories)g(listed)h(in)f Ft($PATH)p Fu(.)34 b(The)21 b(`)p Ft(-p)p Fu(')e(option)315 2195 y(inhibits)d(the)d(path)g(searc)o(h,)h(and)f Fo(\014lename)k Fu(is)d(used)g(as)f(the)h(lo)q(cation)g(of)f Fo(name)p Fu(.)19 b(The)14 b(`)p Ft(-r)p Fu(')315 2250 y(option)19 b(causes)f(the)g(shell)i(to)e(forget)f(all)j(remem)o(b)q(ered)f(lo)q (cations.)30 b(If)18 b(the)g(`)p Ft(-t)p Fu(')g(option)315 2305 y(is)g(supplied,)j(the)d(full)h(pathname)f(to)g(whic)o(h)g(eac)o (h)h Fo(name)h Fu(corresp)q(onds)e(is)h(prin)o(ted.)29 b(If)315 2360 y(m)o(ultiple)16 b Fo(name)g Fu(argumen)o(ts)d(are)h (supplied)i(with)e(`)p Ft(-t)p Fu(')f(the)h Fo(name)j Fu(is)d(prin)o(ted)h(b)q(efore)f(the)315 2414 y(hashed)19 b(full)g(pathname.)29 b(If)18 b(no)g(argumen)o(ts)g(are)g(giv)o(en,)h (information)f(ab)q(out)g(remem-)315 2469 y(b)q(ered)j(commands)f(is)g (prin)o(ted.)35 b(The)21 b(return)f(status)f(is)h(zero)g(unless)i(a)d Fo(name)k Fu(is)d(not)315 2524 y(found)c(or)e(an)h(in)o(v)m(alid)j (option)d(is)h(supplied.)75 2605 y Ft(pwd)435 2670 y(pwd)23 b([-LP])p eop %%Page: 34 36 34 35 bop 75 -58 a Fu(34)1285 b(Bash)15 b(Reference)h(Man)o(ual)315 149 y(Prin)o(t)c(the)h(absolute)f(pathname)g(of)g(the)g(curren)o(t)h(w) o(orking)e(directory)l(.)20 b(If)12 b(the)h(`)p Ft(-P)p Fu(')e(option)315 204 y(is)18 b(supplied,)j(the)c(pathname)h(prin)o (ted)h(will)g(not)e(con)o(tain)h(sym)o(b)q(olic)h(links.)29 b(If)18 b(the)g(`)p Ft(-L)p Fu(')315 259 y(option)k(is)g(supplied,)k (the)c(pathname)g(prin)o(ted)g(ma)o(y)f(con)o(tain)h(sym)o(b)q(olic)h (links.)42 b(The)315 314 y(return)14 b(status)e(is)i(zero)g(unless)g (an)g(error)f(is)h(encoun)o(tered)g(while)h(determining)g(the)f(name) 315 369 y(of)h(the)g(curren)o(t)g(directory)h(or)e(an)h(in)o(v)m(alid)j (option)d(is)h(supplied.)75 446 y Ft(readonly)435 509 y(readonly)23 b([-apf])g([)p Fo(name)s Ft(])g(...)315 576 y Fu(Mark)16 b(eac)o(h)g Fo(name)j Fu(as)d(readonly)l(.)25 b(The)17 b(v)m(alues)g(of)f(these)h(names)g(ma)o(y)e(not)h(b)q(e)i(c)o (hanged)315 630 y(b)o(y)f(subsequen)o(t)h(assignmen)o(t.)27 b(If)18 b(the)f(`)p Ft(-f)p Fu(')f(option)i(is)g(supplied,)i(eac)o(h)d Fo(name)j Fu(refers)e(to)315 685 y(a)d(shell)i(function.)22 b(The)16 b(`)p Ft(-a)p Fu(')f(option)g(means)h(eac)o(h)g Fo(name)i Fu(refers)d(to)g(an)h(arra)o(y)e(v)m(ariable.)315 740 y(If)k(no)g Fo(name)i Fu(argumen)o(ts)d(are)g(giv)o(en,)i(or)e(if)h (the)g(`)p Ft(-p)p Fu(')f(option)h(is)g(supplied,)j(a)c(list)i(of)e (all)315 795 y(readonly)f(names)g(is)h(prin)o(ted.)23 b(The)16 b(`)p Ft(-p)p Fu(')f(option)h(causes)g(output)f(to)h(b)q(e)g (displa)o(y)o(ed)i(in)e(a)315 850 y(format)c(that)h(ma)o(y)g(b)q(e)h (reused)h(as)e(input.)20 b(The)14 b(return)g(status)f(is)h(zero)f (unless)i(an)f(in)o(v)m(alid)315 904 y(option)k(is)g(supplied,)i(one)d (of)h(the)f Fo(name)j Fu(argumen)o(ts)d(is)h(not)f(a)g(v)m(alid)i (shell)h(v)m(ariable)e(or)315 959 y(function)h(name,)g(or)e(the)h(`)p Ft(-f)p Fu(')g(option)g(is)h(supplied)h(with)f(a)e(name)i(that)e(is)i (not)f(a)f(shell)315 1014 y(function.)75 1092 y Ft(return)435 1155 y(return)23 b([)p Fo(n)p Ft(])315 1221 y Fu(Cause)15 b(a)g(shell)h(function)g(to)e(exit)i(with)f(the)g(return)g(v)m(alue)h Fo(n)p Fu(.)k(If)c Fo(n)f Fu(is)g(not)g(supplied,)i(the)315 1276 y(return)h(v)m(alue)h(is)g(the)f(exit)h(status)e(of)g(the)i(last)f (command)f(executed)i(in)g(the)f(function.)315 1331 y(This)12 b(ma)o(y)e(also)h(b)q(e)h(used)f(to)f(terminate)i(execution)g(of)e(a)h (script)g(b)q(eing)i(executed)f(with)f(the)315 1385 y Ft(.)i Fu(\(or)g Ft(source)p Fu(\))f(builtin,)k(returning)e(either)h Fo(n)e Fu(or)g(the)h(exit)g(status)f(of)g(the)h(last)f(command)315 1440 y(executed)j(within)g(the)f(script)g(as)g(the)g(exit)g(status)f (of)g(the)h(script.)21 b(The)15 b(return)f(status)g(is)315 1495 y(non-zero)g(if)h Ft(return)e Fu(is)i(used)f(outside)h(a)f (function)h(and)f(not)f(during)i(the)g(execution)g(of)e(a)315 1550 y(script)j(b)o(y)f Ft(.)g Fu(or)f Ft(source)p Fu(.)75 1627 y Ft(shift)435 1691 y(shift)23 b([)p Fo(n)p Ft(])315 1757 y Fu(Shift)e(the)g(p)q(ositional)h(parameters)e(to)g(the)h(left)g (b)o(y)f Fo(n)p Fu(.)37 b(The)21 b(p)q(ositional)h(parameters)315 1812 y(from)13 b Fo(n)p Ft(+)p Fu(1)j(.)11 b(.)g(.)18 b Ft($#)c Fu(are)f(renamed)h(to)f Ft($1)k Fu(.)10 b(.)h(.)19 b Ft($#)p Fu(-)p Fo(n)p Ft(+)p Fu(1.)g(P)o(arameters)12 b(represen)o(ted)i(b)o(y)g(the)315 1867 y(n)o(um)o(b)q(ers)k Ft($#)f Fu(to)g Fo(n)p Ft(+)p Fu(1)h(are)f(unset.)28 b Fo(n)18 b Fu(m)o(ust)f(b)q(e)h(a)f(non-negativ)o(e)i(n)o(um)o(b)q(er) f(less)g(than)f(or)315 1921 y(equal)g(to)f Ft($#)p Fu(.)23 b(If)17 b Fo(n)f Fu(is)h(zero)g(or)f(greater)f(than)h Ft($#)p Fu(,)g(the)h(p)q(ositional)h(parameters)d(are)h(not)315 1976 y(c)o(hanged.)23 b(If)17 b Fo(n)g Fu(is)f(not)g(supplied,)j(it)d (is)h(assumed)g(to)e(b)q(e)i(1.)23 b(The)17 b(return)f(status)f(is)i (zero)315 2031 y(unless)f Fo(n)g Fu(is)f(greater)g(than)g Ft($#)g Fu(or)f(less)i(than)f(zero,)g(non-zero)g(otherwise.)75 2108 y Ft(test)75 2163 y([)216 b Fu(Ev)m(aluate)16 b(a)f(conditional)i (expression)f Fo(expr)p Fu(.)21 b(Eac)o(h)15 b(op)q(erator)f(and)i(op)q (erand)g(m)o(ust)e(b)q(e)i(a)315 2218 y(separate)d(argumen)o(t.)18 b(Expressions)c(are)e(comp)q(osed)i(of)e(the)h(primaries)h(describ)q (ed)h(b)q(elo)o(w)315 2273 y(in)h(Section)g(6.4)e([Bash)h(Conditional)i (Expressions],)e(page)g(64.)315 2339 y(When)h(the)f Ft([)g Fu(form)f(is)i(used,)f(the)h(last)f(argumen)o(t)f(to)h(the)g(command)g (m)o(ust)g(b)q(e)h(a)f Ft(])p Fu(.)315 2405 y(Expressions)d(ma)o(y)f(b) q(e)i(com)o(bined)g(using)f(the)g(follo)o(wing)g(op)q(erators,)f (listed)i(in)g(decreasing)315 2460 y(order)i(of)g(precedence.)315 2538 y Ft(!)g Fo(expr)114 b Fu(T)l(rue)15 b(if)h Fo(expr)j Fu(is)c(false.)315 2615 y Ft(\()g Fo(expr)k Ft(\))71 b Fu(Returns)12 b(the)g(v)m(alue)h(of)f Fo(expr)p Fu(.)19 b(This)13 b(ma)o(y)e(b)q(e)i(used)g(to)f(o)o(v)o(erride)g(the)g(normal) 555 2670 y(precedence)17 b(of)e(op)q(erators.)p eop %%Page: 35 37 35 36 bop 75 -58 a Fu(Chapter)15 b(4:)k(Shell)f(Builtin)f(Commands)1035 b(35)315 149 y Fo(expr1)19 b Ft(-a)c Fo(expr2)555 204 y Fu(T)l(rue)g(if)h(b)q(oth)f Fo(expr1)k Fu(and)d Fo(expr2)i Fu(are)d(true.)315 288 y Fo(expr1)k Ft(-o)c Fo(expr2)555 343 y Fu(T)l(rue)g(if)h(either)g Fo(expr1)j Fu(or)14 b Fo(expr2)19 b Fu(is)d(true.)315 427 y(The)j Ft(test)f Fu(and)h Ft([)f Fu(builtins)j(ev)m(aluate)e(conditional)i(expressions)e (using)g(a)g(set)f(of)g(rules)315 482 y(based)e(on)f(the)g(n)o(um)o(b)q (er)g(of)g(argumen)o(ts.)315 565 y(0)g(argumen)o(ts)555 620 y(The)g(expression)i(is)e(false.)315 704 y(1)g(argumen)o(t)555 759 y(The)g(expression)i(is)e(true)g(if)h(and)f(only)h(if)g(the)f (argumen)o(t)f(is)i(not)f(n)o(ull.)315 843 y(2)g(argumen)o(ts)555 898 y(If)h(the)f(\014rst)g(argumen)o(t)g(is)h(`)p Ft(!)p Fu(',)e(the)h(expression)h(is)g(true)g(if)g(and)f(only)h(if)g(the)555 952 y(second)h(argumen)o(t)f(is)h(n)o(ull.)26 b(If)17 b(the)g(\014rst)g(argumen)o(t)f(is)h(one)g(of)f(the)h(unary)555 1007 y(conditional)22 b(op)q(erators)d(\(see)i(Section)g(6.4)e([Bash)h (Conditional)i(Expres-)555 1062 y(sions],)16 b(page)h(64\),)e(the)h (expression)i(is)f(true)f(if)h(the)f(unary)h(test)e(is)i(true.)24 b(If)555 1117 y(the)17 b(\014rst)f(argumen)o(t)g(is)h(not)f(a)h(v)m (alid)h(unary)e(op)q(erator,)g(the)h(expression)g(is)555 1172 y(false.)315 1256 y(3)e(argumen)o(ts)555 1310 y(If)j(the)f(second) h(argumen)o(t)f(is)h(one)g(of)f(the)h(binary)g(conditional)h(op)q (erators)555 1365 y(\(see)11 b(Section)h(6.4)e([Bash)g(Conditional)j (Expressions],)e(page)g(64\),)f(the)i(result)555 1420 y(of)22 b(the)g(expression)h(is)f(the)h(result)f(of)g(the)g(binary)h (test)e(using)i(the)f(\014rst)555 1475 y(and)17 b(third)h(argumen)o(ts) e(as)g(op)q(erands.)26 b(If)17 b(the)g(\014rst)f(argumen)o(t)g(is)i(`)p Ft(!)p Fu(',)e(the)555 1529 y(v)m(alue)e(is)f(the)f(negation)h(of)e (the)i(t)o(w)o(o-argumen)o(t)d(test)i(using)h(the)g(second)g(and)555 1584 y(third)k(argumen)o(ts.)22 b(If)17 b(the)f(\014rst)g(argumen)o(t)g (is)g(exactly)h(`)p Ft(\()p Fu(')e(and)i(the)f(third)555 1639 y(argumen)o(t)g(is)h(exactly)h(`)p Ft(\))p Fu(',)d(the)i(result)h (is)f(the)g(one-argumen)o(t)f(test)g(of)h(the)555 1694 y(second)f(argumen)o(t.)21 b(Otherwise,)16 b(the)g(expression)g(is)h (false.)k(The)16 b(`)p Ft(-a)p Fu(')f(and)555 1749 y(`)p Ft(-o)p Fu(')f(op)q(erators)g(are)h(considered)i(binary)f(op)q(erators) e(in)i(this)g(case.)315 1833 y(4)f(argumen)o(ts)555 1887 y(If)i(the)f(\014rst)g(argumen)o(t)g(is)h(`)p Ft(!)p Fu(',)f(the)g(result)h(is)g(the)g(negation)f(of)g(the)h(three-)555 1942 y(argumen)o(t)f(expression)i(comp)q(osed)f(of)f(the)h(remaining)h (argumen)o(ts.)24 b(Oth-)555 1997 y(erwise,)17 b(the)g(expression)g(is) g(parsed)g(and)g(ev)m(aluated)g(according)g(to)f(prece-)555 2052 y(dence)g(using)g(the)f(rules)h(listed)h(ab)q(o)o(v)o(e.)315 2136 y(5)e(or)g(more)f(argumen)o(ts)555 2190 y(The)22 b(expression)g(is)g(parsed)g(and)g(ev)m(aluated)g(according)g(to)f (precedence)555 2245 y(using)16 b(the)f(rules)h(listed)h(ab)q(o)o(v)o (e.)75 2329 y Ft(times)435 2396 y(times)315 2465 y Fu(Prin)o(t)i(out)f (the)h(user)g(and)f(system)h(times)g(used)g(b)o(y)g(the)f(shell)j(and)e (its)f(c)o(hildren.)33 b(The)315 2520 y(return)15 b(status)f(is)i (zero.)75 2604 y Ft(trap)435 2670 y(trap)23 b([-lp])g([)p Fo(arg)t Ft(])g([)p Fo(sigsp)q(ec)28 b Ft(...)o(])p eop %%Page: 36 38 36 37 bop 75 -58 a Fu(36)1285 b(Bash)15 b(Reference)h(Man)o(ual)315 149 y(The)22 b(commands)f(in)i Fo(arg)h Fu(are)d(to)g(b)q(e)i(read)e (and)h(executed)g(when)g(the)g(shell)h(receiv)o(es)315 204 y(signal)d Fo(sigsp)q(ec)p Fu(.)35 b(If)20 b Fo(arg)i Fu(is)f(absen)o(t)e(or)g(equal)i(to)e(`)p Ft(-)p Fu(',)g(all)i(sp)q (eci\014ed)g(signals)g(are)e(reset)315 259 y(to)g(the)g(v)m(alues)i (they)e(had)h(when)g(the)f(shell)i(w)o(as)e(started.)32 b(If)20 b Fo(arg)i Fu(is)e(the)f(n)o(ull)i(string,)315 314 y(then)15 b(the)g(signal)g(sp)q(eci\014ed)i(b)o(y)e(eac)o(h)g Fo(sigsp)q(ec)j Fu(is)d(ignored)h(b)o(y)e(the)h(shell)h(and)f(commands) 315 369 y(it)i(in)o(v)o(ok)o(es.)26 b(If)17 b Fo(arg)j Fu(is)e(not)e(presen)o(t)h(and)h(`)p Ft(-p)p Fu(')e(has)g(b)q(een)j (supplied,)g(the)e(shell)i(displa)o(ys)315 423 y(the)14 b(trap)e(commands)i(asso)q(ciated)f(with)h(eac)o(h)g Fo(sigsp)q(ec)p Fu(.)20 b(If)14 b(no)f(argumen)o(ts)g(are)g(supplied,) 315 478 y(or)19 b(only)i(`)p Ft(-p)p Fu(')d(is)i(giv)o(en,)h Ft(trap)f Fu(prin)o(ts)g(the)f(list)i(of)e(commands)h(asso)q(ciated)g (with)g(eac)o(h)315 533 y(signal)g(n)o(um)o(b)q(er)g(in)g(a)g(form)e (that)h(ma)o(y)g(b)q(e)h(reused)g(as)f(shell)i(input.)34 b(Eac)o(h)19 b Fo(sigsp)q(ec)k Fu(is)315 588 y(either)13 b(a)g(signal)g(name)g(suc)o(h)g(as)f Ft(SIGINT)g Fu(\(with)h(or)f (without)h(the)g Ft(SIG)f Fu(pre\014x\))h(or)f(a)g(signal)315 643 y(n)o(um)o(b)q(er.)30 b(If)18 b(a)g Fo(sigsp)q(ec)k Fu(is)d Ft(0)f Fu(or)g Ft(EXIT)p Fu(,)g Fo(arg)k Fu(is)d(executed)g (when)g(the)f(shell)i(exits.)30 b(If)18 b(a)315 697 y Fo(sigsp)q(ec)k Fu(is)d Ft(DEBUG)p Fu(,)f(the)h(command)f Fo(arg)j Fu(is)e(executed)h(after)d(ev)o(ery)i(simple)g(command.)315 752 y(If)d(a)f Fo(sigsp)q(ec)k Fu(is)d Ft(ERR)p Fu(,)f(the)g(command)g Fo(arg)k Fu(is)d(executed)g(whenev)o(er)g(a)f(simple)i(command)315 807 y(has)d(a)g(non-zero)h(exit)f(status.)19 b(The)14 b Ft(ERR)g Fu(trap)g(is)h(not)e(executed)j(if)e(the)h(failed)g(command) 315 862 y(is)20 b(part)f(of)f(an)i Ft(until)e Fu(or)h Ft(while)g Fu(lo)q(op,)h(part)f(of)g(an)g Ft(if)g Fu(statemen)o(t,)g (part)g(of)f(a)h Ft(&&)g Fu(or)315 917 y Ft(||)e Fu(list,)h(or)f(if)h (the)g(command's)f(return)g(status)f(is)i(b)q(eing)h(in)o(v)o(erted)f (using)g Ft(!)p Fu(.)26 b(The)18 b(`)p Ft(-l)p Fu(')315 971 y(option)f(causes)g(the)g(shell)h(to)f(prin)o(t)g(a)f(list)i(of)e (signal)i(names)f(and)g(their)g(corresp)q(onding)315 1026 y(n)o(um)o(b)q(ers.)315 1092 y(Signals)i(ignored)g(up)q(on)g(en)o (try)f(to)f(the)i(shell)g(cannot)f(b)q(e)h(trapp)q(ed)g(or)f(reset.)28 b(T)l(rapp)q(ed)315 1146 y(signals)16 b(are)f(reset)g(to)f(their)i (original)g(v)m(alues)h(in)f(a)f(c)o(hild)h(pro)q(cess)g(when)g(it)f (is)h(created.)315 1212 y(The)f(return)h(status)e(is)i(zero)f(unless)h (a)f Fo(sigsp)q(ec)k Fu(do)q(es)d(not)e(sp)q(ecify)j(a)e(v)m(alid)i (signal.)75 1288 y Ft(umask)435 1350 y(umask)23 b([-p])g([-S])h([)p Fo(mo)q(de)s Ft(])315 1416 y Fu(Set)15 b(the)g(shell)h(pro)q(cess's)f (\014le)g(creation)g(mask)f(to)g Fo(mo)q(de)p Fu(.)20 b(If)15 b Fo(mo)q(de)j Fu(b)q(egins)e(with)f(a)f(digit,)315 1471 y(it)g(is)g(in)o(terpreted)g(as)f(an)h(o)q(ctal)f(n)o(um)o(b)q (er;)h(if)g(not,)g(it)f(is)h(in)o(terpreted)h(as)e(a)g(sym)o(b)q(olic)i (mo)q(de)315 1525 y(mask)f(similar)h(to)f(that)g(accepted)h(b)o(y)f (the)h Ft(chmod)e Fu(command.)20 b(If)15 b Fo(mo)q(de)i Fu(is)e(omitted,)f(the)315 1580 y(curren)o(t)k(v)m(alue)h(of)f(the)g (mask)f(is)i(prin)o(ted.)29 b(If)18 b(the)g(`)p Ft(-S)p Fu(')f(option)h(is)h(supplied)h(without)e(a)315 1635 y Fo(mo)q(de)i Fu(argumen)o(t,)d(the)h(mask)f(is)h(prin)o(ted)h(in)f(a) f(sym)o(b)q(olic)i(format.)26 b(If)18 b(the)f(`)p Ft(-p)p Fu(')g(option)315 1690 y(is)g(supplied,)i(and)e Fo(mo)q(de)j Fu(is)d(omitted,)g(the)g(output)f(is)i(in)f(a)g(form)f(that)g(ma)o(y)g (b)q(e)h(reused)315 1745 y(as)e(input.)22 b(The)15 b(return)h(status)e (is)i(zero)g(if)g(the)f(mo)q(de)h(is)g(successfully)h(c)o(hanged)f(or)f (if)h(no)315 1799 y Fo(mo)q(de)i Fu(argumen)o(t)c(is)i(supplied,)h(and) f(non-zero)f(otherwise.)315 1865 y(Note)j(that)f(when)i(the)f(mo)q(de)g (is)h(in)o(terpreted)g(as)f(an)g(o)q(ctal)g(n)o(um)o(b)q(er,)h(eac)o(h) f(n)o(um)o(b)q(er)g(of)315 1920 y(the)f(umask)g(is)h(subtracted)f(from) f Ft(7)p Fu(.)26 b(Th)o(us,)17 b(a)g(umask)g(of)f Ft(022)h Fu(results)h(in)g(p)q(ermissions)315 1974 y(of)d Ft(755)p Fu(.)75 2050 y Ft(unset)435 2113 y(unset)23 b([-fv])g([)p Fo(name)s Ft(])315 2178 y Fu(Eac)o(h)16 b(v)m(ariable)i(or)e(function)i Fo(name)h Fu(is)e(remo)o(v)o(ed.)23 b(If)17 b(no)f(options)h(are)f (supplied,)j(or)d(the)315 2233 y(`)p Ft(-v)p Fu(')g(option)i(is)f(giv)o (en,)h(eac)o(h)g Fo(name)h Fu(refers)e(to)g(a)g(shell)i(v)m(ariable.)27 b(If)18 b(the)f(`)p Ft(-f)p Fu(')f(option)h(is)315 2288 y(giv)o(en,)c(the)f Fo(name)s Fu(s)g(refer)g(to)f(shell)j(functions,)f (and)g(the)f(function)h(de\014nition)h(is)f(remo)o(v)o(ed.)315 2343 y(Readonly)j(v)m(ariables)i(and)e(functions)h(ma)o(y)e(not)h(b)q (e)g(unset.)23 b(The)16 b(return)g(status)g(is)g(zero)315 2398 y(unless)g(a)f Fo(name)j Fu(do)q(es)e(not)e(exist)i(or)f(is)g (readonly)l(.)75 2521 y Fs(4.2)33 b(Bash)21 b(Builtin)k(Commands)137 2615 y Fu(This)17 b(section)f(describ)q(es)i(builtin)g(commands)d(whic) o(h)i(are)f(unique)h(to)e(or)h(ha)o(v)o(e)f(b)q(een)i(extended)g(in)75 2670 y(Bash.)j(Some)15 b(of)g(these)g(commands)g(are)g(sp)q(eci\014ed)j (in)e(the)f Fp(posix)g Fu(1003.2)e(standard.)p eop %%Page: 37 39 37 38 bop 75 -58 a Fu(Chapter)15 b(4:)k(Shell)f(Builtin)f(Commands)1035 b(37)75 149 y Ft(alias)435 215 y(alias)23 b([-p])g([)p Fo(name)s Ft([=)p Fo(v)m(alue)s Ft(])h(...])315 283 y Fu(Without)d(argumen)o(ts)g(or)g(with)h(the)g(`)p Ft(-p)p Fu(')e(option,)j Ft(alias)e Fu(prin)o(ts)h(the)g(list)g(of)f(aliases) 315 338 y(on)d(the)g(standard)g(output)f(in)i(a)f(form)f(that)g(allo)o (ws)h(them)g(to)g(b)q(e)g(reused)h(as)e(input.)30 b(If)315 392 y(argumen)o(ts)14 b(are)g(supplied,)i(an)f(alias)g(is)f(de\014ned)i (for)e(eac)o(h)g Fo(name)j Fu(whose)e Fo(v)m(alue)j Fu(is)d(giv)o(en.) 315 447 y(If)20 b(no)g Fo(v)m(alue)j Fu(is)e(giv)o(en,)g(the)f(name)g (and)g(v)m(alue)h(of)e(the)h(alias)g(is)h(prin)o(ted.)34 b(Aliases)21 b(are)315 502 y(describ)q(ed)c(in)f(Section)g(6.6)e ([Aliases],)i(page)f(67.)75 583 y Ft(bind)435 649 y(bind)23 b([-m)h Fo(k)o(eymap)q Ft(])g([-lpsvPSV])435 700 y(bind)f([-m)h Fo(k)o(eymap)q Ft(])g([-q)f Fo(function)p Ft(])i([-u)e Fo(function)p Ft(])i([-r)e Fo(k)o(eyseq)q Ft(])435 752 y(bind)g([-m)h Fo(k)o(eymap)q Ft(])g(-f)f Fo(\014lename)435 804 y Ft(bind)g([-m)h Fo(k)o(eymap)q Ft(])g(-x)f Fo(k)o (eyseq:shell-command)435 856 y Ft(bind)g([-m)h Fo(k)o(eymap)q Ft(])g Fo(k)o(eyseq:function-name)315 924 y Fu(Displa)o(y)13 b(curren)o(t)g(Readline)h(\(see)e(Chapter)g(8)h([Command)e(Line)j (Editing],)g(page)e(79\))g(k)o(ey)315 979 y(and)i(function)h(bindings,) g(or)f(bind)h(a)e(k)o(ey)h(sequence)h(to)e(a)h(Readline)h(function)g (or)e(macro.)315 1034 y(The)h(binding)i(syn)o(tax)e(accepted)h(is)f (iden)o(tical)i(to)e(that)f(of)h(a)f(Readline)j(initialization)h (\014le)315 1089 y(\(see)d(Section)h(8.3)d([Readline)j(Init)g(File],)g (page)e(82\),)g(but)h(eac)o(h)g(binding)i(m)o(ust)d(b)q(e)i(passed)315 1143 y(as)j(a)g(separate)g(argumen)o(t:)25 b(e.g.,)18 b(`)p Ft("\\C-x\\C-r":re-read-i)o(nit-file)o Fu('.)26 b(Options,)19 b(if)315 1198 y(supplied,)e(ha)o(v)o(e)e(the)g(follo)o (wing)h(meanings:)315 1280 y Ft(-m)f Fo(k)o(eymap)555 1334 y Fu(Use)27 b Fo(k)o(eymap)h Fu(as)f(the)g(k)o(eymap)f(to)g(b)q(e) i(a\013ected)f(b)o(y)f(the)h(subsequen)o(t)555 1389 y(bindings.)e (Acceptable)17 b Fo(k)o(eymap)h Fu(names)e(are)g Ft(emacs)p Fu(,)f Ft(emacs-standard)p Fu(,)555 1444 y Ft(emacs-meta)p Fu(,)49 b Ft(emacs-ctlx)p Fu(,)g Ft(vi)p Fu(,)h Ft(vi-move)p Fu(,)f Ft(vi-command)p Fu(,)g(and)555 1499 y Ft(vi-insert)p Fu(.)31 b Ft(vi)20 b Fu(is)g(equiv)m(alen)o(t)h(to)e Ft(vi-command)p Fu(;)g Ft(emacs)g Fu(is)h(equiv)m(alen)o(t)555 1554 y(to)15 b Ft(emacs-standard)p Fu(.)315 1635 y Ft(-l)192 b Fu(List)16 b(the)f(names)g(of)g(all)h(Readline)h(functions.)315 1716 y Ft(-p)192 b Fu(Displa)o(y)17 b(Readline)h(function)f(names)f (and)h(bindings)h(in)f(suc)o(h)g(a)f(w)o(a)o(y)g(that)555 1771 y(they)f(can)h(b)q(e)f(used)h(as)f(input)h(or)f(in)h(a)f(Readline) h(initialization)j(\014le.)315 1853 y Ft(-P)192 b Fu(List)16 b(curren)o(t)f(Readline)h(function)g(names)g(and)f(bindings.)315 1934 y Ft(-v)192 b Fu(Displa)o(y)12 b(Readline)i(v)m(ariable)f(names)f (and)g(v)m(alues)h(in)g(suc)o(h)f(a)g(w)o(a)o(y)f(that)g(they)555 1989 y(can)k(b)q(e)h(used)g(as)f(input)h(or)f(in)h(a)f(Readline)h (initialization)i(\014le.)315 2070 y Ft(-V)192 b Fu(List)16 b(curren)o(t)f(Readline)h(v)m(ariable)h(names)e(and)g(v)m(alues.)315 2152 y Ft(-s)192 b Fu(Displa)o(y)19 b(Readline)h(k)o(ey)f(sequences)h (b)q(ound)f(to)f(macros)g(and)h(the)g(strings)555 2207 y(they)e(output)g(in)g(suc)o(h)g(a)g(w)o(a)o(y)f(that)g(they)h(can)g(b) q(e)g(used)h(as)e(input)i(or)f(in)g(a)555 2261 y(Readline)g (initialization)h(\014le.)315 2343 y Ft(-S)192 b Fu(Displa)o(y)19 b(Readline)h(k)o(ey)f(sequences)h(b)q(ound)f(to)f(macros)g(and)h(the)g (strings)555 2398 y(they)c(output.)315 2479 y Ft(-f)g Fo(\014lename)555 2534 y Fu(Read)g(k)o(ey)g(bindings)i(from)d Fo(\014lename)p Fu(.)315 2615 y Ft(-q)h Fo(function)555 2670 y Fu(Query)h(ab)q(out)f(whic)o(h)h(k)o(eys)f(in)o(v)o(ok)o(e)g (the)g(named)h Fo(function)p Fu(.)p eop %%Page: 38 40 38 39 bop 75 -58 a Fu(38)1285 b(Bash)15 b(Reference)h(Man)o(ual)315 149 y Ft(-u)f Fo(function)555 204 y Fu(Un)o(bind)i(all)f(k)o(eys)f(b)q (ound)h(to)e(the)i(named)f Fo(function)p Fu(.)315 285 y Ft(-r)g Fo(k)o(eyseq)48 b Fu(Remo)o(v)o(e)14 b(an)o(y)h(curren)o(t)g (binding)i(for)e Fo(k)o(eyseq)p Fu(.)315 366 y Ft(-x)g Fo(k)o(eyseq:shell-command)555 421 y Fu(Cause)g Fo(shell-command)k Fu(to)14 b(b)q(e)i(executed)g(whenev)o(er)g Fo(k)o(eyseq)g Fu(is)g(en)o(tered.)315 501 y(The)d(return)h(status)e(is)i(zero)f (unless)h(an)f(in)o(v)m(alid)j(option)d(is)h(supplied)i(or)c(an)h (error)g(o)q(ccurs.)75 582 y Ft(builtin)435 647 y(builtin)23 b([)p Fo(shell-builti)q(n)k Ft([)p Fo(args)r Ft(]])315 715 y Fu(Run)18 b(a)g(shell)i(builtin,)g(passing)f(it)f Fo(args)p Fu(,)g(and)g(return)h(its)f(exit)h(status.)27 b(This)19 b(is)g(useful)315 769 y(when)d(de\014ning)g(a)f(shell)i (function)f(with)f(the)h(same)f(name)g(as)f(a)h(shell)i(builtin,)g (retaining)315 824 y(the)g(functionalit)o(y)h(of)e(the)h(builtin)i (within)f(the)f(function.)26 b(The)17 b(return)f(status)g(is)i(non-)315 879 y(zero)d(if)h Fo(shell-builti)q(n)i Fu(is)e(not)f(a)f(shell)j (builtin)h(command.)75 960 y Ft(command)435 1025 y(command)23 b([-pVv])g Fo(command)j Ft([)p Fo(argumen)o(ts)e Ft(...])315 1092 y Fu(Runs)16 b Fo(command)j Fu(with)d Fo(argumen)o(ts)i Fu(ignoring)f(an)o(y)f(shell)i(function)g(named)e Fo(command)p Fu(.)315 1147 y(Only)21 b(shell)h(builtin)g(commands)e(or)f(commands)h (found)g(b)o(y)g(searc)o(hing)h(the)f Ft(PATH)f Fu(are)315 1202 y(executed.)h(If)12 b(there)f(is)i(a)e(shell)i(function)g(named)f Ft(ls)p Fu(,)f(running)i(`)p Ft(command)h(ls)p Fu(')d(within)i(the)315 1257 y(function)k(will)i(execute)e(the)g(external)g(command)f Ft(ls)h Fu(instead)g(of)f(calling)i(the)f(function)315 1312 y(recursiv)o(ely)l(.)43 b(The)22 b(`)p Ft(-p)p Fu(')f(option)i (means)f(to)g(use)g(a)g(default)h(v)m(alue)h(for)d Ft(PATH)h Fu(that)f(is)315 1366 y(guaran)o(teed)16 b(to)h(\014nd)g(all)h(of)e (the)h(standard)g(utilities.)27 b(The)17 b(return)g(status)f(in)i(this) f(case)315 1421 y(is)e(127)e(if)i Fo(command)h Fu(cannot)e(b)q(e)h (found)f(or)g(an)g(error)g(o)q(ccurred,)h(and)f(the)g(exit)h(status)e (of)315 1476 y Fo(command)k Fu(otherwise.)315 1544 y(If)c(either)g(the) g(`)p Ft(-V)p Fu(')e(or)h(`)p Ft(-v)p Fu(')g(option)h(is)g(supplied,)i (a)d(description)i(of)e Fo(command)i Fu(is)g(prin)o(ted.)315 1599 y(The)g(`)p Ft(-v)p Fu(')f(option)h(causes)h(a)e(single)j(w)o(ord) d(indicating)j(the)e(command)g(or)f(\014le)i(name)f(used)315 1653 y(to)j(in)o(v)o(ok)o(e)g Fo(command)i Fu(to)e(b)q(e)h(displa)o(y)o (ed;)i(the)d(`)p Ft(-V)p Fu(')g(option)g(pro)q(duces)i(a)e(more)g(v)o (erb)q(ose)315 1708 y(description.)31 b(In)20 b(this)f(case,)g(the)f (return)h(status)f(is)h(zero)f(if)h Fo(command)h Fu(is)f(found,)h(and) 315 1763 y(non-zero)15 b(if)h(not.)75 1844 y Ft(declare)435 1909 y(declare)23 b([-afFrxi])g([-p])g([)p Fo(name)s Ft([=)p Fo(v)m(alue)s Ft(]])315 1976 y Fu(Declare)14 b(v)m(ariables)h(and)f(giv)o(e)g(them)f(attributes.)19 b(If)14 b(no)g Fo(name)s Fu(s)f(are)g(giv)o(en,)h(then)g(displa)o(y)315 2031 y(the)h(v)m(alues)i(of)d(v)m(ariables)j(instead.)315 2099 y(The)d(`)p Ft(-p)p Fu(')f(option)i(will)g(displa)o(y)h(the)e (attributes)g(and)g(v)m(alues)h(of)f(eac)o(h)g Fo(name)p Fu(.)20 b(When)14 b(`)p Ft(-p)p Fu(')315 2154 y(is)j(used,)f (additional)i(options)e(are)f(ignored.)23 b(The)17 b(`)p Ft(-F)p Fu(')e(option)h(inhibits)i(the)e(displa)o(y)h(of)315 2209 y(function)j(de\014nitions;)i(only)e(the)f(function)h(name)f(and)h (attributes)f(are)g(prin)o(ted.)32 b(`)p Ft(-F)p Fu(')315 2263 y(implies)18 b(`)p Ft(-f)p Fu('.)23 b(The)16 b(follo)o(wing)h (options)g(can)f(b)q(e)h(used)g(to)f(restrict)g(output)g(to)g(v)m (ariables)315 2318 y(with)g(the)f(sp)q(eci\014ed)i(attributes)e(or)g (to)f(giv)o(e)i(v)m(ariables)g(attributes:)315 2399 y Ft(-a)192 b Fu(Eac)o(h)14 b Fo(name)k Fu(is)d(an)f(arra)o(y)g(v)m (ariable)h(\(see)g(Section)h(6.7)d([Arra)o(ys],)g(page)h(68\).)315 2480 y Ft(-f)192 b Fu(Use)15 b(function)h(names)g(only)l(.)315 2560 y Ft(-i)192 b Fu(The)18 b(v)m(ariable)i(is)f(to)e(b)q(e)i(treated) f(as)f(an)h(in)o(teger;)i(arithmetic)f(ev)m(aluation)555 2615 y(\(see)14 b(Section)h(6.5)e([Shell)i(Arithmetic],)f(page)g(66\))f (is)h(p)q(erformed)h(when)f(the)555 2670 y(v)m(ariable)j(is)e(assigned) h(a)f(v)m(alue.)p eop %%Page: 39 41 39 40 bop 75 -58 a Fu(Chapter)15 b(4:)k(Shell)f(Builtin)f(Commands)1035 b(39)315 149 y Ft(-r)192 b Fu(Mak)o(e)11 b Fo(name)s Fu(s)g(readonly)l(.)20 b(These)12 b(names)f(cannot)h(then)g(b)q(e)g (assigned)h(v)m(alues)555 204 y(b)o(y)i(subsequen)o(t)h(assignmen)o(t)f (statemen)o(ts)f(or)h(unset.)315 284 y Ft(-x)192 b Fu(Mark)14 b(eac)o(h)h Fo(name)i Fu(for)e(exp)q(ort)f(to)h(subsequen)o(t)g (commands)g(via)g(the)g(en)o(vi-)555 339 y(ronmen)o(t.)315 419 y(Using)e(`)p Ft(+)p Fu(')f(instead)h(of)f(`)p Ft(-)p Fu(')f(turns)i(o\013)e(the)i(attribute)f(instead.)20 b(When)13 b(used)g(in)g(a)f(function,)315 474 y Ft(declare)i Fu(mak)o(es)h(eac)o(h)g Fo(name)j Fu(lo)q(cal,)e(as)f(with)g(the)g Ft(local)g Fu(command.)315 541 y(The)j(return)g(status)f(is)h(zero)g (unless)g(an)g(in)o(v)m(alid)i(option)e(is)g(encoun)o(tered,)h(an)f (attempt)315 596 y(is)e(made)g(to)g(de\014ne)h(a)e(function)i(using)g (`)p Ft(-f)d(foo=bar)p Fu(',)g(an)i(attempt)f(is)i(made)f(to)f(assign) 315 651 y(a)21 b(v)m(alue)h(to)e(a)h(readonly)h(v)m(ariable,)h(an)e (attempt)f(is)i(made)f(to)f(assign)i(a)e(v)m(alue)j(to)d(an)315 706 y(arra)o(y)13 b(v)m(ariable)k(without)d(using)i(the)f(comp)q(ound)g (assignmen)o(t)g(syn)o(tax)f(\(see)g(Section)i(6.7)315 760 y([Arra)o(ys],)21 b(page)g(68\),)h(one)g(of)f(the)g Fo(names)i Fu(is)f(not)f(a)g(v)m(alid)j(shell)f(v)m(ariable)f(name,)h (an)315 815 y(attempt)13 b(is)h(made)f(to)g(turn)h(o\013)e(readonly)j (status)d(for)h(a)g(readonly)i(v)m(ariable,)f(an)g(attempt)315 870 y(is)h(made)f(to)f(turn)h(o\013)g(arra)o(y)f(status)g(for)g(an)i (arra)o(y)d(v)m(ariable,)k(or)d(an)i(attempt)e(is)h(made)h(to)315 925 y(displa)o(y)h(a)f(non-existen)o(t)h(function)g(with)g(`)p Ft(-f)p Fu('.)75 1005 y Ft(echo)435 1069 y(echo)23 b([-neE])g([)p Fo(arg)k Ft(...])315 1137 y Fu(Output)17 b(the)f Fo(arg)t Fu(s,)f(separated)h(b)o(y)g(spaces,)h(terminated)f(with)h(a)f(newline.) 25 b(The)16 b(return)315 1192 y(status)e(is)i(alw)o(a)o(ys)f(0.)20 b(If)15 b(`)p Ft(-n)p Fu(')f(is)i(sp)q(eci\014ed,)h(the)f(trailing)g (newline)h(is)f(suppressed.)21 b(If)16 b(the)315 1246 y(`)p Ft(-e)p Fu(')11 b(option)h(is)g(giv)o(en,)h(in)o(terpretation)f (of)f(the)h(follo)o(wing)g(bac)o(kslash-escap)q(ed)i(c)o(haracters)315 1301 y(is)j(enabled.)25 b(The)17 b(`)p Ft(-E)p Fu(')e(option)h (disables)i(the)f(in)o(terpretation)f(of)g(these)h(escap)q(e)g(c)o (harac-)315 1356 y(ters,)j(ev)o(en)g(on)g(systems)g(where)g(they)g(are) f(in)o(terpreted)i(b)o(y)f(default.)34 b(The)20 b Ft(xpg_echo)315 1411 y Fu(shell)h(option)e(ma)o(y)f(b)q(e)i(used)g(to)e(dynamically)j (determine)g(whether)e(or)f(not)h Ft(echo)g Fu(ex-)315 1465 y(pands)d(these)g(escap)q(e)g(c)o(haracters)f(b)o(y)g(default.)22 b Ft(echo)15 b Fu(in)o(terprets)g(the)h(follo)o(wing)g(escap)q(e)315 1520 y(sequences:)315 1600 y Ft(\\a)192 b Fu(alert)15 b(\(b)q(ell\))315 1680 y Ft(\\b)192 b Fu(bac)o(kspace)315 1760 y Ft(\\c)g Fu(suppress)16 b(trailing)g(newline)315 1840 y Ft(\\e)192 b Fu(escap)q(e)315 1920 y Ft(\\f)g Fu(form)14 b(feed)315 2000 y Ft(\\n)192 b Fu(new)15 b(line)315 2080 y Ft(\\r)192 b Fu(carriage)15 b(return)315 2160 y Ft(\\t)192 b Fu(horizon)o(tal)16 b(tab)315 2240 y Ft(\\v)192 b Fu(v)o(ertical)16 b(tab)315 2320 y Ft(\\\\)192 b Fu(bac)o(kslash)315 2400 y Ft(\\)p Fo(nnn)141 b Fu(the)17 b(eigh)o(t-bit)h(c)o(haracter)f (whose)g(v)m(alue)i(is)e(the)h(o)q(ctal)f(v)m(alue)i Fo(nnn)f Fu(\(one)f(to)555 2455 y(three)e(digits\))315 2535 y Ft(\\x)p Fo(HH)124 b Fu(the)20 b(eigh)o(t-bit)g(c)o(haracter)f (whose)h(v)m(alue)h(is)f(the)g(hexadecimal)h(v)m(alue)g Fo(HH)555 2590 y Fu(\(one)15 b(or)g(t)o(w)o(o)f(hex)h(digits\))75 2670 y Ft(enable)p eop %%Page: 40 42 40 41 bop 75 -58 a Fu(40)1285 b(Bash)15 b(Reference)h(Man)o(ual)435 149 y Ft(enable)23 b([-n])g([-p])h([-f)f Fo(\014lename)s Ft(])i([-ads])e([)p Fo(name)j Ft(...])315 215 y Fu(Enable)19 b(and)f(disable)i(builtin)g(shell)f(commands.)28 b(Disabling)20 b(a)d(builtin)j(allo)o(ws)f(a)e(disk)315 270 y(command)g(whic)o(h)h (has)f(the)g(same)g(name)g(as)g(a)g(shell)h(builtin)i(to)c(b)q(e)i (executed)g(without)315 325 y(sp)q(ecifying)d(a)f(full)g(pathname,)g (ev)o(en)g(though)f(the)g(shell)i(normally)g(searc)o(hes)e(for)g (builtins)315 380 y(b)q(efore)j(disk)h(commands.)22 b(If)17 b(`)p Ft(-n)p Fu(')e(is)h(used,)h(the)f Fo(name)s Fu(s)f(b)q(ecome)i (disabled.)24 b(Otherwise)315 434 y Fo(name)s Fu(s)e(are)f(enabled.)43 b(F)l(or)21 b(example,)j(to)e(use)g(the)h Ft(test)e Fu(binary)i(found)f (via)h Ft($PATH)315 489 y Fu(instead)16 b(of)f(the)g(shell)i(builtin)g (v)o(ersion,)e(t)o(yp)q(e)g(`)p Ft(enable)f(-n)h(test)p Fu('.)315 555 y(If)21 b(the)h(`)p Ft(-p)p Fu(')e(option)h(is)h (supplied,)j(or)c(no)g Fo(name)j Fu(argumen)o(ts)c(app)q(ear,)j(a)d (list)j(of)d(shell)315 610 y(builtins)h(is)f(prin)o(ted.)31 b(With)19 b(no)g(other)g(argumen)o(ts,)f(the)h(list)h(consists)f(of)g (all)g(enabled)315 665 y(shell)f(builtins.)25 b(The)17 b(`)p Ft(-a)p Fu(')e(option)h(means)h(to)e(list)i(eac)o(h)g(builtin)h (with)f(an)f(indication)i(of)315 719 y(whether)d(or)g(not)g(it)g(is)h (enabled.)315 785 y(The)k(`)p Ft(-f)p Fu(')f(option)i(means)f(to)f (load)h(the)g(new)h(builtin)h(command)e Fo(name)j Fu(from)c(shared)315 840 y(ob)s(ject)12 b Fo(\014lename)p Fu(,)j(on)e(systems)f(that)h(supp) q(ort)g(dynamic)h(loading.)20 b(The)13 b(`)p Ft(-d)p Fu(')f(option)h(will)315 895 y(delete)j(a)f(builtin)j(loaded)e(with)f (`)p Ft(-f)p Fu('.)315 961 y(If)h(there)f(are)h(no)f(options,)g(a)h (list)g(of)f(the)h(shell)h(builtins)g(is)f(displa)o(y)o(ed.)23 b(The)15 b(`)p Ft(-s)p Fu(')g(option)315 1015 y(restricts)f Ft(enable)f Fu(to)h(the)g Fp(posix)g Fu(sp)q(ecial)i(builtins.)22 b(If)14 b(`)p Ft(-s)p Fu(')f(is)i(used)g(with)f(`)p Ft(-f)p Fu(',)f(the)i(new)315 1070 y(builtin)i(b)q(ecomes)f(a)f(sp)q(ecial)i (builtin)h(\(see)d(Section)h(4.4)e([Sp)q(ecial)j(Builtins],)g(page)e (49\).)315 1136 y(The)e(return)g(status)f(is)i(zero)f(unless)h(a)f Fo(name)j Fu(is)d(not)g(a)f(shell)j(builtin)g(or)e(there)g(is)h(an)f (error)315 1191 y(loading)j(a)f(new)g(builtin)j(from)c(a)h(shared)h(ob) s(ject.)75 1267 y Ft(help)435 1330 y(help)23 b([-s])h([)p Fo(pattern)p Ft(])315 1396 y Fu(Displa)o(y)c(helpful)i(information)d (ab)q(out)g(builtin)j(commands.)33 b(If)19 b Fo(pattern)g Fu(is)h(sp)q(eci\014ed,)315 1451 y Ft(help)14 b Fu(giv)o(es)g(detailed) i(help)g(on)f(all)g(commands)f(matc)o(hing)h Fo(pattern)p Fu(,)e(otherwise)i(a)f(list)h(of)315 1506 y(the)j(builtins)i(is)e(prin) o(ted.)29 b(The)18 b(`)p Ft(-s)p Fu(')f(option)h(restricts)g(the)f (information)h(displa)o(y)o(ed)i(to)315 1561 y(a)c(short)f(usage)h (synopsis.)23 b(The)16 b(return)g(status)f(is)i(zero)e(unless)j(no)e (command)f(matc)o(hes)315 1615 y Fo(pattern)p Fu(.)75 1692 y Ft(let)435 1755 y(let)23 b Fo(expression)i Ft([)p Fo(expression)p Ft(])315 1821 y Fu(The)c Ft(let)f Fu(builtin)j(allo)o (ws)e(arithmetic)h(to)e(b)q(e)h(p)q(erformed)g(on)g(shell)h(v)m (ariables.)38 b(Eac)o(h)315 1876 y Fo(expression)16 b Fu(is)g(ev)m(aluated)h(according)f(to)f(the)g(rules)h(giv)o(en)g(b)q (elo)o(w)g(in)h(Section)f(6.5)e([Shell)315 1930 y(Arithmetic],)25 b(page)d(66.)42 b(If)23 b(the)g(last)g Fo(expression)g Fu(ev)m(aluates)h(to)e(0,)i Ft(let)e Fu(returns)h(1;)315 1985 y(otherwise)15 b(0)g(is)h(returned.)75 2062 y Ft(local)435 2125 y(local)23 b([)p Fo(option)p Ft(])h Fo(name)s Ft([=)p Fo(v)m(alue)s Ft(])315 2191 y Fu(F)l(or)12 b(eac)o(h)h(argumen)o(t,)f (a)h(lo)q(cal)h(v)m(ariable)g(named)g Fo(name)h Fu(is)e(created,)g(and) h(assigned)f Fo(v)m(alue)p Fu(.)315 2245 y(The)19 b Fo(option)g Fu(can)g(b)q(e)g(an)o(y)f(of)h(the)f(options)h(accepted)h(b)o(y)e Ft(declare)p Fu(.)30 b Ft(local)18 b Fu(can)g(only)315 2300 y(b)q(e)k(used)f(within)i(a)d(function;)25 b(it)c(mak)o(es)g(the)g (v)m(ariable)h Fo(name)i Fu(ha)o(v)o(e)c(a)h(visible)i(scop)q(e)315 2355 y(restricted)c(to)g(that)f(function)i(and)g(its)f(c)o(hildren.)33 b(The)20 b(return)f(status)f(is)i(zero)f(unless)315 2410 y Ft(local)g Fu(is)i(used)g(outside)g(a)e(function,)j(an)e(in)o(v)m (alid)j Fo(name)f Fu(is)f(supplied,)i(or)d Fo(name)j Fu(is)d(a)315 2465 y(readonly)c(v)m(ariable.)75 2541 y Ft(logout)435 2604 y(logout)23 b([)p Fo(n)p Ft(])315 2670 y Fu(Exit)15 b(a)g(login)h(shell,)h(returning)f(a)e(status)h(of)g Fo(n)g Fu(to)f(the)i(shell's)g(paren)o(t.)p eop %%Page: 41 43 41 42 bop 75 -58 a Fu(Chapter)15 b(4:)k(Shell)f(Builtin)f(Commands)1035 b(41)75 149 y Ft(printf)435 210 y(printf)23 b Fo(format)h Ft([)p Fo(argumen)o(ts)r Ft(])315 274 y Fu(W)l(rite)13 b(the)g(formatted)f Fo(argumen)o(ts)i Fu(to)e(the)h(standard)g(output)g (under)h(the)f(con)o(trol)f(of)h(the)315 329 y Fo(format)p Fu(.)18 b(The)d Fo(format)f Fu(is)h(a)f(c)o(haracter)g(string)g(whic)o (h)h(con)o(tains)g(three)g(t)o(yp)q(es)f(of)g(ob)s(jects:)315 384 y(plain)i(c)o(haracters,)d(whic)o(h)i(are)f(simply)i(copied)f(to)f (standard)g(output,)g(c)o(haracter)f(escap)q(e)315 439 y(sequences,)i(whic)o(h)h(are)e(con)o(v)o(erted)g(and)h(copied)h(to)e (the)g(standard)g(output,)h(and)f(format)315 494 y(sp)q (eci\014cations,)20 b(eac)o(h)f(of)e(whic)o(h)i(causes)g(prin)o(ting)g (of)e(the)i(next)f(successiv)o(e)h Fo(argumen)o(t)p Fu(.)315 548 y(In)e(addition)g(to)e(the)h(standard)f Ft(printf\(1\))g Fu(formats,)f(`)p Ft(\045b)p Fu(')h(causes)h Ft(printf)f Fu(to)g(expand)315 603 y(bac)o(kslash)23 b(escap)q(e)g(sequences)h(in)f (the)g(corresp)q(onding)g Fo(argumen)o(t)p Fu(,)h(and)e(`)p Ft(\045q)p Fu(')g(causes)315 658 y Ft(printf)15 b Fu(to)h(output)g(the) h(corresp)q(onding)g Fo(argumen)o(t)f Fu(in)h(a)f(format)f(that)h(can)g (b)q(e)h(reused)315 713 y(as)e(shell)i(input.)315 777 y(The)f Fo(format)f Fu(is)h(reused)h(as)e(necessary)h(to)f(consume)h (all)g(of)g(the)f Fo(argumen)o(ts)p Fu(.)21 b(If)16 b(the)f Fo(for-)315 831 y(mat)e Fu(requires)h(more)e Fo(argumen)o(ts)i Fu(than)f(are)g(supplied,)i(the)e(extra)g(format)e(sp)q(eci\014cations) 315 886 y(b)q(eha)o(v)o(e)k(as)e(if)i(a)f(zero)g(v)m(alue)i(or)d(n)o (ull)j(string,)e(as)g(appropriate,)g(had)g(b)q(een)i(supplied.)22 b(The)315 941 y(return)15 b(v)m(alue)i(is)e(zero)g(on)g(success,)h (non-zero)f(on)h(failure.)75 1014 y Ft(read)435 1075 y(read)23 b([-ers])g([-a)h Fo(aname)s Ft(])f([-p)g Fo(prompt)q Ft(])h([-t)f Fo(timeout)q Ft(])h([-n)f Fo(nc)o(hars)r Ft(])h([-d)f Fo(de-)435 1127 y(lim)p Ft(])i([)p Fo(name)h Ft(...])315 1191 y Fu(One)c(line)g(is)g(read)f(from)f(the)h(standard)g (input,)i(and)e(the)g(\014rst)g(w)o(ord)f(is)i(assigned)g(to)315 1246 y(the)17 b(\014rst)g Fo(name)p Fu(,)h(the)f(second)h(w)o(ord)f(to) g(the)g(second)h Fo(name)p Fu(,)g(and)f(so)g(on,)h(with)f(lefto)o(v)o (er)315 1300 y(w)o(ords)f(and)g(their)h(in)o(terv)o(ening)h(separators) d(assigned)i(to)f(the)g(last)g Fo(name)p Fu(.)24 b(If)17 b(there)f(are)315 1355 y(few)o(er)c(w)o(ords)f(read)h(from)g(the)g (standard)g(input)h(than)f(names,)h(the)f(remaining)h(names)f(are)315 1410 y(assigned)i(empt)o(y)f(v)m(alues.)21 b(The)13 b(c)o(haracters)g (in)h(the)f(v)m(alue)i(of)e(the)h Ft(IFS)e Fu(v)m(ariable)j(are)e(used) 315 1465 y(to)g(split)i(the)f(line)h(in)o(to)f(w)o(ords.)k(The)c(bac)o (kslash)g(c)o(haracter)f(`)p Ft(\\)p Fu(')g(ma)o(y)g(b)q(e)h(used)h(to) e(remo)o(v)o(e)315 1520 y(an)o(y)g(sp)q(ecial)i(meaning)f(for)f(the)g (next)h(c)o(haracter)e(read)i(and)f(for)g(line)i(con)o(tin)o(uation.)k (If)14 b(no)315 1574 y(names)g(are)g(supplied,)i(the)f(line)h(read)e (is)g(assigned)h(to)f(the)g(v)m(ariable)i Ft(REPLY)p Fu(.)j(The)14 b(return)315 1629 y(co)q(de)20 b(is)g(zero,)f(unless)i (end-of-\014le)g(is)e(encoun)o(tered)h(or)f Ft(read)g Fu(times)g(out.)32 b(Options,)20 b(if)315 1684 y(supplied,)d(ha)o(v)o (e)e(the)g(follo)o(wing)h(meanings:)315 1757 y Ft(-a)f Fo(aname)48 b Fu(The)17 b(w)o(ords)g(are)f(assigned)i(to)f(sequen)o (tial)h(indices)h(of)e(the)g(arra)o(y)f(v)m(ariable)555 1812 y Fo(aname)p Fu(,)e(starting)f(at)h(0.)19 b(All)c(elemen)o(ts)g (are)f(remo)o(v)o(ed)g(from)f Fo(aname)k Fu(b)q(efore)555 1867 y(the)e(assignmen)o(t.)20 b(Other)15 b Fo(name)j Fu(argumen)o(ts)d(are)f(ignored.)315 1940 y Ft(-d)h Fo(delim)70 b Fu(The)21 b(\014rst)g(c)o(haracter)f(of)h Fo(delim)h Fu(is)g(used)f(to)g(terminate)g(the)g(input)h(line,)555 1994 y(rather)15 b(than)g(newline.)315 2067 y Ft(-e)192 b Fu(Readline)15 b(\(see)f(Chapter)f(8)h([Command)f(Line)i(Editing],)f (page)g(79\))f(is)h(used)555 2122 y(to)h(obtain)g(the)g(line.)315 2195 y Ft(-n)g Fo(nc)o(hars)49 b Ft(read)19 b Fu(returns)g(after)g (reading)h Fo(nc)o(hars)h Fu(c)o(haracters)e(rather)f(than)i(w)o (aiting)555 2250 y(for)15 b(a)f(complete)i(line)h(of)e(input.)315 2323 y Ft(-p)g Fo(prompt)555 2378 y Fu(Displa)o(y)k Fo(prompt)p Fu(,)f(without)h(a)f(trailing)h(newline,)i(b)q(efore)e(attempting)f(to) 555 2433 y(read)h(an)o(y)f(input.)31 b(The)19 b(prompt)f(is)h(displa)o (y)o(ed)h(only)g(if)f(input)g(is)h(coming)555 2487 y(from)14 b(a)h(terminal.)315 2560 y Ft(-r)192 b Fu(If)11 b(this)g(option)g(is)h (giv)o(en,)f(bac)o(kslash)h(do)q(es)f(not)f(act)g(as)h(an)g(escap)q(e)g (c)o(haracter.)555 2615 y(The)16 b(bac)o(kslash)g(is)g(considered)g(to) f(b)q(e)h(part)f(of)g(the)h(line.)22 b(In)16 b(particular,)g(a)555 2670 y(bac)o(kslash-newline)i(pair)d(ma)o(y)g(not)g(b)q(e)g(used)h(as)f (a)g(line)i(con)o(tin)o(uation.)p eop %%Page: 42 44 42 43 bop 75 -58 a Fu(42)1285 b(Bash)15 b(Reference)h(Man)o(ual)315 149 y Ft(-s)192 b Fu(Silen)o(t)15 b(mo)q(de.)20 b(If)14 b(input)h(is)f(coming)g(from)f(a)g(terminal,)i(c)o(haracters)e(are)g (not)555 204 y(ec)o(ho)q(ed.)315 286 y Ft(-t)i Fo(timeout)555 340 y Fu(Cause)21 b Ft(read)g Fu(to)g(time)g(out)g(and)h(return)f (failure)i(if)e(a)g(complete)h(line)h(of)555 395 y(input)15 b(is)f(not)f(read)g(within)i Fo(timeout)g Fu(seconds.)k(This)c(option)e (has)h(no)f(e\013ect)555 450 y(if)j Ft(read)e Fu(is)i(not)f(reading)h (input)g(from)e(the)h(terminal)h(or)f(a)g(pip)q(e.)75 531 y Ft(shopt)435 596 y(shopt)23 b([-pqsu])g([-o])g([)p Fo(optname)j Ft(...])315 664 y Fu(T)l(oggle)c(the)h(v)m(alues)g(of)f(v) m(ariables)i(con)o(trolling)f(optional)g(shell)h(b)q(eha)o(vior.)41 b(With)23 b(no)315 719 y(options,)15 b(or)h(with)f(the)h(`)p Ft(-p)p Fu(')f(option,)g(a)g(list)i(of)e(all)h(settable)g(options)g(is) g(displa)o(y)o(ed,)h(with)315 774 y(an)g(indication)i(of)e(whether)h (or)f(not)g(eac)o(h)g(is)h(set.)26 b(The)17 b(`)p Ft(-p)p Fu(')f(option)i(causes)f(output)h(to)315 829 y(b)q(e)h(displa)o(y)o(ed) g(in)g(a)f(form)f(that)h(ma)o(y)f(b)q(e)i(reused)g(as)f(input.)29 b(Other)19 b(options)f(ha)o(v)o(e)g(the)315 884 y(follo)o(wing)e (meanings:)315 965 y Ft(-s)192 b Fu(Enable)16 b(\(set\))e(eac)o(h)i Fo(optname)p Fu(.)315 1046 y Ft(-u)192 b Fu(Disable)16 b(\(unset\))f(eac)o(h)g Fo(optname)p Fu(.)315 1128 y Ft(-q)192 b Fu(Suppresses)16 b(normal)f(output;)f(the)h(return)g (status)f(indicates)i(whether)f(the)555 1182 y Fo(optname)j Fu(is)e(set)f(or)h(unset.)21 b(If)16 b(m)o(ultiple)h Fo(optname)h Fu(argumen)o(ts)d(are)g(giv)o(en)555 1237 y(with)22 b(`)p Ft(-q)p Fu(',)f(the)h(return)f(status)g(is)h(zero)f(if) h(all)h Fo(optnames)g Fu(are)e(enabled;)555 1292 y(non-zero)15 b(otherwise.)315 1373 y Ft(-o)192 b Fu(Restricts)20 b(the)h(v)m(alues)h (of)e Fo(optname)j Fu(to)d(b)q(e)i(those)e(de\014ned)i(for)e(the)h(`)p Ft(-o)p Fu(')555 1428 y(option)11 b(to)e(the)i Ft(set)f Fu(builtin)i(\(see)f(Section)g(4.3)e([The)i(Set)f(Builtin],)j(page)d (46\).)315 1509 y(If)15 b(either)h(`)p Ft(-s)p Fu(')e(or)g(`)p Ft(-u)p Fu(')g(is)i(used)f(with)h(no)f Fo(optname)i Fu(argumen)o(ts,)c (the)j(displa)o(y)g(is)f(limited)315 1564 y(to)g(those)f(options)i (whic)o(h)g(are)f(set)g(or)f(unset,)i(resp)q(ectiv)o(ely)l(.)315 1632 y(Unless)g(otherwise)g(noted,)e(the)i Ft(shopt)e Fu(options)i(are)e(disabled)j(\(o\013)t(\))d(b)o(y)h(default.)315 1700 y(The)f(return)g(status)f(when)h(listing)h(options)f(is)g(zero)g (if)g(all)h Fo(optnames)g Fu(are)e(enabled,)j(non-)315 1755 y(zero)j(otherwise.)33 b(When)20 b(setting)f(or)g(unsetting)h (options,)h(the)e(return)h(status)e(is)i(zero)315 1810 y(unless)c(an)f Fo(optname)j Fu(is)e(not)e(a)h(v)m(alid)i(shell)g (option.)315 1878 y(The)e(list)h(of)f Ft(shopt)g Fu(options)g(is:)315 1959 y Ft(cdable_vars)555 2014 y Fu(If)j(this)g(is)g(set,)f(an)g (argumen)o(t)g(to)g(the)g Ft(cd)h Fu(builtin)h(command)f(that)e(is)i (not)555 2069 y(a)d(directory)h(is)f(assumed)h(to)e(b)q(e)i(the)g(name) f(of)g(a)g(v)m(ariable)i(whose)e(v)m(alue)h(is)555 2124 y(the)f(directory)h(to)e(c)o(hange)i(to.)315 2205 y Ft(cdspell)72 b Fu(If)14 b(set,)f(minor)h(errors)f(in)h(the)g(sp)q(elling)i(of)d(a)g (directory)h(comp)q(onen)o(t)g(in)g(a)f Ft(cd)555 2260 y Fu(command)i(will)i(b)q(e)f(corrected.)k(The)c(errors)f(c)o(hec)o(k)o (ed)g(for)g(are)g(transp)q(osed)555 2315 y(c)o(haracters,)21 b(a)f(missing)i(c)o(haracter,)f(and)g(a)g(c)o(haracter)f(to)q(o)g(man)o (y)l(.)36 b(If)21 b(a)555 2369 y(correction)12 b(is)g(found,)g(the)g (corrected)f(path)h(is)g(prin)o(ted,)h(and)e(the)h(command)555 2424 y(pro)q(ceeds.)21 b(This)15 b(option)h(is)g(only)f(used)h(b)o(y)f (in)o(teractiv)o(e)h(shells.)315 2506 y Ft(checkhash)555 2560 y Fu(If)f(this)g(is)h(set,)e(Bash)h(c)o(hec)o(ks)g(that)f(a)h (command)g(found)g(in)h(the)f(hash)g(table)555 2615 y(exists)i(b)q (efore)f(trying)h(to)e(execute)i(it.)24 b(If)16 b(a)g(hashed)h(command) f(no)h(longer)555 2670 y(exists,)e(a)g(normal)g(path)g(searc)o(h)g(is)h (p)q(erformed.)p eop %%Page: 43 45 43 44 bop 75 -58 a Fu(Chapter)15 b(4:)k(Shell)f(Builtin)f(Commands)1035 b(43)315 149 y Ft(checkwinsize)555 204 y Fu(If)21 b(set,)g(Bash)g(c)o (hec)o(ks)g(the)g(windo)o(w)g(size)g(after)f(eac)o(h)h(command)g(and,)g (if)555 259 y(necessary)l(,)15 b(up)q(dates)h(the)f(v)m(alues)i(of)d Ft(LINES)h Fu(and)g Ft(COLUMNS)p Fu(.)315 344 y Ft(cmdhist)72 b Fu(If)17 b(set,)g(Bash)g(attempts)f(to)g(sa)o(v)o(e)h(all)h(lines)g (of)f(a)f(m)o(ultiple-li)q(ne)k(command)555 399 y(in)c(the)g(same)f (history)g(en)o(try)l(.)21 b(This)16 b(allo)o(ws)f(easy)g(re-editing)i (of)e(m)o(ulti-line)555 453 y(commands.)315 538 y Ft(dotglob)72 b Fu(If)14 b(set,)g(Bash)g(includes)i(\014lenames)f(b)q(eginning)h (with)e(a)g(`.')k(in)d(the)f(results)g(of)555 593 y(\014lename)i (expansion.)315 677 y Ft(execfail)48 b Fu(If)13 b(this)f(is)h(set,)f(a) g(non-in)o(teractiv)o(e)h(shell)h(will)g(not)e(exit)h(if)g(it)f(cannot) g(execute)555 732 y(the)i(\014le)h(sp)q(eci\014ed)h(as)e(an)g(argumen)o (t)f(to)g(the)i Ft(exec)e Fu(builtin)j(command.)k(An)555 787 y(in)o(teractiv)o(e)c(shell)g(do)q(es)g(not)f(exit)g(if)h Ft(exec)f Fu(fails.)315 872 y Ft(expand_aliases)555 927 y Fu(If)h(set,)g(aliases)h(are)e(expanded)i(as)f(describ)q(ed)i(b)q (elo)o(w)f(under)f(Aliases,)h(Sec-)555 981 y(tion)i(6.6)f([Aliases],)i (page)f(67.)30 b(This)20 b(option)f(is)h(enabled)g(b)o(y)f(default)h (for)555 1036 y(in)o(teractiv)o(e)c(shells.)315 1121 y Ft(extglob)72 b Fu(If)13 b(set,)h(the)f(extended)h(pattern)f(matc)o (hing)g(features)g(describ)q(ed)i(ab)q(o)o(v)o(e)e(\(see)555 1176 y(Section)j(3.5.8.1)d([P)o(attern)h(Matc)o(hing],)g(page)h(21\))f (are)h(enabled.)315 1260 y Ft(histappend)555 1315 y Fu(If)f(set,)g(the) g(history)g(list)h(is)f(app)q(ended)i(to)d(the)h(\014le)h(named)f(b)o (y)g(the)g(v)m(alue)h(of)555 1370 y(the)e Ft(HISTFILE)e Fu(v)m(ariable)j(when)f(the)g(shell)h(exits,)g(rather)e(than)g(o)o(v)o (erwriting)555 1425 y(the)j(\014le.)315 1509 y Ft(histreedit)555 1564 y Fu(If)i(set,)f(and)h(Readline)h(is)f(b)q(eing)h(used,)f(a)f (user)h(is)g(giv)o(en)g(the)g(opp)q(ortunit)o(y)555 1619 y(to)e(re-edit)h(a)f(failed)h(history)f(substitution.)315 1704 y Ft(histverify)555 1758 y Fu(If)j(set,)g(and)f(Readline)i(is)f(b) q(eing)h(used,)g(the)e(results)h(of)g(history)f(substitu-)555 1813 y(tion)i(are)f(not)f(immediately)j(passed)f(to)f(the)g(shell)i (parser.)29 b(Instead,)19 b(the)555 1868 y(resulting)i(line)g(is)f (loaded)h(in)o(to)f(the)g(Readline)h(editing)g(bu\013er,)f(allo)o(wing) 555 1923 y(further)15 b(mo)q(di\014cation.)315 2007 y Ft(hostcomplete)555 2062 y Fu(If)k(set,)h(and)f(Readline)h(is)g(b)q (eing)g(used,)h(Bash)e(will)i(attempt)d(to)g(p)q(erform)555 2117 y(hostname)f(completion)i(when)g(a)e(w)o(ord)g(con)o(taining)i(a)f (`)p Ft(@)p Fu(')f(is)h(b)q(eing)h(com-)555 2172 y(pleted)i(\(see)f (Section)i(8.4.6)c([Commands)h(F)l(or)h(Completion],)h(page)f(94\).)555 2227 y(This)c(option)f(is)h(enabled)h(b)o(y)e(default.)315 2311 y Ft(huponexit)555 2366 y Fu(If)i(set,)f(Bash)g(will)i(send)f Ft(SIGHUP)f Fu(to)g(all)h(jobs)f(when)h(an)f(in)o(teractiv)o(e)h(login) 555 2421 y(shell)g(exits)e(\(see)h(Section)g(3.7.6)d([Signals],)i(page) g(28\).)315 2506 y Ft(interactive_comments)555 2560 y Fu(Allo)o(w)f(a)e(w)o(ord)h(b)q(eginning)i(with)e(`)p Ft(#)p Fu(')f(to)g(cause)i(that)e(w)o(ord)g(and)h(all)h(remain-)555 2615 y(ing)21 b(c)o(haracters)f(on)h(that)f(line)i(to)e(b)q(e)h (ignored)h(in)f(an)g(in)o(teractiv)o(e)g(shell.)555 2670 y(This)16 b(option)f(is)h(enabled)h(b)o(y)e(default.)p eop %%Page: 44 46 44 45 bop 75 -58 a Fu(44)1285 b(Bash)15 b(Reference)h(Man)o(ual)315 149 y Ft(lithist)72 b Fu(If)11 b(enabled,)i(and)f(the)f Ft(cmdhist)f Fu(option)h(is)h(enabled,)g(m)o(ulti-line)i(commands)555 204 y(are)g(sa)o(v)o(ed)f(to)g(the)i(history)e(with)i(em)o(b)q(edded)g (newlines)h(rather)d(than)h(using)555 259 y(semicolon)i(separators)e (where)i(p)q(ossible.)315 332 y Ft(login_shell)555 387 y Fu(The)i(shell)h(sets)f(this)g(option)g(if)g(it)g(is)h(started)e(as)g (a)g(login)i(shell)g(\(see)f(Sec-)555 442 y(tion)c(6.1)g([In)o(v)o (oking)g(Bash],)f(page)i(59\).)j(The)d(v)m(alue)g(ma)o(y)e(not)h(b)q(e) h(c)o(hanged.)315 515 y Ft(mailwarn)48 b Fu(If)18 b(set,)f(and)g(a)g (\014le)h(that)f(Bash)g(is)h(c)o(hec)o(king)g(for)f(mail)h(has)f(b)q (een)h(accessed)555 570 y(since)d(the)f(last)h(time)f(it)g(w)o(as)g(c)o (hec)o(k)o(ed,)g(the)g(message)g Ft("The)h(mail)f(in)h Fo(mail-)555 624 y(\014le)k Ft(has)c(been)f(read")h Fu(is)g(displa)o(y) o(ed.)315 697 y Ft(no_empty_cmd_completion)555 752 y Fu(If)g(set,)g(and)g(Readline)h(is)g(b)q(eing)g(used,)f(Bash)g(will)i (not)e(attempt)f(to)g(searc)o(h)555 807 y(the)f Ft(PATH)f Fu(for)f(p)q(ossible)k(completions)e(when)g(completion)h(is)f (attempted)f(on)555 862 y(an)j(empt)o(y)g(line.)315 935 y Ft(nocaseglob)555 990 y Fu(If)20 b(set,)f(Bash)h(matc)o(hes)f (\014lenames)h(in)g(a)f(case-insensitiv)o(e)j(fashion)d(when)555 1044 y(p)q(erforming)d(\014lename)g(expansion.)315 1117 y Ft(nullglob)48 b Fu(If)12 b(set,)g(Bash)g(allo)o(ws)g(\014lename)h (patterns)e(whic)o(h)h(matc)o(h)g(no)f(\014les)i(to)e(expand)555 1172 y(to)k(a)f(n)o(ull)j(string,)e(rather)f(than)i(themselv)o(es.)315 1245 y Ft(progcomp)48 b Fu(If)13 b(set,)g(the)g(programmable)f (completion)i(facilities)h(\(see)d(Section)i(8.6)e([Pro-)555 1300 y(grammable)17 b(Completion],)g(page)g(98\))f(are)g(enabled.)26 b(This)18 b(option)f(is)g(en-)555 1355 y(abled)f(b)o(y)f(default.)315 1428 y Ft(promptvars)555 1483 y Fu(If)20 b(set,)g(prompt)f(strings)g (undergo)h(v)m(ariable)h(and)e(parameter)g(expansion)555 1538 y(after)10 b(b)q(eing)j(expanded)f(\(see)f(Section)h(6.9)e([Prin)o (ting)h(a)g(Prompt],)f(page)h(70\).)555 1592 y(This)16 b(option)f(is)h(enabled)h(b)o(y)e(default.)315 1665 y Ft(restricted_shell)555 1720 y Fu(The)21 b(shell)h(sets)e(this)h (option)f(if)h(it)g(is)g(started)e(in)j(restricted)e(mo)q(de)h(\(see) 555 1775 y(Section)d(6.10)f([The)g(Restricted)g(Shell],)i(page)f(71\).) 25 b(The)18 b(v)m(alue)h(ma)o(y)d(not)555 1830 y(b)q(e)h(c)o(hanged.)24 b(This)17 b(is)g(not)f(reset)h(when)f(the)h(startup)f(\014les)h(are)f (executed,)555 1885 y(allo)o(wing)j(the)f(startup)f(\014les)i(to)e (disco)o(v)o(er)h(whether)g(or)g(not)f(a)h(shell)h(is)g(re-)555 1939 y(stricted.)315 2012 y Ft(shift_verbose)555 2067 y Fu(If)f(this)h(is)g(set,)f(the)g Ft(shift)f Fu(builtin)k(prin)o(ts)d (an)g(error)g(message)f(when)i(the)555 2122 y(shift)d(coun)o(t)f (exceeds)h(the)f(n)o(um)o(b)q(er)g(of)g(p)q(ositional)i(parameters.)315 2195 y Ft(sourcepath)555 2250 y Fu(If)12 b(set,)f(the)g Ft(source)g Fu(builtin)i(uses)f(the)f(v)m(alue)i(of)e Ft(PATH)g Fu(to)f(\014nd)i(the)g(directory)555 2305 y(con)o(taining)i (the)g(\014le)h(supplied)h(as)d(an)h(argumen)o(t.)k(This)c(option)g(is) g(enabled)555 2359 y(b)o(y)h(default.)315 2433 y Ft(xpg_echo)48 b Fu(If)16 b(set,)f(the)h Ft(echo)f Fu(builtin)j(expands)e(bac)o (kslash-escap)q(e)h(sequences)g(b)o(y)e(de-)555 2487 y(fault.)315 2560 y(The)f(return)g(status)f(when)h(listing)h(options)f (is)g(zero)g(if)g(all)h Fo(optnames)g Fu(are)e(enabled,)j(non-)315 2615 y(zero)j(otherwise.)33 b(When)20 b(setting)f(or)g(unsetting)h (options,)h(the)e(return)h(status)e(is)i(zero)315 2670 y(unless)c(an)f Fo(optname)j Fu(is)e(not)e(a)h(v)m(alid)i(shell)g (option.)p eop %%Page: 45 47 45 46 bop 75 -58 a Fu(Chapter)15 b(4:)k(Shell)f(Builtin)f(Commands)1035 b(45)75 149 y Ft(source)435 214 y(source)23 b Fo(\014lename)315 281 y Fu(A)15 b(synon)o(ym)g(for)g Ft(.)g Fu(\(see)g(Section)h(4.1)e ([Bourne)h(Shell)j(Builtins],)e(page)f(31\).)75 361 y Ft(type)435 426 y(type)23 b([-atp])g([)p Fo(name)k Ft(...)o(])315 493 y Fu(F)l(or)20 b(eac)o(h)h Fo(name)p Fu(,)g(indicate)h(ho)o(w)e(it) h(w)o(ould)g(b)q(e)g(in)o(terpreted)g(if)h(used)f(as)f(a)g(command)315 548 y(name.)315 616 y(If)f(the)g(`)p Ft(-t)p Fu(')f(option)i(is)f (used,)h Ft(type)f Fu(prin)o(ts)g(a)g(single)h(w)o(ord)f(whic)o(h)g(is) h(one)f(of)g(`)p Ft(alias)p Fu(',)315 670 y(`)p Ft(function)p Fu(',)14 b(`)p Ft(builtin)p Fu(',)h(`)p Ft(file)p Fu(')g(or)h(`)p Ft(keyword)p Fu(',)f(if)h Fo(name)j Fu(is)e(an)g(alias,)g(shell)g (function,)315 725 y(shell)i(builtin,)h(disk)e(\014le,)g(or)f(shell)i (reserv)o(ed)f(w)o(ord,)e(resp)q(ectiv)o(ely)l(.)29 b(If)17 b(the)h Fo(name)h Fu(is)f(not)315 780 y(found,)d(then)h(nothing)f(is)h (prin)o(ted,)g(and)f Ft(type)g Fu(returns)g(a)g(failure)h(status.)315 847 y(If)k(the)g(`)p Ft(-p)p Fu(')e(option)i(is)g(used,)h Ft(type)e Fu(either)h(returns)g(the)f(name)h(of)f(the)h(disk)g(\014le)h (that)315 902 y(w)o(ould)16 b(b)q(e)f(executed,)h(or)f(nothing)h(if)f (`)p Ft(-t)p Fu(')f(w)o(ould)i(not)f(return)g(`)p Ft(file)p Fu('.)315 970 y(If)k(the)f(`)p Ft(-a)p Fu(')f(option)i(is)g(used,)g Ft(type)f Fu(returns)g(all)h(of)f(the)h(places)g(that)f(con)o(tain)g (an)g(exe-)315 1024 y(cutable)g(named)f Fo(\014le)p Fu(.)25 b(This)18 b(includes)h(aliases)e(and)g(functions,)h(if)f(and)g(only)g (if)g(the)g(`)p Ft(-p)p Fu(')315 1079 y(option)e(is)h(not)f(also)g (used.)315 1147 y(The)j(return)g(status)f(is)h(zero)g(if)h(an)o(y)e(of) h(the)g Fo(names)h Fu(are)f(found,)g(non-zero)h(if)f(none)g(are)315 1201 y(found.)75 1281 y Ft(typeset)435 1346 y(typeset)23 b([-afFrxi])g([-p])g([)p Fo(name)s Ft([=)p Fo(v)m(alue)s Ft(]])315 1413 y Fu(The)15 b Ft(typeset)f Fu(command)g(is)i(supplied)h (for)d(compatibilit)o(y)i(with)f(the)g(Korn)g(shell;)h(ho)o(w-)315 1468 y(ev)o(er,)f(it)g(has)g(b)q(een)i(deprecated)e(in)i(fa)o(v)o(or)c (of)i(the)g Ft(declare)g Fu(builtin)i(command.)75 1548 y Ft(ulimit)435 1613 y(ulimit)23 b([-acdflmnpstuvSH])f([)p Fo(limit)q Ft(])315 1680 y(ulimit)12 b Fu(pro)o(vides)i(con)o(trol)f(o) o(v)o(er)f(the)i(resources)f(a)o(v)m(ailable)i(to)e(pro)q(cesses)g (started)g(b)o(y)g(the)315 1735 y(shell,)j(on)e(systems)f(that)h(allo)o (w)g(suc)o(h)g(con)o(trol.)20 b(If)14 b(an)g(option)g(is)h(giv)o(en,)f (it)h(is)f(in)o(terpreted)315 1790 y(as)h(follo)o(ws:)315 1870 y Ft(-S)192 b Fu(Change)15 b(and)h(rep)q(ort)e(the)i(soft)e(limit) j(asso)q(ciated)e(with)h(a)e(resource.)315 1950 y Ft(-H)192 b Fu(Change)15 b(and)h(rep)q(ort)e(the)i(hard)f(limit)h(asso)q(ciated)g (with)f(a)g(resource.)315 2030 y Ft(-a)192 b Fu(All)16 b(curren)o(t)g(limits)g(are)f(rep)q(orted.)315 2110 y Ft(-c)192 b Fu(The)15 b(maxim)o(um)h(size)g(of)e(core)i(\014les)g (created.)315 2190 y Ft(-d)192 b Fu(The)15 b(maxim)o(um)h(size)g(of)e (a)h(pro)q(cess's)g(data)g(segmen)o(t.)315 2270 y Ft(-f)192 b Fu(The)15 b(maxim)o(um)h(size)g(of)e(\014les)j(created)e(b)o(y)g(the) g(shell.)315 2350 y Ft(-l)192 b Fu(The)15 b(maxim)o(um)h(size)g(that)e (ma)o(y)h(b)q(e)h(lo)q(c)o(k)o(ed)f(in)o(to)h(memory)l(.)315 2430 y Ft(-m)192 b Fu(The)15 b(maxim)o(um)h(residen)o(t)f(set)g(size.) 315 2510 y Ft(-n)192 b Fu(The)15 b(maxim)o(um)h(n)o(um)o(b)q(er)f(of)g (op)q(en)h(\014le)g(descriptors.)315 2590 y Ft(-p)192 b Fu(The)15 b(pip)q(e)i(bu\013er)e(size.)315 2670 y Ft(-s)192 b Fu(The)15 b(maxim)o(um)h(stac)o(k)e(size.)p eop %%Page: 46 48 46 47 bop 75 -58 a Fu(46)1285 b(Bash)15 b(Reference)h(Man)o(ual)315 149 y Ft(-t)192 b Fu(The)15 b(maxim)o(um)h(amoun)o(t)e(of)h(cpu)h(time) f(in)h(seconds.)315 229 y Ft(-u)192 b Fu(The)15 b(maxim)o(um)h(n)o(um)o (b)q(er)f(of)g(pro)q(cesses)g(a)o(v)m(ailable)i(to)e(a)g(single)h (user.)315 309 y Ft(-v)192 b Fu(The)15 b(maxim)o(um)g(amoun)o(t)f(of)g (virtual)i(memory)e(a)o(v)m(ailable)j(to)d(the)h(pro)q(cess.)315 389 y(If)i Fo(limit)i Fu(is)e(giv)o(en,)h(it)f(is)g(the)g(new)g(v)m (alue)h(of)e(the)h(sp)q(eci\014ed)i(resource;)e(the)g(sp)q(ecial)i Fo(limit)315 444 y Fu(v)m(alues)c Ft(hard)p Fu(,)e Ft(soft)p Fu(,)g(and)g Ft(unlimited)g Fu(stand)g(for)g(the)h(curren)o(t)f(hard)h (limit,)g(the)g(curren)o(t)315 499 y(soft)j(limit,)i(and)e(no)h(limit,) h(resp)q(ectiv)o(ely)l(.)28 b(Otherwise,)19 b(the)e(curren)o(t)h(v)m (alue)g(of)f(the)h(soft)315 554 y(limit)k(for)d(the)i(sp)q(eci\014ed)h (resource)e(is)h(prin)o(ted,)h(unless)f(the)g(`)p Ft(-H)p Fu(')e(option)h(is)h(supplied.)315 609 y(When)15 b(setting)f(new)h (limits,)h(if)e(neither)i(`)p Ft(-H)p Fu(')d(nor)h(`)p Ft(-S)p Fu(')g(is)h(supplied,)h(b)q(oth)f(the)f(hard)h(and)315 663 y(soft)i(limits)j(are)e(set.)29 b(If)18 b(no)h(option)f(is)h(giv)o (en,)g(then)g(`)p Ft(-f)p Fu(')e(is)i(assumed.)29 b(V)l(alues)19 b(are)f(in)315 718 y(1024-b)o(yte)11 b(incremen)o(ts,)i(except)g(for)f (`)p Ft(-t)p Fu(',)f(whic)o(h)i(is)g(in)g(seconds,)g(`)p Ft(-p)p Fu(',)e(whic)o(h)i(is)g(in)g(units)315 773 y(of)i(512-b)o(yte)f (blo)q(c)o(ks,)i(and)f(`)p Ft(-n)p Fu(')f(and)i(`)p Ft(-u)p Fu(',)d(whic)o(h)j(are)f(unscaled)i(v)m(alues.)315 840 y(The)h(return)f(status)f(is)i(zero)f(unless)i(an)e(in)o(v)m(alid)j (option)d(or)g(argumen)o(t)g(is)h(supplied,)h(or)315 895 y(an)c(error)g(o)q(ccurs)g(while)i(setting)e(a)g(new)g(limit.)75 975 y Ft(unalias)435 1040 y(unalias)23 b([-a])g([)p Fo(name)k Ft(...)c(])315 1107 y Fu(Remo)o(v)o(e)17 b(eac)o(h)i Fo(name)i Fu(from)c(the)i(list)g(of)f(aliases.)31 b(If)18 b(`)p Ft(-a)p Fu(')g(is)h(supplied,)i(all)e(aliases)g(are)315 1162 y(remo)o(v)o(ed.)g(Aliases)e(are)e(describ)q(ed)i(in)f(Section)g (6.6)e([Aliases],)h(page)g(67.)75 1291 y Fs(4.3)33 b(The)22 b(Set)g(Builtin)137 1388 y Fu(This)16 b(builtin)i(is)d(so)g (complicated)i(that)d(it)h(deserv)o(es)h(its)f(o)o(wn)g(section.)75 1468 y Ft(set)435 1532 y(set)23 b([--abefhkmnptuvxBCHP])e([-o)j Fo(option)p Ft(])g([)p Fo(argumen)o(t)g Ft(...)o(])315 1600 y Fu(If)16 b(no)g(options)g(or)g(argumen)o(ts)f(are)g(supplied,)k Ft(set)c Fu(displa)o(ys)i(the)f(names)g(and)g(v)m(alues)h(of)315 1655 y(all)k(shell)g(v)m(ariables)g(and)f(functions,)i(sorted)d (according)i(to)e(the)h(curren)o(t)g(lo)q(cale,)i(in)e(a)315 1709 y(format)14 b(that)g(ma)o(y)h(b)q(e)h(reused)f(as)g(input.)315 1777 y(When)g(options)f(are)h(supplied,)h(they)f(set)f(or)g(unset)h (shell)h(attributes.)j(Options,)c(if)g(sp)q(ec-)315 1832 y(i\014ed,)h(ha)o(v)o(e)f(the)g(follo)o(wing)h(meanings:)315 1912 y Ft(-a)192 b Fu(Mark)15 b(v)m(ariables)j(and)e(function)h(whic)o (h)g(are)e(mo)q(di\014ed)j(or)d(created)h(for)g(ex-)555 1966 y(p)q(ort)f(to)f(the)i(en)o(vironmen)o(t)f(of)g(subsequen)o(t)h (commands.)315 2046 y Ft(-b)192 b Fu(Cause)22 b(the)g(status)g(of)g (terminated)g(bac)o(kground)g(jobs)g(to)g(b)q(e)h(rep)q(orted)555 2101 y(immediately)l(,)15 b(rather)e(than)h(b)q(efore)g(prin)o(ting)g (the)g(next)f(primary)h(prompt.)315 2181 y Ft(-e)192 b Fu(Exit)18 b(immediately)i(if)f(a)f(simple)i(command)e(\(see)g (Section)h(3.2.1)e([Simple)555 2236 y(Commands],)e(page)g(8\))h(exits)g (with)g(a)f(non-zero)h(status,)f(unless)i(the)f(com-)555 2291 y(mand)i(that)g(fails)h(is)f(part)g(of)g(an)g Ft(until)f Fu(or)h Ft(while)g Fu(lo)q(op,)h(part)e(of)h(an)g Ft(if)555 2346 y Fu(statemen)o(t,)12 b(part)g(of)g(a)g Ft(&&)g Fu(or)g Ft(||)g Fu(list,)i(or)e(if)h(the)f(command's)g(return)h(status) 555 2400 y(is)j(b)q(eing)h(in)o(v)o(erted)g(using)f Ft(!)p Fu(.)22 b(A)16 b(trap)f(on)h Ft(ERR)p Fu(,)f(if)h(set,)g(is)g(executed) h(b)q(efore)555 2455 y(the)e(shell)i(exits.)315 2535 y Ft(-f)192 b Fu(Disable)16 b(\014le)g(name)g(generation)f (\(globbing\).)315 2615 y Ft(-h)192 b Fu(Lo)q(cate)16 b(and)g(remem)o(b)q(er)g(\(hash\))g(commands)g(as)f(they)h(are)g(lo)q (ok)o(ed)g(up)h(for)555 2670 y(execution.)k(This)16 b(option)f(is)h (enabled)h(b)o(y)e(default.)p eop %%Page: 47 49 47 48 bop 75 -58 a Fu(Chapter)15 b(4:)k(Shell)f(Builtin)f(Commands)1035 b(47)315 149 y Ft(-k)192 b Fu(All)18 b(argumen)o(ts)e(in)h(the)g(form)f (of)h(assignmen)o(t)f(statemen)o(ts)g(are)g(placed)i(in)555 204 y(the)h(en)o(vironmen)o(t)g(for)f(a)h(command,)g(not)g(just)f (those)h(that)f(precede)i(the)555 259 y(command)15 b(name.)315 345 y Ft(-m)192 b Fu(Job)15 b(con)o(trol)g(is)h(enabled)h(\(see)e (Chapter)g(7)g([Job)g(Con)o(trol],)f(page)h(75\).)315 431 y Ft(-n)192 b Fu(Read)10 b(commands)g(but)h(do)f(not)g(execute)h (them;)h(this)e(ma)o(y)g(b)q(e)h(used)g(to)f(c)o(hec)o(k)555 486 y(a)21 b(script)g(for)f(syn)o(tax)h(errors.)36 b(This)22 b(option)f(is)g(ignored)h(b)o(y)f(in)o(teractiv)o(e)555 541 y(shells.)315 627 y Ft(-o)15 b Fo(option-name)555 682 y Fu(Set)g(the)h(option)f(corresp)q(onding)h(to)f Fo(option-name)s Fu(:)555 768 y Ft(allexport)795 823 y Fu(Same)g(as)g Ft(-a)p Fu(.)555 909 y Ft(braceexpand)795 964 y Fu(Same)g(as)g Ft(-B)p Fu(.)555 1050 y Ft(emacs)120 b Fu(Use)12 b(an)h Ft(emacs)p Fu(-st)o(yle)e(line)j(editing)g(in)o (terface)e(\(see)g(Chapter)g(8)795 1104 y([Command)i(Line)j(Editing],)e (page)h(79\).)555 1191 y Ft(errexit)72 b Fu(Same)15 b(as)g Ft(-e)p Fu(.)555 1277 y Ft(hashall)72 b Fu(Same)15 b(as)g Ft(-h)p Fu(.)555 1363 y Ft(histexpand)795 1418 y Fu(Same)g(as)g Ft(-H)p Fu(.)555 1504 y Ft(history)72 b Fu(Enable)21 b(command)e(history)l(,)h(as)g(describ)q(ed)h(in)f(Section)h(9.1)795 1558 y([Bash)d(History)g(F)l(acilities],)i(page)e(103.)28 b(This)19 b(option)f(is)h(on)795 1613 y(b)o(y)c(default)h(in)g(in)o (teractiv)o(e)g(shells.)555 1699 y Ft(ignoreeof)795 1754 y Fu(An)f(in)o(teractiv)o(e)h(shell)h(will)g(not)e(exit)g(up)q(on)h (reading)g(EOF.)555 1840 y Ft(keyword)72 b Fu(Same)15 b(as)g Ft(-k)p Fu(.)555 1926 y Ft(monitor)72 b Fu(Same)15 b(as)g Ft(-m)p Fu(.)555 2012 y Ft(noclobber)795 2067 y Fu(Same)g(as)g Ft(-C)p Fu(.)555 2153 y Ft(noexec)96 b Fu(Same)15 b(as)g Ft(-n)p Fu(.)555 2239 y Ft(noglob)96 b Fu(Same)15 b(as)g Ft(-f)p Fu(.)555 2326 y Ft(nolog)120 b Fu(Curren)o(tly)15 b(ignored.)555 2412 y Ft(notify)96 b Fu(Same)15 b(as)g Ft(-b)p Fu(.)555 2498 y Ft(nounset)72 b Fu(Same)15 b(as)g Ft(-u)p Fu(.)555 2584 y Ft(onecmd)96 b Fu(Same)15 b(as)g Ft(-t)p Fu(.)555 2670 y Ft(physical)48 b Fu(Same)15 b(as)g Ft(-P)p Fu(.)p eop %%Page: 48 50 48 49 bop 75 -58 a Fu(48)1285 b(Bash)15 b(Reference)h(Man)o(ual)555 149 y Ft(posix)120 b Fu(Change)18 b(the)g(b)q(eha)o(vior)g(of)g(Bash)g (where)g(the)g(default)h(op)q(er-)795 204 y(ation)c(di\013ers)h(from)f (the)g Fp(posix)g Fu(1003.2)f(standard)h(to)g(matc)o(h)795 259 y(the)22 b(standard)f(\(see)h(Section)h(6.11)d([Bash)i(POSIX)h(Mo)q (de],)795 314 y(page)17 b(72\).)25 b(This)18 b(is)g(in)o(tended)h(to)e (mak)o(e)f(Bash)i(b)q(eha)o(v)o(e)f(as)g(a)795 369 y(strict)e(sup)q (erset)h(of)e(that)h(standard.)555 452 y Ft(privileged)795 507 y Fu(Same)g(as)g Ft(-p)p Fu(.)555 590 y Ft(verbose)72 b Fu(Same)15 b(as)g Ft(-v)p Fu(.)555 673 y Ft(vi)192 b Fu(Use)15 b(a)g Ft(vi)p Fu(-st)o(yle)g(line)i(editing)g(in)o (terface.)555 756 y Ft(xtrace)96 b Fu(Same)15 b(as)g Ft(-x)p Fu(.)315 839 y Ft(-p)192 b Fu(T)l(urn)17 b(on)g(privileged)j (mo)q(de.)26 b(In)17 b(this)h(mo)q(de,)f(the)g Ft($BASH_ENV)f Fu(and)i Ft($ENV)555 894 y Fu(\014les)i(are)e(not)h(pro)q(cessed,)h (shell)g(functions)f(are)g(not)f(inherited)j(from)d(the)555 949 y(en)o(vironmen)o(t,)f(and)h(the)f Ft(SHELLOPTS)e Fu(v)m(ariable,)k(if)e(it)g(app)q(ears)h(in)f(the)g(en-)555 1004 y(vironmen)o(t,)e(is)g(ignored.)21 b(If)15 b(the)g(shell)i(is)f (started)e(with)h(the)g(e\013ectiv)o(e)h(user)555 1059 y(\(group\))e(id)i(not)f(equal)g(to)g(the)g(real)g(user)g(\(group\))f (id,)i(and)f(the)g Ft(-p)g Fu(option)555 1113 y(is)21 b(not)e(supplied,)k(these)e(actions)f(are)g(tak)o(en)f(and)h(the)h (e\013ectiv)o(e)f(user)g(id)555 1168 y(is)f(set)f(to)f(the)i(real)f (user)g(id.)30 b(If)19 b(the)f Ft(-p)g Fu(option)g(is)h(supplied)h(at)e (startup,)555 1223 y(the)d(e\013ectiv)o(e)g(user)f(id)i(is)f(not)f (reset.)20 b(T)l(urning)15 b(this)g(option)g(o\013)f(causes)h(the)555 1278 y(e\013ectiv)o(e)e(user)g(and)g(group)g(ids)g(to)g(b)q(e)g(set)g (to)f(the)h(real)g(user)g(and)g(group)g(ids.)315 1361 y Ft(-t)192 b Fu(Exit)15 b(after)g(reading)h(and)f(executing)h(one)g (command.)315 1444 y Ft(-u)192 b Fu(T)l(reat)18 b(unset)h(v)m(ariables) g(as)f(an)h(error)e(when)i(p)q(erforming)g(parameter)f(ex-)555 1499 y(pansion.)29 b(An)19 b(error)e(message)h(will)i(b)q(e)e(written)h (to)e(the)h(standard)g(error,)555 1554 y(and)d(a)g(non-in)o(teractiv)o (e)h(shell)h(will)g(exit.)315 1637 y Ft(-v)192 b Fu(Prin)o(t)15 b(shell)i(input)f(lines)h(as)e(they)g(are)g(read.)315 1720 y Ft(-x)192 b Fu(Prin)o(t)17 b(a)g(trace)f(of)h(simple)i(commands) e(and)g(their)g(argumen)o(ts)g(after)f(they)555 1775 y(are)f(expanded)h(and)g(b)q(efore)f(they)g(are)g(executed.)315 1858 y Ft(-B)192 b Fu(The)21 b(shell)h(will)g(p)q(erform)e(brace)h (expansion)g(\(see)g(Section)g(3.5.1)e([Brace)555 1913 y(Expansion],)c(page)g(15\).)k(This)d(option)f(is)h(on)f(b)o(y)g (default.)315 1996 y Ft(-C)192 b Fu(Prev)o(en)o(t)11 b(output)h(redirection)h(using)f(`)p Ft(>)p Fu(',)g(`)p Ft(>&)p Fu(',)f(and)h(`)p Ft(<>)p Fu(')e(from)h(o)o(v)o(erwriting)555 2051 y(existing)16 b(\014les.)315 2134 y Ft(-H)192 b Fu(Enable)20 b(`)p Ft(!)p Fu(')e(st)o(yle)i(history)f(substitution)h (\(see)f(Section)h(9.3)f([History)f(In-)555 2189 y(teraction],)f(page)h (105\).)26 b(This)18 b(option)g(is)g(on)g(b)o(y)f(default)i(for)e(in)o (teractiv)o(e)555 2244 y(shells.)315 2327 y Ft(-P)192 b Fu(If)22 b(set,)g(do)g(not)f(follo)o(w)h(sym)o(b)q(olic)g(links)h (when)f(p)q(erforming)g(commands)555 2382 y(suc)o(h)15 b(as)f Ft(cd)h Fu(whic)o(h)g(c)o(hange)g(the)g(curren)o(t)g(directory)l (.)20 b(The)15 b(ph)o(ysical)h(direc-)555 2437 y(tory)g(is)i(used)f (instead.)26 b(By)17 b(default,)g(Bash)h(follo)o(ws)e(the)i(logical)g (c)o(hain)f(of)555 2491 y(directories)i(when)g(p)q(erforming)g (commands)f(whic)o(h)h(c)o(hange)g(the)f(curren)o(t)555 2546 y(directory)l(.)555 2615 y(F)l(or)c(example,)i(if)f(`)p Ft(/usr/sys)p Fu(')e(is)j(a)f(sym)o(b)q(olic)h(link)g(to)f(`)p Ft(/usr/local/sys)p Fu(')555 2670 y(then:)p eop %%Page: 49 51 49 50 bop 75 -58 a Fu(Chapter)15 b(4:)k(Shell)f(Builtin)f(Commands)1035 b(49)675 149 y Ft($)24 b(cd)f(/usr/sys;)g(echo)g($PWD)675 201 y(/usr/sys)675 253 y($)h(cd)f(..;)h(pwd)675 305 y(/usr)555 372 y Fu(If)15 b Ft(set)g(-P)g Fu(is)h(on,)f(then:)675 437 y Ft($)24 b(cd)f(/usr/sys;)g(echo)g($PWD)675 489 y(/usr/local/sys)675 540 y($)h(cd)f(..;)h(pwd)675 592 y(/usr/local)315 672 y(--)192 b Fu(If)16 b(no)g(argumen)o(ts)f(follo)o (w)h(this)g(option,)g(then)g(the)g(p)q(ositional)h(parameters)555 727 y(are)f(unset.)25 b(Otherwise,)18 b(the)f(p)q(ositional)h (parameters)e(are)g(set)g(to)h(the)f Fo(ar-)555 782 y(gumen)o(ts)p Fu(,)e(ev)o(en)i(if)g(some)f(of)f(them)h(b)q(egin)i(with)e(a)g(`)p Ft(-)p Fu('.)315 861 y Ft(-)216 b Fu(Signal)24 b(the)e(end)h(of)f (options,)i(cause)e(all)i(remaining)f Fo(argumen)o(ts)h Fu(to)d(b)q(e)555 916 y(assigned)f(to)e(the)h(p)q(ositional)i (parameters.)30 b(The)20 b(`)p Ft(-x)p Fu(')e(and)h(`)p Ft(-v)p Fu(')f(options)555 971 y(are)12 b(turned)h(o\013.)18 b(If)12 b(there)h(are)f(no)g(argumen)o(ts,)g(the)g(p)q(ositional)i (parameters)555 1026 y(remain)i(unc)o(hanged.)315 1105 y(Using)e(`)p Ft(+)p Fu(')f(rather)g(than)g(`)p Ft(-)p Fu(')g(causes)h(these)g(options)f(to)g(b)q(e)i(turned)f(o\013.)k(The)c (options)g(can)315 1160 y(also)k(b)q(e)g(used)g(up)q(on)g(in)o(v)o(o)q (cation)g(of)g(the)f(shell.)29 b(The)18 b(curren)o(t)f(set)h(of)f (options)g(ma)o(y)g(b)q(e)315 1215 y(found)f(in)g Ft($-)p Fu(.)315 1282 y(The)22 b(remaining)h(N)f Fo(argumen)o(ts)g Fu(are)g(p)q(ositional)h(parameters)e(and)h(are)f(assigned,)j(in)315 1337 y(order,)15 b(to)f Ft($1)p Fu(,)h Ft($2)p Fu(,)i(.)11 b(.)f(.)20 b Ft($N)p Fu(.)g(The)15 b(sp)q(ecial)i(parameter)e Ft(#)g Fu(is)h(set)f(to)f(N.)315 1404 y(The)h(return)h(status)e(is)i (alw)o(a)o(ys)e(zero)h(unless)i(an)e(in)o(v)m(alid)i(option)f(is)f (supplied.)75 1533 y Fs(4.4)33 b(Sp)r(ecial)23 b(Builtins)137 1629 y Fu(F)l(or)12 b(historical)h(reasons,)f(the)h Fp(posix)f Fu(1003.2)e(standard)i(has)g(classi\014ed)i(sev)o(eral)f(builtin)h (commands)75 1684 y(as)k Fn(sp)n(e)n(cial)p Fu(.)28 b(When)18 b(Bash)h(is)f(executing)i(in)f Fp(posix)f Fu(mo)q(de,)g(the)h(sp)q (ecial)h(builtins)g(di\013er)f(from)e(other)75 1739 y(builtin)g (commands)e(in)h(three)g(resp)q(ects:)100 1806 y(1.)29 b(Sp)q(ecial)17 b(builtins)h(are)d(found)g(b)q(efore)h(shell)g (functions)g(during)g(command)f(lo)q(okup.)100 1873 y(2.)29 b(If)15 b(a)g(sp)q(ecial)i(builtin)h(returns)d(an)g(error)f(status,)g (a)h(non-in)o(teractiv)o(e)h(shell)h(exits.)100 1941 y(3.)29 b(Assignmen)o(t)15 b(statemen)o(ts)f(preceding)i(the)f(command) f(sta)o(y)g(in)h(e\013ect)g(in)h(the)e(shell)j(en)o(vironmen)o(t)165 1995 y(after)d(the)i(command)f(completes.)137 2075 y(When)k(Bash)f(is)h (not)f(executing)h(in)g Fp(posix)f Fu(mo)q(de,)h(these)f(builtins)i(b)q (eha)o(v)o(e)f(no)f(di\013eren)o(tly)h(than)75 2130 y(the)c(rest)g(of)g (the)g(Bash)g(builtin)j(commands.)h(The)d(Bash)f Fp(posix)g Fu(mo)q(de)g(is)h(describ)q(ed)h(in)f(Section)g(6.11)75 2185 y([Bash)f(POSIX)h(Mo)q(de],)f(page)g(72.)137 2252 y(These)h(are)f(the)g Fp(posix)g Fu(sp)q(ecial)i(builtins:)195 2316 y Ft(break)23 b(:)h(.)g(continue)e(eval)i(exec)f(exit)g(export)g (readonly)g(return)g(set)195 2368 y(shift)g(trap)g(unset)p eop %%Page: 50 52 50 51 bop 75 -58 a Fu(50)1285 b(Bash)15 b(Reference)h(Man)o(ual)p eop %%Page: 51 53 51 52 bop 75 -58 a Fu(Chapter)15 b(5:)k(Shell)f(V)l(ariables)1230 b(51)75 149 y Fq(5)41 b(Shell)25 b(V)-7 b(ariables)137 272 y Fu(This)19 b(c)o(hapter)g(describ)q(es)h(the)f(shell)h(v)m (ariables)g(that)d(Bash)i(uses.)30 b(Bash)19 b(automatically)g(assigns) 75 326 y(default)d(v)m(alues)g(to)f(a)g(n)o(um)o(b)q(er)g(of)g(v)m (ariables.)75 459 y Fs(5.1)33 b(Bourne)22 b(Shell)i(V)-6 b(ariables)137 557 y Fu(Bash)18 b(uses)h(certain)f(shell)i(v)m (ariables)g(in)f(the)f(same)g(w)o(a)o(y)f(as)h(the)g(Bourne)g(shell.)31 b(In)19 b(some)e(cases,)75 612 y(Bash)e(assigns)h(a)e(default)i(v)m (alue)h(to)d(the)h(v)m(ariable.)75 709 y Ft(CDPATH)96 b Fu(A)20 b(colon-separated)f(list)i(of)e(directories)h(used)g(as)f(a)h (searc)o(h)f(path)g(for)g(the)h Ft(cd)f Fu(builtin)315 763 y(command.)75 858 y Ft(HOME)144 b Fu(The)12 b(curren)o(t)g(user's)f (home)h(directory;)h(the)f(default)g(for)g(the)f Ft(cd)h Fu(builtin)i(command.)19 b(The)315 913 y(v)m(alue)g(of)f(this)h(v)m (ariable)g(is)g(also)f(used)h(b)o(y)f(tilde)h(expansion)g(\(see)f (Section)h(3.5.2)e([Tilde)315 968 y(Expansion],)e(page)g(16\).)75 1063 y Ft(IFS)168 b Fu(A)13 b(list)g(of)g(c)o(haracters)e(that)h (separate)h(\014elds;)h(used)f(when)h(the)e(shell)j(splits)e(w)o(ords)f (as)h(part)315 1117 y(of)i(expansion.)75 1212 y Ft(MAIL)144 b Fu(If)13 b(this)h(parameter)e(is)h(set)g(to)g(a)f(\014lename)i(and)g (the)f Ft(MAILPATH)f Fu(v)m(ariable)i(is)f(not)g(set,)g(Bash)315 1267 y(informs)i(the)h(user)f(of)g(the)g(arriv)m(al)h(of)f(mail)h(in)g (the)f(sp)q(eci\014ed)i(\014le.)75 1362 y Ft(MAILPATH)48 b Fu(A)17 b(colon-separated)g(list)g(of)f(\014lenames)i(whic)o(h)f(the) g(shell)h(p)q(erio)q(dically)i(c)o(hec)o(ks)d(for)f(new)315 1416 y(mail.)30 b(Eac)o(h)18 b(list)h(en)o(try)f(can)h(sp)q(ecify)g (the)g(message)e(that)h(is)h(prin)o(ted)g(when)g(new)f(mail)315 1471 y(arriv)o(es)c(in)h(the)g(mail)g(\014le)g(b)o(y)g(separating)f (the)h(\014le)g(name)f(from)g(the)h(message)e(with)i(a)f(`)p Ft(?)p Fu('.)315 1526 y(When)i(used)h(in)g(the)f(text)g(of)f(the)i (message,)e Ft($_)h Fu(expands)h(to)e(the)h(name)g(of)g(the)g(curren)o (t)315 1581 y(mail)g(\014le.)75 1675 y Ft(OPTARG)96 b Fu(The)15 b(v)m(alue)i(of)e(the)g(last)g(option)g(argumen)o(t)g(pro)q (cessed)h(b)o(y)f(the)g Ft(getopts)f Fu(builtin.)75 1770 y Ft(OPTIND)96 b Fu(The)15 b(index)i(of)e(the)g(last)g(option)g (argumen)o(t)g(pro)q(cessed)h(b)o(y)f(the)g Ft(getopts)f Fu(builtin.)75 1865 y Ft(PATH)144 b Fu(A)15 b(colon-separated)h(list)g (of)f(directories)h(in)g(whic)o(h)g(the)f(shell)i(lo)q(oks)e(for)g (commands.)75 1960 y Ft(PS1)168 b Fu(The)18 b(primary)g(prompt)f (string.)27 b(The)18 b(default)g(v)m(alue)h(is)f(`)p Ft(\\s-\\v\\$)c Fu('.)27 b(See)18 b(Section)h(6.9)315 2014 y([Prin)o(ting)14 b(a)g(Prompt],)e(page)i(70,)f(for)g(the)h (complete)h(list)f(of)g(escap)q(e)g(sequences)h(that)e(are)315 2069 y(expanded)j(b)q(efore)g Ft(PS1)f Fu(is)g(displa)o(y)o(ed.)75 2164 y Ft(PS2)168 b Fu(The)15 b(secondary)h(prompt)e(string.)20 b(The)c(default)f(v)m(alue)i(is)f(`)p Ft(>)e Fu('.)75 2297 y Fs(5.2)33 b(Bash)21 b(V)-6 b(ariables)137 2395 y Fu(These)19 b(v)m(ariables)h(are)e(set)h(or)f(used)h(b)o(y)f(Bash,)i (but)e(other)g(shells)j(do)d(not)g(normally)h(treat)f(them)75 2450 y(sp)q(ecially)l(.)137 2519 y(A)12 b(few)g(v)m(ariables)i(used)e (b)o(y)g(Bash)g(are)g(describ)q(ed)i(in)f(di\013eren)o(t)f(c)o (hapters:)18 b(v)m(ariables)c(for)d(con)o(trolling)75 2574 y(the)k(job)g(con)o(trol)g(facilities)i(\(see)f(Section)g(7.3)e ([Job)h(Con)o(trol)g(V)l(ariables],)g(page)g(78\).)75 2670 y Ft(BASH)144 b Fu(The)15 b(full)i(pathname)e(used)h(to)e(execute) i(the)g(curren)o(t)f(instance)h(of)e(Bash.)p eop %%Page: 52 54 52 53 bop 75 -58 a Fu(52)1285 b(Bash)15 b(Reference)h(Man)o(ual)75 149 y Ft(BASH_ENV)48 b Fu(If)14 b(this)h(v)m(ariable)h(is)f(set)f(when) g(Bash)h(is)f(in)o(v)o(ok)o(ed)h(to)e(execute)i(a)f(shell)i(script,)f (its)f(v)m(alue)h(is)315 204 y(expanded)j(and)g(used)f(as)g(the)g(name) g(of)g(a)g(startup)f(\014le)j(to)d(read)h(b)q(efore)h(executing)g(the) 315 259 y(script.)i(See)c(Section)g(6.2)e([Bash)h(Startup)g(Files],)h (page)f(61.)75 359 y Ft(BASH_VERSION)315 414 y Fu(The)g(v)o(ersion)h(n) o(um)o(b)q(er)f(of)g(the)g(curren)o(t)h(instance)g(of)e(Bash.)75 514 y Ft(BASH_VERSINFO)315 569 y Fu(A)k(readonly)g(arra)o(y)f(v)m (ariable)i(\(see)f(Section)h(6.7)e([Arra)o(ys],)f(page)i(68\))f(whose)h (mem)o(b)q(ers)315 623 y(hold)f(v)o(ersion)f(information)h(for)e(this)i (instance)g(of)e(Bash.)23 b(The)16 b(v)m(alues)i(assigned)e(to)g(the) 315 678 y(arra)o(y)e(mem)o(b)q(ers)h(are)g(as)g(follo)o(ws:)315 763 y Ft(BASH_VERSINFO[0])555 818 y Fu(The)g(ma)s(jor)f(v)o(ersion)i(n) o(um)o(b)q(er)f(\(the)g Fo(release)s Fu(\).)315 903 y Ft(BASH_VERSINFO[1])555 958 y Fu(The)g(minor)h(v)o(ersion)f(n)o(um)o(b) q(er)h(\(the)f Fo(v)o(ersion)p Fu(\).)315 1042 y Ft(BASH_VERSINFO[2]) 555 1097 y Fu(The)g(patc)o(h)g(lev)o(el.)315 1182 y Ft (BASH_VERSINFO[3])555 1237 y Fu(The)g(build)j(v)o(ersion.)315 1322 y Ft(BASH_VERSINFO[4])555 1377 y Fu(The)d(release)h(status)f (\(e.g.,)e Fo(b)q(eta1)t Fu(\).)315 1462 y Ft(BASH_VERSINFO[5])555 1516 y Fu(The)i(v)m(alue)i(of)e Ft(MACHTYPE)p Fu(.)75 1616 y Ft(COLUMNS)72 b Fu(Used)19 b(b)o(y)f(the)g Ft(select)g Fu(builtin)i(command)e(to)g(determine)h(the)g(terminal)g(width)f(when) 315 1671 y(prin)o(ting)e(selection)h(lists.)j(Automatically)c(set)f(up) q(on)h(receipt)g(of)f(a)g Ft(SIGWINCH)p Fu(.)75 1771 y Ft(COMP_CWORD)315 1826 y Fu(An)20 b(index)g(in)o(to)f Ft(${COMP_WORDS})f Fu(of)g(the)i(w)o(ord)e(con)o(taining)i(the)g (curren)o(t)f(cursor)g(p)q(o-)315 1881 y(sition.)36 b(This)21 b(v)m(ariable)g(is)g(a)o(v)m(ailable)h(only)f(in)g(shell)h(functions)f (in)o(v)o(ok)o(ed)f(b)o(y)h(the)f(pro-)315 1935 y(grammable)d (completion)i(facilities)h(\(see)d(Section)i(8.6)d([Programmable)h (Completion],)315 1990 y(page)e(98\).)75 2090 y Ft(COMP_LINE)315 2145 y Fu(The)20 b(curren)o(t)f(command)g(line.)34 b(This)20 b(v)m(ariable)g(is)g(a)o(v)m(ailable)h(only)f(in)g(shell)h(functions) 315 2200 y(and)13 b(external)g(commands)f(in)o(v)o(ok)o(ed)h(b)o(y)g (the)f(programmable)h(completion)g(facilities)i(\(see)315 2255 y(Section)h(8.6)e([Programmable)g(Completion],)i(page)f(98\).)75 2355 y Ft(COMP_POINT)315 2409 y Fu(The)e(index)h(of)f(the)f(curren)o(t) h(cursor)g(p)q(osition)g(relativ)o(e)h(to)e(the)h(b)q(eginning)i(of)d (the)h(curren)o(t)315 2464 y(command.)19 b(If)c(the)f(curren)o(t)g (cursor)f(p)q(osition)i(is)g(at)e(the)h(end)h(of)e(the)i(curren)o(t)e (command,)315 2519 y(the)i(v)m(alue)h(of)f(this)g(v)m(ariable)h(is)g (equal)g(to)e Ft(${#COMP_LINE})p Fu(.)k(This)d(v)m(ariable)i(is)e(a)o (v)m(ailable)315 2574 y(only)j(in)h(shell)g(functions)g(and)f(external) g(commands)g(in)o(v)o(ok)o(ed)g(b)o(y)g(the)f(programmable)315 2629 y(completion)f(facilities)i(\(see)d(Section)h(8.6)e([Programmable) g(Completion],)h(page)g(98\).)p eop %%Page: 53 55 53 54 bop 75 -58 a Fu(Chapter)15 b(5:)k(Shell)f(V)l(ariables)1230 b(53)75 149 y Ft(COMP_WORDS)315 204 y Fu(An)18 b(arra)o(y)f(v)m (ariable)i(consisting)g(of)f(the)g(individual)j(w)o(ords)c(in)i(the)f (curren)o(t)g(command)315 259 y(line.)45 b(This)24 b(v)m(ariable)g(is)f (a)o(v)m(ailable)i(only)f(in)f(shell)i(functions)f(in)o(v)o(ok)o(ed)f (b)o(y)g(the)g(pro-)315 314 y(grammable)17 b(completion)i(facilities)h (\(see)d(Section)i(8.6)d([Programmable)h(Completion],)315 369 y(page)e(98\).)75 460 y Ft(COMPREPLY)315 515 y Fu(An)k(arra)o(y)e (v)m(ariable)j(from)e(whic)o(h)i(Bash)f(reads)f(the)h(p)q(ossible)h (completions)g(generated)315 570 y(b)o(y)d(a)f(shell)i(function)f(in)o (v)o(ok)o(ed)g(b)o(y)g(the)f(programmable)g(completion)i(facilit)o(y)g (\(see)e(Sec-)315 624 y(tion)f(8.6)g([Programmable)f(Completion],)h (page)g(98\).)75 716 y Ft(DIRSTACK)48 b Fu(An)14 b(arra)o(y)e(v)m (ariable)i(con)o(taining)h(the)e(curren)o(t)g(con)o(ten)o(ts)g(of)g (the)g(directory)h(stac)o(k.)k(Direc-)315 770 y(tories)e(app)q(ear)h (in)g(the)f(stac)o(k)g(in)h(the)f(order)g(they)g(are)g(displa)o(y)o(ed) i(b)o(y)e(the)g Ft(dirs)g Fu(builtin.)315 825 y(Assigning)g(to)f(mem)o (b)q(ers)g(of)f(this)i(arra)o(y)e(v)m(ariable)i(ma)o(y)e(b)q(e)i(used)g (to)e(mo)q(dify)i(directories)315 880 y(already)21 b(in)g(the)f(stac)o (k,)g(but)h(the)f Ft(pushd)g Fu(and)g Ft(popd)g Fu(builtins)j(m)o(ust)c (b)q(e)i(used)g(to)f(add)315 935 y(and)f(remo)o(v)o(e)f(directories.)31 b(Assignmen)o(t)19 b(to)f(this)h(v)m(ariable)h(will)g(not)e(c)o(hange)h (the)g(cur-)315 990 y(ren)o(t)d(directory)l(.)23 b(If)16 b Ft(DIRSTACK)f Fu(is)i(unset,)f(it)h(loses)f(its)g(sp)q(ecial)i(prop)q (erties,)f(ev)o(en)f(if)h(it)f(is)315 1044 y(subsequen)o(tly)g(reset.) 75 1136 y Ft(EUID)144 b Fu(The)15 b(n)o(umeric)i(e\013ectiv)o(e)e(user) g(id)h(of)f(the)g(curren)o(t)h(user.)k(This)15 b(v)m(ariable)i(is)f (readonly)l(.)75 1227 y Ft(FCEDIT)96 b Fu(The)15 b(editor)h(used)g(as)e (a)h(default)h(b)o(y)f(the)h(`)p Ft(-e)p Fu(')e(option)h(to)g(the)g Ft(fc)g Fu(builtin)i(command.)75 1318 y Ft(FIGNORE)72 b Fu(A)18 b(colon-separated)g(list)g(of)f(su\016xes)h(to)f(ignore)h (when)g(p)q(erforming)g(\014lename)h(comple-)315 1373 y(tion.)g(A)13 b(\014le)g(name)f(whose)h(su\016x)f(matc)o(hes)g(one)g (of)g(the)h(en)o(tries)g(in)g Ft(FIGNORE)e Fu(is)i(excluded)315 1428 y(from)h(the)i(list)g(of)f(matc)o(hed)g(\014le)h(names.)k(A)15 b(sample)h(v)m(alue)g(is)g(`)p Ft(.o:~)p Fu(')75 1519 y Ft(FUNCNAME)48 b Fu(The)18 b(name)f(of)g(an)o(y)g(curren)o (tly-executing)i(shell)g(function.)27 b(This)18 b(v)m(ariable)h(exists) e(only)315 1574 y(when)c(a)f(shell)i(function)f(is)g(executing.)20 b(Assignmen)o(ts)13 b(to)f Ft(FUNCNAME)f Fu(ha)o(v)o(e)h(no)h(e\013ect) f(and)315 1629 y(return)i(an)g(error)f(status.)18 b(If)d Ft(FUNCNAME)d Fu(is)j(unset,)f(it)g(loses)g(its)g(sp)q(ecial)i(prop)q (erties,)f(ev)o(en)315 1684 y(if)h(it)f(is)h(subsequen)o(tly)g(reset.) 75 1775 y Ft(GLOBIGNORE)315 1830 y Fu(A)j(colon-separated)g(list)h(of)f (patterns)f(de\014ning)j(the)e(set)g(of)f(\014lenames)i(to)f(b)q(e)g (ignored)315 1885 y(b)o(y)d(\014lename)g(expansion.)22 b(If)16 b(a)f(\014lename)i(matc)o(hed)e(b)o(y)h(a)f(\014lename)i (expansion)f(pattern)315 1939 y(also)g(matc)o(hes)f(one)h(of)g(the)g (patterns)f(in)i Ft(GLOBIGNORE)p Fu(,)d(it)j(is)f(remo)o(v)o(ed)f(from) h(the)g(list)g(of)315 1994 y(matc)o(hes.)75 2086 y Ft(GROUPS)96 b Fu(An)18 b(arra)o(y)f(v)m(ariable)i(con)o(taining)g(the)f(list)h(of)f (groups)f(of)h(whic)o(h)h(the)f(curren)o(t)g(user)g(is)g(a)315 2140 y(mem)o(b)q(er.)23 b(Assignmen)o(ts)17 b(to)f Ft(GROUPS)f Fu(ha)o(v)o(e)h(no)g(e\013ect)h(and)f(return)g(an)h(error)e(status.)23 b(If)315 2195 y Ft(GROUPS)14 b Fu(is)i(unset,)f(it)h(loses)f(its)h(sp)q (ecial)h(prop)q(erties,)e(ev)o(en)h(if)f(it)h(is)f(subsequen)o(tly)i (reset.)75 2286 y Ft(histchars)315 2341 y Fu(Up)c(to)g(three)g(c)o (haracters)f(whic)o(h)i(con)o(trol)e(history)h(expansion,)h(quic)o(k)g (substitution,)g(and)315 2396 y(tok)o(enization)h(\(see)f(Section)h (9.3)e([History)h(In)o(teraction],)g(page)g(105\).)19 b(The)14 b(\014rst)g(c)o(harac-)315 2451 y(ter)g(is)h(the)g Fo(history)g(expansion)g Fu(c)o(haracter,)f(that)g(is,)h(the)f(c)o (haracter)g(whic)o(h)i(signi\014es)g(the)315 2506 y(start)11 b(of)h(a)f(history)h(expansion,)i(normally)e(`)p Ft(!)p Fu('.)18 b(The)13 b(second)f(c)o(haracter)g(is)g(the)h(c)o(haracter)315 2560 y(whic)o(h)19 b(signi\014es)g(`quic)o(k)g(substitution')f(when)h (seen)f(as)g(the)g(\014rst)g(c)o(haracter)f(on)h(a)g(line,)315 2615 y(normally)c(`)p Ft(^)p Fu('.)k(The)13 b(optional)h(third)g(c)o (haracter)f(is)g(the)g(c)o(haracter)g(whic)o(h)h(indicates)h(that)315 2670 y(the)i(remainder)g(of)g(the)g(line)h(is)g(a)e(commen)o(t)g(when)i (found)f(as)f(the)h(\014rst)g(c)o(haracter)f(of)g(a)p eop %%Page: 54 56 54 55 bop 75 -58 a Fu(54)1285 b(Bash)15 b(Reference)h(Man)o(ual)315 149 y(w)o(ord,)h(usually)i(`)p Ft(#)p Fu('.)26 b(The)18 b(history)f(commen)o(t)g(c)o(haracter)g(causes)h(history)f (substitution)315 204 y(to)c(b)q(e)h(skipp)q(ed)h(for)d(the)i (remaining)g(w)o(ords)f(on)g(the)g(line.)21 b(It)13 b(do)q(es)h(not)f (necessarily)i(cause)315 259 y(the)g(shell)i(parser)e(to)f(treat)h(the) g(rest)g(of)g(the)g(line)i(as)d(a)h(commen)o(t.)75 344 y Ft(HISTCMD)72 b Fu(The)18 b(history)g(n)o(um)o(b)q(er,)g(or)g(index)h (in)f(the)g(history)g(list,)h(of)e(the)h(curren)o(t)g(command.)28 b(If)315 399 y Ft(HISTCMD)14 b Fu(is)h(unset,)g(it)g(loses)g(its)g(sp)q (ecial)i(prop)q(erties,)e(ev)o(en)h(if)f(it)g(is)g(subsequen)o(tly)i (reset.)75 483 y Ft(HISTCONTROL)315 538 y Fu(A)d(v)m(alue)i(of)e(`)p Ft(ignorespace)p Fu(')e(means)i(to)g(not)g(en)o(ter)g(lines)i(whic)o(h) f(b)q(egin)h(with)f(a)f(space)g(or)315 593 y(tab)d(in)o(to)h(the)g (history)g(list.)20 b(A)11 b(v)m(alue)i(of)f(`)p Ft(ignoredups)p Fu(')e(means)h(to)h(not)f(en)o(ter)h(lines)h(whic)o(h)315 648 y(matc)o(h)g(the)g(last)h(en)o(tered)f(line.)21 b(A)14 b(v)m(alue)g(of)f(`)p Ft(ignoreboth)p Fu(')e(com)o(bines)k(the)e(t)o(w) o(o)f(options.)315 702 y(Unset,)18 b(or)f(set)h(to)f(an)o(y)g(other)h (v)m(alue)h(than)e(those)h(ab)q(o)o(v)o(e,)f(means)h(to)f(sa)o(v)o(e)g (all)i(lines)g(on)315 757 y(the)i(history)f(list.)36 b(The)21 b(second)g(and)g(subsequen)o(t)g(lines)h(of)e(a)g(m)o (ulti-line)j(comp)q(ound)315 812 y(command)17 b(are)f(not)h(tested,)f (and)h(are)g(added)g(to)g(the)g(history)f(regardless)h(of)g(the)g(v)m (alue)315 867 y(of)e Ft(HISTCONTROL)p Fu(.)75 951 y Ft(HISTFILE)48 b Fu(The)14 b(name)g(of)g(the)g(\014le)h(to)e(whic)o(h)i(the)f(command) g(history)g(is)g(sa)o(v)o(ed.)19 b(The)14 b(default)h(v)m(alue)315 1006 y(is)h(`)p Ft(~/.bash_history)p Fu('.)75 1091 y Ft(HISTFILESIZE)315 1146 y Fu(The)d(maxim)o(um)g(n)o(um)o(b)q(er)h(of)e (lines)j(con)o(tained)e(in)h(the)f(history)g(\014le.)21 b(When)13 b(this)h(v)m(ariable)315 1200 y(is)f(assigned)h(a)e(v)m (alue,)i(the)f(history)g(\014le)g(is)g(truncated,)g(if)h(necessary)l(,) f(to)f(con)o(tain)h(no)f(more)315 1255 y(than)17 b(that)f(n)o(um)o(b)q (er)i(of)e(lines.)28 b(The)17 b(history)g(\014le)h(is)g(also)f (truncated)g(to)f(this)i(size)g(after)315 1310 y(writing)e(it)f(when)h (an)f(in)o(teractiv)o(e)h(shell)g(exits.)21 b(The)15 b(default)h(v)m(alue)g(is)g(500.)75 1395 y Ft(HISTIGNORE)315 1450 y Fu(A)g(colon-separated)h(list)g(of)f(patterns)g(used)g(to)g (decide)i(whic)o(h)f(command)f(lines)i(should)315 1504 y(b)q(e)f(sa)o(v)o(ed)f(on)g(the)g(history)g(list.)24 b(Eac)o(h)16 b(pattern)g(is)h(anc)o(hored)f(at)f(the)i(b)q(eginning)h (of)e(the)315 1559 y(line)23 b(and)e(m)o(ust)g(matc)o(h)f(the)h (complete)h(line)h(\(no)e(implicit)i(`)p Ft(*)p Fu(')e(is)g(app)q (ended\).)39 b(Eac)o(h)315 1614 y(pattern)20 b(is)i(tested)f(against)f (the)h(line)i(after)d(the)h(c)o(hec)o(ks)g(sp)q(eci\014ed)i(b)o(y)e Ft(HISTCONTROL)315 1669 y Fu(are)d(applied.)31 b(In)19 b(addition)g(to)f(the)h(normal)f(shell)i(pattern)e(matc)o(hing)g(c)o (haracters,)g(`)p Ft(&)p Fu(')315 1724 y(matc)o(hes)g(the)g(previous)g (history)g(line.)30 b(`)p Ft(&)p Fu(')17 b(ma)o(y)h(b)q(e)g(escap)q(ed) h(using)g(a)f(bac)o(kslash;)h(the)315 1778 y(bac)o(kslash)e(is)h(remo)o (v)o(ed)e(b)q(efore)h(attempting)g(a)f(matc)o(h.)25 b(The)17 b(second)g(and)g(subsequen)o(t)315 1833 y(lines)h(of)d(a)h(m)o (ulti-line)j(comp)q(ound)e(command)f(are)g(not)g(tested,)f(and)i(are)f (added)g(to)g(the)315 1888 y(history)f(regardless)h(of)e(the)i(v)m (alue)g(of)f Ft(HISTIGNORE)p Fu(.)315 1953 y Ft(HISTIGNORE)10 b Fu(subsumes)i(the)f(function)h(of)f Ft(HISTCONTROL)p Fu(.)17 b(A)11 b(pattern)g(of)g(`)p Ft(&)p Fu(')f(is)i(iden)o(tical)315 2007 y(to)g Ft(ignoredups)p Fu(,)g(and)h(a)f(pattern)g(of)h(`)p Ft([)h(]*)p Fu(')e(is)i(iden)o(tical)g(to)f Ft(ignorespace)p Fu(.)k(Com)o(bining)315 2062 y(these)e(t)o(w)o(o)e(patterns,)h (separating)h(them)g(with)g(a)f(colon,)h(pro)o(vides)h(the)e (functionalit)o(y)i(of)315 2117 y Ft(ignoreboth)p Fu(.)75 2202 y Ft(HISTSIZE)48 b Fu(The)21 b(maxim)o(um)h(n)o(um)o(b)q(er)f(of)g (commands)g(to)f(remem)o(b)q(er)i(on)f(the)g(history)g(list.)39 b(The)315 2257 y(default)16 b(v)m(alue)g(is)g(500.)75 2341 y Ft(HOSTFILE)48 b Fu(Con)o(tains)19 b(the)g(name)g(of)g(a)g (\014le)h(in)g(the)f(same)g(format)f(as)h(`)p Ft(/etc/hosts)p Fu(')e(that)h(should)315 2396 y(b)q(e)k(read)f(when)g(the)g(shell)i (needs)f(to)e(complete)i(a)f(hostname.)37 b(The)21 b(list)h(of)e(p)q (ossible)315 2451 y(hostname)12 b(completions)i(ma)o(y)e(b)q(e)i(c)o (hanged)f(while)h(the)f(shell)h(is)g(running;)g(the)f(next)g(time)315 2506 y(hostname)18 b(completion)i(is)f(attempted)f(after)g(the)g(v)m (alue)i(is)f(c)o(hanged,)h(Bash)e(adds)h(the)315 2560 y(con)o(ten)o(ts)12 b(of)h(the)g(new)g(\014le)h(to)e(the)h(existing)h (list.)20 b(If)13 b Ft(HOSTFILE)e Fu(is)j(set,)f(but)g(has)f(no)h(v)m (alue,)315 2615 y(Bash)20 b(attempts)f(to)h(read)g(`)p Ft(/etc/hosts)p Fu(')e(to)i(obtain)g(the)h(list)g(of)e(p)q(ossible)j (hostname)315 2670 y(completions.)f(When)16 b Ft(HOSTFILE)e Fu(is)h(unset,)g(the)h(hostname)e(list)i(is)g(cleared.)p eop %%Page: 55 57 55 56 bop 75 -58 a Fu(Chapter)15 b(5:)k(Shell)f(V)l(ariables)1230 b(55)75 149 y Ft(HOSTNAME)48 b Fu(The)15 b(name)h(of)e(the)i(curren)o (t)f(host.)75 238 y Ft(HOSTTYPE)48 b Fu(A)15 b(string)g(describing)i (the)f(mac)o(hine)g(Bash)f(is)h(running)g(on.)75 326 y Ft(IGNOREEOF)315 381 y Fu(Con)o(trols)d(the)g(action)h(of)f(the)h (shell)h(on)e(receipt)h(of)g(an)f Ft(EOF)g Fu(c)o(haracter)g(as)g(the)g (sole)h(input.)315 436 y(If)i(set,)f(the)g(v)m(alue)i(denotes)f(the)f (n)o(um)o(b)q(er)h(of)f(consecutiv)o(e)h Ft(EOF)f Fu(c)o(haracters)g (that)g(can)g(b)q(e)315 491 y(read)20 b(as)f(the)h(\014rst)g(c)o (haracter)f(on)g(an)h(input)h(line)h(b)q(efore)e(the)g(shell)h(will)h (exit.)34 b(If)20 b(the)315 546 y(v)m(ariable)g(exists)e(but)h(do)q(es) g(not)f(ha)o(v)o(e)g(a)g(n)o(umeric)h(v)m(alue)h(\(or)d(has)i(no)f(v)m (alue\))h(then)g(the)315 600 y(default)d(is)g(10.)k(If)15 b(the)h(v)m(ariable)h(do)q(es)e(not)g(exist,)h(then)g Ft(EOF)f Fu(signi\014es)h(the)g(end)g(of)f(input)315 655 y(to)g(the)g(shell.)21 b(This)16 b(is)g(only)g(in)g(e\013ect)f(for) f(in)o(teractiv)o(e)i(shells.)75 744 y Ft(INPUTRC)72 b Fu(The)35 b(name)f(of)g(the)g(Readline)i(initialization)h(\014le,)i (o)o(v)o(erriding)c(the)g(default)f(of)315 799 y(`)p Ft(~/.inputrc)p Fu('.)75 887 y Ft(LANG)144 b Fu(Used)14 b(to)g(determine)h(the)f(lo)q(cale)h(category)e(for)h(an)o(y)f (category)g(not)h(sp)q(eci\014cally)j(selected)315 942 y(with)f(a)e(v)m(ariable)j(starting)e(with)g Ft(LC_)p Fu(.)75 1030 y Ft(LC_ALL)96 b Fu(This)15 b(v)m(ariable)h(o)o(v)o (errides)e(the)g(v)m(alue)i(of)e Ft(LANG)g Fu(and)g(an)o(y)g(other)g Ft(LC_)g Fu(v)m(ariable)i(sp)q(ecifying)315 1085 y(a)f(lo)q(cale)h (category)l(.)75 1174 y Ft(LC_COLLATE)315 1228 y Fu(This)j(v)m(ariable) i(determines)e(the)g(collation)h(order)f(used)g(when)h(sorting)e(the)h (results)g(of)315 1283 y(\014lename)g(expansion,)h(and)e(determines)h (the)f(b)q(eha)o(vior)h(of)f(range)f(expressions,)j(equiv-)315 1338 y(alence)f(classes,)f(and)f(collating)i(sequences)f(within)h (\014lename)f(expansion)h(and)e(pattern)315 1393 y(matc)o(hing)e(\(see) g(Section)h(3.5.8)e([Filename)i(Expansion],)f(page)g(20\).)75 1481 y Ft(LC_CTYPE)48 b Fu(This)19 b(v)m(ariable)g(determines)h(the)e (in)o(terpretation)h(of)e(c)o(haracters)h(and)g(the)h(b)q(eha)o(vior)f (of)315 1536 y(c)o(haracter)k(classes)h(within)g(\014lename)h (expansion)f(and)f(pattern)g(matc)o(hing)h(\(see)f(Sec-)315 1591 y(tion)15 b(3.5.8)f([Filename)i(Expansion],)f(page)g(20\).)75 1679 y Ft(LC_MESSAGES)315 1734 y Fu(This)f(v)m(ariable)g(determines)g (the)f(lo)q(cale)i(used)e(to)g(translate)f(double-quoted)j(strings)e (pre-)315 1789 y(ceded)j(b)o(y)f(a)g(`)p Ft($)p Fu(')g(\(see)g(Section) h(3.1.2.5)d([Lo)q(cale)j(T)l(ranslation],)e(page)i(7\).)75 1878 y Ft(LC_NUMERIC)315 1932 y Fu(This)g(v)m(ariable)g(determines)h (the)e(lo)q(cale)h(category)f(used)g(for)g(n)o(um)o(b)q(er)g (formatting.)75 2021 y Ft(LINENO)96 b Fu(The)15 b(line)i(n)o(um)o(b)q (er)f(in)g(the)f(script)h(or)e(shell)j(function)f(curren)o(tly)g (executing.)75 2109 y Ft(LINES)120 b Fu(Used)13 b(b)o(y)f(the)h Ft(select)f Fu(builtin)i(command)f(to)f(determine)h(the)g(column)g (length)h(for)e(prin)o(t-)315 2164 y(ing)k(selection)g(lists.)21 b(Automatically)16 b(set)f(up)q(on)h(receipt)g(of)f(a)g Ft(SIGWINCH)p Fu(.)75 2253 y Ft(MACHTYPE)48 b Fu(A)13 b(string)g(that)f(fully)j(describ)q(es)f(the)g(system)e(t)o(yp)q(e)h (on)g(whic)o(h)h(Bash)f(is)h(executing,)g(in)g(the)315 2307 y(standard)h Fp(gnu)g Fo(cpu-compan)o(y-system)g Fu(format.)75 2396 y Ft(MAILCHECK)315 2451 y Fu(Ho)o(w)e(often)h(\(in)g (seconds\))g(that)f(the)h(shell)h(should)g(c)o(hec)o(k)f(for)f(mail)i (in)f(the)g(\014les)h(sp)q(eci\014ed)315 2506 y(in)h(the)g Ft(MAILPATH)e Fu(or)h Ft(MAIL)g Fu(v)m(ariables.)21 b(The)16 b(default)g(is)g(60)e(seconds.)21 b(When)16 b(it)g(is)g(time)315 2560 y(to)i(c)o(hec)o(k)g(for)g(mail,)h(the)f(shell)i(do)q(es)f(so)e(b) q(efore)i(displa)o(ying)h(the)e(primary)g(prompt.)29 b(If)315 2615 y(this)19 b(v)m(ariable)h(is)f(unset,)g(or)f(set)h(to)e (a)i(v)m(alue)g(that)f(is)h(not)f(a)h(n)o(um)o(b)q(er)f(greater)g(than) g(or)315 2670 y(equal)e(to)f(zero,)f(the)i(shell)g(disables)h(mail)f(c) o(hec)o(king.)p eop %%Page: 56 58 56 57 bop 75 -58 a Fu(56)1285 b(Bash)15 b(Reference)h(Man)o(ual)75 149 y Ft(OLDPWD)96 b Fu(The)15 b(previous)h(w)o(orking)f(directory)h (as)e(set)h(b)o(y)h(the)f Ft(cd)g Fu(builtin.)75 241 y Ft(OPTERR)96 b Fu(If)18 b(set)g(to)f(the)h(v)m(alue)h(1,)f(Bash)g (displa)o(ys)h(error)f(messages)f(generated)h(b)o(y)g(the)g Ft(getopts)315 295 y Fu(builtin)f(command.)75 386 y Ft(OSTYPE)96 b Fu(A)15 b(string)g(describing)i(the)f(op)q(erating)f(system)g(Bash)g (is)h(running)g(on.)75 478 y Ft(PIPESTATUS)315 532 y Fu(An)c(arra)o(y)f(v)m(ariable)i(\(see)e(Section)i(6.7)e([Arra)o(ys],)f (page)i(68\))f(con)o(taining)h(a)f(list)i(of)e(exit)i(sta-)315 587 y(tus)g(v)m(alues)h(from)e(the)h(pro)q(cesses)g(in)h(the)f (most-recen)o(tly-executed)h(foreground)f(pip)q(eline)315 642 y(\(whic)o(h)j(ma)o(y)e(con)o(tain)i(only)f(a)g(single)i (command\).)75 733 y Ft(POSIXLY_CORRECT)315 788 y Fu(If)g(this)g(v)m (ariable)g(is)g(in)h(the)e(en)o(vironmen)o(t)h(when)g Ft(bash)f Fu(starts,)f(the)h(shell)i(en)o(ters)e Fp(posix)315 843 y Fu(mo)q(de)11 b(\(see)g(Section)h(6.11)e([Bash)h(POSIX)h(Mo)q (de],)f(page)g(72\))f(b)q(efore)i(reading)g(the)f(startup)315 897 y(\014les,)16 b(as)g(if)g(the)g(`)p Ft(--posix)p Fu(')e(in)o(v)o(o)q(cation)i(option)g(had)f(b)q(een)i(supplied.)24 b(If)16 b(it)g(is)g(set)f(while)315 952 y(the)g(shell)i(is)f(running,)g Ft(bash)e Fu(enables)j Fp(posix)d Fu(mo)q(de,)i(as)e(if)i(the)f (command)435 1016 y Ft(set)23 b(-o)h(posix)315 1083 y Fu(had)15 b(b)q(een)i(executed.)75 1174 y Ft(PPID)144 b Fu(The)15 b(pro)q(cess)h Fp(id)f Fu(of)g(the)g(shell's)i(paren)o(t)d (pro)q(cess.)21 b(This)15 b(v)m(ariable)i(is)f(readonly)l(.)75 1265 y Ft(PROMPT_COMMAND)315 1320 y Fu(If)g(set,)g(the)g(v)m(alue)h(is) g(in)o(terpreted)g(as)e(a)h(command)g(to)f(execute)i(b)q(efore)f(the)g (prin)o(ting)h(of)315 1375 y(eac)o(h)e(primary)h(prompt)e(\()p Ft($PS1)p Fu(\).)75 1466 y Ft(PS3)168 b Fu(The)17 b(v)m(alue)i(of)e (this)g(v)m(ariable)i(is)e(used)h(as)f(the)g(prompt)g(for)f(the)i Ft(select)e Fu(command.)26 b(If)315 1521 y(this)16 b(v)m(ariable)g(is)g (not)f(set,)f(the)i Ft(select)e Fu(command)h(prompts)g(with)g(`)p Ft(#?)g Fu(')75 1612 y Ft(PS4)168 b Fu(The)17 b(v)m(alue)h(is)f(the)g (prompt)g(prin)o(ted)g(b)q(efore)g(the)g(command)g(line)i(is)e(ec)o(ho) q(ed)h(when)f(the)315 1667 y(`)p Ft(-x)p Fu(')11 b(option)h(is)g(set)f (\(see)h(Section)h(4.3)e([The)g(Set)h(Builtin],)i(page)e(46\).)17 b(The)12 b(\014rst)g(c)o(haracter)315 1721 y(of)17 b Ft(PS4)f Fu(is)i(replicated)h(m)o(ultiple)g(times,)e(as)g(necessary)l (,)h(to)e(indicate)j(m)o(ultiple)g(lev)o(els)f(of)315 1776 y(indirection.)k(The)16 b(default)f(is)h(`)p Ft(+)f Fu('.)75 1867 y Ft(PWD)168 b Fu(The)15 b(curren)o(t)h(w)o(orking)e (directory)i(as)f(set)g(b)o(y)g(the)g Ft(cd)g Fu(builtin.)75 1958 y Ft(RANDOM)96 b Fu(Eac)o(h)14 b(time)h(this)g(parameter)f(is)h (referenced,)g(a)g(random)f(in)o(teger)h(b)q(et)o(w)o(een)f(0)h(and)f (32767)315 2013 y(is)i(generated.)k(Assigning)d(a)e(v)m(alue)h(to)f (this)h(v)m(ariable)h(seeds)f(the)f(random)g(n)o(um)o(b)q(er)h(gen-)315 2068 y(erator.)75 2159 y Ft(REPLY)120 b Fu(The)15 b(default)h(v)m (ariable)h(for)d(the)i Ft(read)e Fu(builtin.)75 2250 y Ft(SECONDS)72 b Fu(This)21 b(v)m(ariable)h(expands)e(to)g(the)h(n)o (um)o(b)q(er)f(of)g(seconds)h(since)g(the)g(shell)h(w)o(as)d(started.) 315 2305 y(Assignmen)o(t)j(to)e(this)i(v)m(ariable)h(resets)d(the)i (coun)o(t)f(to)g(the)g(v)m(alue)h(assigned,)h(and)f(the)315 2360 y(expanded)d(v)m(alue)g(b)q(ecomes)g(the)f(v)m(alue)h(assigned)g (plus)g(the)f(n)o(um)o(b)q(er)g(of)f(seconds)i(since)315 2415 y(the)c(assignmen)o(t.)75 2506 y Ft(SHELLOPTS)315 2560 y Fu(A)g(colon-separated)h(list)g(of)f(enabled)i(shell)f(options.) 21 b(Eac)o(h)15 b(w)o(ord)f(in)i(the)g(list)g(is)f(a)g(v)m(alid)315 2615 y(argumen)o(t)f(for)g(the)g(`)p Ft(-o)p Fu(')g(option)g(to)g(the)h Ft(set)f Fu(builtin)i(command)f(\(see)f(Section)i(4.3)d([The)315 2670 y(Set)h(Builtin],)i(page)f(46\).)j(The)d(options)f(app)q(earing)h (in)h Ft(SHELLOPTS)d Fu(are)h(those)g(rep)q(orted)p eop %%Page: 57 59 57 58 bop 75 -58 a Fu(Chapter)15 b(5:)k(Shell)f(V)l(ariables)1230 b(57)315 149 y(as)14 b(`)p Ft(on)p Fu(')g(b)o(y)h(`)p Ft(set)f(-o)p Fu('.)19 b(If)d(this)f(v)m(ariable)h(is)f(in)h(the)f(en)o (vironmen)o(t)g(when)g(Bash)g(starts)f(up,)315 204 y(eac)o(h)20 b(shell)h(option)f(in)h(the)e(list)i(will)g(b)q(e)g(enabled)g(b)q (efore)f(reading)g(an)o(y)f(startup)g(\014les.)315 259 y(This)d(v)m(ariable)g(is)g(readonly)l(.)75 351 y Ft(SHLVL)120 b Fu(Incremen)o(ted)11 b(b)o(y)g(one)f(eac)o(h)h(time)g(a)f(new)g (instance)i(of)e(Bash)g(is)h(started.)18 b(This)11 b(is)g(in)o(tended) 315 406 y(to)k(b)q(e)g(a)g(coun)o(t)g(of)g(ho)o(w)g(deeply)h(y)o(our)f (Bash)g(shells)i(are)e(nested.)75 498 y Ft(TIMEFORMAT)315 553 y Fu(The)h(v)m(alue)g(of)f(this)h(parameter)f(is)h(used)g(as)f(a)g (format)f(string)i(sp)q(ecifying)h(ho)o(w)e(the)h(tim-)315 608 y(ing)j(information)f(for)g(pip)q(elines)j(pre\014xed)e(with)g(the) f Ft(time)g Fu(reserv)o(ed)g(w)o(ord)g(should)h(b)q(e)315 663 y(displa)o(y)o(ed.)i(The)14 b(`)p Ft(\045)p Fu(')f(c)o(haracter)g (in)o(tro)q(duces)h(an)g(escap)q(e)g(sequence)h(that)e(is)i(expanded)g (to)315 717 y(a)j(time)g(v)m(alue)i(or)d(other)h(information.)29 b(The)18 b(escap)q(e)h(sequences)g(and)g(their)f(meanings)315 772 y(are)d(as)g(follo)o(ws;)g(the)g(braces)g(denote)h(optional)f(p)q (ortions.)315 852 y Ft(\045\045)192 b Fu(A)15 b(literal)i(`)p Ft(\045)p Fu('.)315 932 y Ft(\045[)p Fo(p)q Ft(][l]R)46 b Fu(The)15 b(elapsed)i(time)e(in)h(seconds.)315 1011 y Ft(\045[)p Fo(p)q Ft(][l]U)46 b Fu(The)15 b(n)o(um)o(b)q(er)h(of)f (CPU)g(seconds)g(sp)q(en)o(t)h(in)g(user)f(mo)q(de.)315 1091 y Ft(\045[)p Fo(p)q Ft(][l]S)46 b Fu(The)15 b(n)o(um)o(b)q(er)h (of)f(CPU)g(seconds)g(sp)q(en)o(t)h(in)g(system)f(mo)q(de.)315 1171 y Ft(\045P)192 b Fu(The)15 b(CPU)g(p)q(ercen)o(tage,)g(computed)h (as)f(\(\045U)g Ft(+)g Fu(\045S\))g(/)g(\045R.)315 1250 y(The)d(optional)h Fo(p)g Fu(is)g(a)e(digit)i(sp)q(ecifying)h(the)e (precision,)i(the)e(n)o(um)o(b)q(er)g(of)g(fractional)g(digits)315 1305 y(after)17 b(a)g(decimal)i(p)q(oin)o(t.)28 b(A)18 b(v)m(alue)h(of)e(0)g(causes)h(no)f(decimal)j(p)q(oin)o(t)e(or)f (fraction)g(to)g(b)q(e)315 1360 y(output.)23 b(A)o(t)16 b(most)g(three)h(places)g(after)f(the)g(decimal)i(p)q(oin)o(t)f(ma)o(y) f(b)q(e)h(sp)q(eci\014ed;)i(v)m(alues)315 1415 y(of)c Fo(p)i Fu(greater)d(than)h(3)g(are)g(c)o(hanged)g(to)g(3.)k(If)d Fo(p)h Fu(is)e(not)g(sp)q(eci\014ed,)i(the)e(v)m(alue)i(3)e(is)g(used.) 315 1482 y(The)27 b(optional)h Ft(l)f Fu(sp)q(eci\014es)i(a)e(longer)g (format,)i(including)h(min)o(utes,)g(of)c(the)i(form)315 1537 y Fo(MM)5 b Fu(m)p Fo(SS)p Fu(.)p Fo(FF)s Fu(s.)50 b(The)26 b(v)m(alue)g(of)g Fo(p)h Fu(determines)f(whether)g(or)f(not)g (the)h(fraction)f(is)315 1592 y(included.)315 1659 y(If)15 b(this)h(v)m(ariable)h(is)e(not)g(set,)g(Bash)g(acts)g(as)g(if)g(it)h (had)f(the)g(v)m(alue)435 1723 y Ft ($'\\nreal\\t\0453lR\\nuser\\t\0453lU)o(\\nsys\\t)o(\0453lS')315 1790 y Fu(If)k(the)g(v)m(alue)g(is)h(n)o(ull,)g(no)f(timing)g (information)g(is)g(displa)o(y)o(ed.)32 b(A)18 b(trailing)i(newline)g (is)315 1845 y(added)c(when)g(the)f(format)f(string)h(is)h(displa)o(y)o (ed.)75 1937 y Ft(TMOUT)120 b Fu(If)19 b(set)f(to)g(a)h(v)m(alue)g (greater)f(than)h(zero,)g(the)f(v)m(alue)i(is)f(in)o(terpreted)g(as)g (the)f(n)o(um)o(b)q(er)h(of)315 1992 y(seconds)g(to)g(w)o(ait)f(for)g (input)i(after)e(issuing)i(the)f(primary)g(prompt)g(when)g(the)g(shell) h(is)315 2047 y(in)o(teractiv)o(e.)34 b(Bash)20 b(terminates)g(after)f (that)h(n)o(um)o(b)q(er)g(of)f(seconds)i(if)f(input)h(do)q(es)f(not)315 2102 y(arriv)o(e.)75 2194 y Ft(UID)168 b Fu(The)15 b(n)o(umeric)i(real) e(user)g(id)h(of)f(the)g(curren)o(t)h(user.)k(This)15 b(v)m(ariable)i(is)f(readonly)l(.)p eop %%Page: 58 60 58 59 bop 75 -58 a Fu(58)1285 b(Bash)15 b(Reference)h(Man)o(ual)p eop %%Page: 59 61 59 60 bop 75 -58 a Fu(Chapter)15 b(6:)k(Bash)d(F)l(eatures)1241 b(59)75 149 y Fq(6)41 b(Bash)27 b(F)-7 b(eatures)137 279 y Fu(This)16 b(section)g(describ)q(es)h(features)d(unique)j(to)e (Bash.)75 418 y Fs(6.1)33 b(In)n(v)n(oking)24 b(Bash)195 516 y Ft(bash)f([long-opt])g([-ir])g([-abefhkmnptuvxdBCDHP])e([-o)i Fo(option)p Ft(])h([-O)g Fo(shopt)p 1746 516 14 2 v 16 w(option)p Ft(])g([)p Fo(ar-)195 567 y(gumen)o(t)h Ft(...)o(])195 619 y(bash)e([long-opt])g([-abefhkmnptuvxdBCDHP])e([-o)i Fo(option)p Ft(])h([-O)g Fo(shopt)p 1603 619 V 16 w(option)p Ft(])g(-c)f Fo(string)28 b Ft([)p Fo(ar-)195 671 y(gumen)o(t)d Ft(...)o(])195 723 y(bash)e([long-opt])g(-s)g([-abefhkmnptuvxdBCDHP])e ([-o)j Fo(option)p Ft(])g([-O)f Fo(shopt)p 1674 723 V 16 w(option)p Ft(])h([)p Fo(ar-)195 775 y(gumen)o(t)h Ft(...)o(])137 846 y Fu(In)16 b(addition)f(to)f(the)h(single-c)o (haracter)h(shell)g(command-line)g(options)f(\(see)g(Section)h(4.3)d ([The)i(Set)75 901 y(Builtin],)f(page)f(46\),)e(there)h(are)g(sev)o (eral)h(m)o(ulti-c)o(haracter)f(options)h(that)f(y)o(ou)f(can)i(use.)19 b(These)13 b(options)75 956 y(m)o(ust)i(app)q(ear)h(on)f(the)h(command) f(line)j(b)q(efore)e(the)f(single-c)o(haracter)i(options)e(in)i(order)e (for)g(them)h(to)75 1011 y(b)q(e)g(recognized.)75 1097 y Ft(--dump-po-strings)315 1152 y Fu(A)i(list)h(of)f(all)h (double-quoted)h(strings)e(preceded)i(b)o(y)e(`)p Ft($)p Fu(')f(is)i(prin)o(ted)g(on)f(the)g(standard)315 1206 y(ouput)c(in)h(the)f Fp(gnu)g Ft(gettext)f Fu(PO)h(\(p)q(ortable)g(ob)s (ject\))f(\014le)i(format.)j(Equiv)m(alen)o(t)e(to)d(`)p Ft(-D)p Fu(')315 1261 y(except)j(for)e(the)i(output)f(format.)75 1345 y Ft(--dump-strings)315 1400 y Fu(Equiv)m(alen)o(t)i(to)d(`)p Ft(-D)p Fu('.)75 1484 y Ft(--help)96 b Fu(Displa)o(y)16 b(a)f(usage)g(message)f(on)i(standard)e(output)h(and)h(exit)f (sucessfully)l(.)75 1567 y Ft(--init-file)f Fo(\014lename)75 1622 y Ft(--rcfile)g Fo(\014lename)315 1677 y Fu(Execute)21 b(commands)f(from)g Fo(\014lename)k Fu(\(instead)d(of)f(`)p Ft(~/.bashrc)p Fu('\))f(in)i(an)g(in)o(teractiv)o(e)315 1732 y(shell.)75 1816 y Ft(--login)72 b Fu(Mak)o(e)21 b(this)i(shell)h(act)e(as)g(if)g(it)h(had)f(b)q(een)h(directly)h(in)o (v)o(ok)o(ed)e(b)o(y)g(login.)42 b(When)23 b(the)315 1870 y(shell)g(is)e(in)o(teractiv)o(e,)i(this)e(is)h(equiv)m(alen)o(t)h (to)d(starting)g(a)h(login)h(shell)h(with)e(`)p Ft(exec)14 b(-l)315 1925 y(bash)p Fu('.)32 b(When)20 b(the)f(shell)i(is)f(not)f (in)o(teractiv)o(e,)i(the)e(login)i(shell)g(startup)e(\014les)h(will)h (b)q(e)315 1980 y(executed.)g(`)p Ft(exec)14 b(bash)g(--login)p Fu(')g(will)i(replace)g(the)e(curren)o(t)h(shell)h(with)f(a)f(Bash)h (login)315 2035 y(shell.)34 b(See)20 b(Section)g(6.2)f([Bash)g(Startup) g(Files],)h(page)g(61,)f(for)g(a)g(description)i(of)e(the)315 2090 y(sp)q(ecial)e(b)q(eha)o(vior)f(of)e(a)h(login)h(shell.)75 2174 y Ft(--noediting)315 2228 y Fu(Do)f(not)g(use)g(the)h Fp(gnu)f Fu(Readline)i(library)f(\(see)f(Chapter)g(8)g([Command)g(Line) i(Editing],)315 2283 y(page)e(79\))f(to)h(read)g(command)g(lines)i (when)f(the)f(shell)i(is)e(in)o(teractiv)o(e.)75 2367 y Ft(--noprofile)315 2422 y Fu(Don't)f(load)i(the)f(system-wide)h (startup)f(\014le)h(`)p Ft(/etc/profile)p Fu(')d(or)i(an)o(y)g(of)g (the)g(p)q(ersonal)315 2477 y(initialization)i(\014les)d(`)p Ft(~/.bash_profile)p Fu(',)d(`)p Ft(~/.bash_login)p Fu(',)g(or)i(`)p Ft(~/.profile)p Fu(')e(when)315 2531 y(Bash)k(is)h(in)o(v)o(ok)o(ed)f (as)g(a)g(login)h(shell.)75 2615 y Ft(--norc)96 b Fu(Don't)14 b(read)h(the)h(`)p Ft(~/.bashrc)p Fu(')d(initialization)18 b(\014le)e(in)g(an)f(in)o(teractiv)o(e)h(shell.)22 b(This)15 b(is)h(on)315 2670 y(b)o(y)f(default)h(if)g(the)f(shell)i(is)e(in)o(v)o (ok)o(ed)h(as)f Ft(sh)p Fu(.)p eop %%Page: 60 62 60 61 bop 75 -58 a Fu(60)1285 b(Bash)15 b(Reference)h(Man)o(ual)75 149 y Ft(--posix)72 b Fu(Change)12 b(the)g(b)q(eha)o(vior)h(of)f(Bash)g (where)g(the)g(default)h(op)q(eration)f(di\013ers)h(from)e(the)h Fp(posix)315 204 y Fu(1003.2)h(standard)h(to)f(matc)o(h)h(the)h (standard.)k(This)c(is)g(in)o(tended)h(to)d(mak)o(e)h(Bash)h(b)q(eha)o (v)o(e)315 259 y(as)k(a)g(strict)g(sup)q(erset)g(of)g(that)f(standard.) 32 b(See)20 b(Section)g(6.11)e([Bash)g(POSIX)j(Mo)q(de],)315 314 y(page)15 b(72,)f(for)h(a)g(description)h(of)f(the)g(Bash)h Fp(posix)f Fu(mo)q(de.)75 394 y Ft(--restricted)315 449 y Fu(Mak)o(e)25 b(the)i(shell)g(a)f(restricted)g(shell)i(\(see)e (Section)h(6.10)e([The)h(Restricted)g(Shell],)315 503 y(page)15 b(71\).)75 583 y Ft(--verbose)315 638 y Fu(Equiv)m(alen)o(t)i (to)d(`)p Ft(-v)p Fu('.)19 b(Prin)o(t)c(shell)i(input)f(lines)h(as)e (they're)g(read.)75 718 y Ft(--version)315 773 y Fu(Sho)o(w)f(v)o (ersion)g(information)g(for)f(this)i(instance)g(of)e(Bash)h(on)g(the)g (standard)g(output)g(and)315 828 y(exit)i(successfully)l(.)137 908 y(There)f(are)f(sev)o(eral)h(single-c)o(haracter)g(options)g(that)f (ma)o(y)g(b)q(e)h(supplied)i(at)d(in)o(v)o(o)q(cation)h(whic)o(h)g(are) 75 963 y(not)g(a)o(v)m(ailable)i(with)e(the)g Ft(set)g Fu(builtin.)75 1043 y Ft(-c)g Fo(string)63 b Fu(Read)11 b(and)h(execute)g(commands)f(from)g Fo(string)k Fu(after)10 b(pro)q(cessing)j(the)e(options,)h(then)g(exit.)315 1098 y(An)o(y)18 b(remaining)i(argumen)o(ts)d(are)h(assigned)h(to)f(the)g(p) q(ositional)i(parameters,)e(starting)315 1153 y(with)e Ft($0)p Fu(.)75 1233 y Ft(-i)192 b Fu(F)l(orce)10 b(the)h(shell)h(to)e (run)g(in)o(teractiv)o(ely)l(.)20 b(In)o(teractiv)o(e)11 b(shells)h(are)e(describ)q(ed)i(in)g(Section)f(6.3)315 1288 y([In)o(teractiv)o(e)k(Shells],)h(page)f(63.)75 1368 y Ft(-r)192 b Fu(Mak)o(e)25 b(the)i(shell)g(a)f(restricted)g (shell)i(\(see)e(Section)h(6.10)e([The)h(Restricted)g(Shell],)315 1422 y(page)15 b(71\).)75 1502 y Ft(-s)192 b Fu(If)13 b(this)g(option)f(is)h(presen)o(t,)g(or)f(if)h(no)f(argumen)o(ts)g (remain)h(after)e(option)i(pro)q(cessing,)h(then)315 1557 y(commands)g(are)g(read)g(from)g(the)h(standard)e(input.)21 b(This)15 b(option)g(allo)o(ws)f(the)h(p)q(ositional)315 1612 y(parameters)f(to)h(b)q(e)h(set)f(when)g(in)o(v)o(oking)h(an)f(in) o(teractiv)o(e)h(shell.)75 1692 y Ft(-D)192 b Fu(A)18 b(list)h(of)f(all)h(double-quoted)h(strings)e(preceded)i(b)o(y)e(`)p Ft($)p Fu(')f(is)i(prin)o(ted)g(on)f(the)g(standard)315 1747 y(ouput.)35 b(These)21 b(are)f(the)h(strings)f(that)g(are)g(sub)s (ject)g(to)g(language)g(translation)g(when)315 1802 y(the)f(curren)o(t) f(lo)q(cale)i(is)e(not)h Ft(C)f Fu(or)g Ft(POSIX)f Fu(\(see)i(Section)g (3.1.2.5)d([Lo)q(cale)j(T)l(ranslation],)315 1856 y(page)c(7\).)k(This) d(implies)h(the)f(`)p Ft(-n)p Fu(')e(option;)h(no)g(commands)g(will)i (b)q(e)f(executed.)75 1936 y Ft([-+]O)e([)p Fo(shopt)p 345 1936 14 2 v 17 w(option)p Ft(])315 1991 y Fo(shopt)p 427 1991 V 16 w(option)23 b Fu(is)g(one)f(of)g(the)h(shell)g(options)g (accepted)g(b)o(y)f(the)h Ft(shopt)e Fu(builtin)k(\(see)315 2046 y(Chapter)15 b(4)g([Shell)i(Builtin)g(Commands],)d(page)i(31\).)j (If)c Fo(shopt)p 1430 2046 V 17 w(option)g Fu(is)h(presen)o(t,)f(`)p Ft(-O)p Fu(')315 2101 y(sets)k(the)h(v)m(alue)g(of)f(that)g(option;)i (`)p Ft(+O)p Fu(')d(unsets)i(it.)33 b(If)19 b Fo(shopt)p 1404 2101 V 16 w(option)h Fu(is)g(not)f(supplied,)315 2156 y(the)14 b(names)g(and)g(v)m(alues)h(of)e(the)h(shell)i(options)e (accepted)g(b)o(y)g Ft(shopt)f Fu(are)g(prin)o(ted)i(on)f(the)315 2210 y(standard)i(output.)25 b(If)17 b(the)g(in)o(v)o(o)q(cation)g (option)g(is)h(`)p Ft(+O)p Fu(',)e(the)g(output)h(is)g(displa)o(y)o(ed) i(in)e(a)315 2265 y(format)d(that)g(ma)o(y)h(b)q(e)h(reused)f(as)g (input.)75 2345 y Ft(--)192 b Fu(A)19 b Ft(--)g Fu(signals)h(the)f(end) h(of)e(options)i(and)f(disables)h(further)f(option)h(pro)q(cessing.)32 b(An)o(y)315 2400 y(argumen)o(ts)14 b(after)h(the)g Ft(--)g Fu(are)g(treated)g(as)f(\014lenames)j(and)e(argumen)o(ts.)137 2493 y(A)f Fn(lo)n(gin)i Fu(shell)f(is)f(one)g(whose)f(\014rst)g(c)o (haracter)g(of)g(argumen)o(t)g(zero)h(is)g(`)p Ft(-)p Fu(',)e(or)h(one)h(in)o(v)o(ok)o(ed)g(with)g(the)75 2548 y(`)p Ft(--login)p Fu(')f(option.)137 2615 y(An)g Fn(inter)n(active)i Fu(shell)f(is)f(one)g(started)f(without)g(non-option)h(argumen)o(ts,)f (unless)i(`)p Ft(-s)p Fu(')d(is)i(sp)q(eci\014ed,)75 2670 y(without)21 b(sp)q(ecifying)j(the)d(`)p Ft(-c)p Fu(')g(option,)h(and)g(whose)f(input)i(and)e(output)h(are)f(b)q(oth)g (connected)i(to)p eop %%Page: 61 63 61 62 bop 75 -58 a Fu(Chapter)15 b(6:)k(Bash)d(F)l(eatures)1241 b(61)75 149 y(terminals)12 b(\(as)e(determined)i(b)o(y)f Ft(isatty\(3\))p Fu(\),)f(or)h(one)g(started)f(with)i(the)f(`)p Ft(-i)p Fu(')f(option.)18 b(See)12 b(Section)g(6.3)75 204 y([In)o(teractiv)o(e)j(Shells],)h(page)f(63,)g(for)f(more)h (information.)137 278 y(If)20 b(argumen)o(ts)f(remain)g(after)g(option) h(pro)q(cessing,)h(and)e(neither)i(the)e(`)p Ft(-c)p Fu(')g(nor)g(the)g(`)p Ft(-s)p Fu(')g(option)75 333 y(has)e(b)q(een)h (supplied,)h(the)e(\014rst)f(argumen)o(t)g(is)i(assumed)f(to)f(b)q(e)h (the)g(name)g(of)f(a)h(\014le)h(con)o(taining)f(shell)75 388 y(commands)e(\(see)g(Section)h(3.8)e([Shell)i(Scripts],)f(page)g (29\).)k(When)c(Bash)g(is)h(in)o(v)o(ok)o(ed)f(in)h(this)f(fashion,)75 442 y Ft($0)j Fu(is)i(set)e(to)g(the)h(name)g(of)f(the)h(\014le,)h(and) f(the)g(p)q(ositional)h(parameters)e(are)g(set)h(to)f(the)h(remaining) 75 497 y(argumen)o(ts.)f(Bash)13 b(reads)f(and)h(executes)h(commands)e (from)g(this)h(\014le,)h(then)f(exits.)19 b(Bash's)13 b(exit)g(status)75 552 y(is)h(the)f(exit)h(status)e(of)h(the)g(last)g (command)h(executed)g(in)g(the)f(script.)20 b(If)13 b(no)g(commands)g (are)g(executed,)75 607 y(the)i(exit)h(status)e(is)i(0.)75 751 y Fs(6.2)33 b(Bash)21 b(Startup)j(Files)137 854 y Fu(This)c(section)f(describs)h(ho)o(w)e(Bash)h(executes)g(its)g (startup)g(\014les.)31 b(If)19 b(an)o(y)g(of)f(the)h(\014les)h(exist)f (but)75 909 y(cannot)12 b(b)q(e)i(read,)e(Bash)h(rep)q(orts)f(an)g (error.)19 b(Tildes)14 b(are)e(expanded)h(in)h(\014le)f(names)g(as)f (describ)q(ed)i(ab)q(o)o(v)o(e)75 964 y(under)i(Tilde)h(Expansion)e (\(see)h(Section)g(3.5.2)d([Tilde)k(Expansion],)e(page)g(16\).)137 1037 y(In)o(teractiv)o(e)h(shells)g(are)f(describ)q(ed)i(in)f(Section)h (6.3)d([In)o(teractiv)o(e)h(Shells],)h(page)f(63.)75 1162 y Fm(In)n(v)n(ok)n(ed)22 b(as)e(an)h(in)n(teractiv)n(e)g(login)f (shell,)h(or)f(with)h(`)p Fl(--login)p Fm(')137 1265 y Fu(When)f(Bash)f(is)h(in)o(v)o(ok)o(ed)f(as)g(an)g(in)o(teractiv)o(e) h(login)g(shell,)h(or)e(as)g(a)g(non-in)o(teractiv)o(e)h(shell)h(with) 75 1320 y(the)c(`)p Ft(--login)p Fu(')f(option,)h(it)h(\014rst)f(reads) g(and)g(executes)h(commands)f(from)f(the)i(\014le)g(`)p Ft(/etc/profile)p Fu(',)75 1375 y(if)d(that)e(\014le)i(exists.)20 b(After)14 b(reading)g(that)g(\014le,)h(it)f(lo)q(oks)g(for)g(`)p Ft(~/.bash_profile)p Fu(',)d(`)p Ft(~/.bash_login)p Fu(',)75 1430 y(and)k(`)p Ft(~/.profile)p Fu(',)d(in)j(that)e(order,)h(and)h (reads)f(and)h(executes)g(commands)f(from)g(the)g(\014rst)g(one)h(that) 75 1484 y(exists)g(and)h(is)f(readable.)21 b(The)15 b(`)p Ft(--noprofile)p Fu(')e(option)i(ma)o(y)f(b)q(e)i(used)g(when)f(the)g (shell)i(is)e(started)g(to)75 1539 y(inhibit)i(this)f(b)q(eha)o(vior.) 137 1613 y(When)37 b(a)f(login)i(shell)g(exits,)k(Bash)37 b(reads)f(and)h(executes)g(commands)f(from)g(the)h(\014le)75 1668 y(`)p Ft(~/.bash_logout)p Fu(',)12 b(if)k(it)f(exists.)75 1793 y Fm(In)n(v)n(ok)n(ed)22 b(as)e(an)h(in)n(teractiv)n(e)g (non-login)g(shell)137 1895 y Fu(When)d(an)g(in)o(teractiv)o(e)g(shell) h(that)e(is)h(not)g(a)f(login)i(shell)g(is)f(started,)f(Bash)h(reads)f (and)h(executes)75 1950 y(commands)12 b(from)f(`)p Ft(~/.bashrc)p Fu(',)f(if)j(that)e(\014le)i(exists.)19 b(This)13 b(ma)o(y)e(b)q(e)i (inhibited)i(b)o(y)d(using)g(the)h(`)p Ft(--norc)p Fu(')75 2005 y(option.)20 b(The)15 b(`)p Ft(--rcfile)e Fo(\014le)s Fu(')i(option)g(will)h(force)e(Bash)h(to)f(read)g(and)h(execute)g (commands)f(from)g Fo(\014le)75 2060 y Fu(instead)i(of)f(`)p Ft(~/.bashrc)p Fu('.)137 2133 y(So,)g(t)o(ypically)l(,)h(y)o(our)f(`)p Ft(~/.bash_profile)p Fu(')d(con)o(tains)k(the)f(line)195 2204 y Ft(if)24 b([)f(-f)h(~/.bashrc)f(];)g(then)g(.)h(~/.bashrc;)f(fi) 75 2278 y Fu(after)14 b(\(or)h(b)q(efore\))g(an)o(y)g(login-sp)q (eci\014c)j(initializations.)75 2403 y Fm(In)n(v)n(ok)n(ed)k(non-in)n (teractiv)n(ely)137 2506 y Fu(When)13 b(Bash)f(is)h(started)f(non-in)o (teractiv)o(ely)l(,)i(to)e(run)h(a)f(shell)i(script,)f(for)e(example,)j (it)e(lo)q(oks)h(for)f(the)75 2560 y(v)m(ariable)19 b Ft(BASH_ENV)d Fu(in)i(the)f(en)o(vironmen)o(t,)h(expands)f(its)h(v)m (alue)g(if)g(it)f(app)q(ears)h(there,)f(and)g(uses)h(the)75 2615 y(expanded)e(v)m(alue)h(as)e(the)g(name)g(of)g(a)g(\014le)h(to)f (read)g(and)g(execute.)21 b(Bash)15 b(b)q(eha)o(v)o(es)g(as)g(if)h(the) f(follo)o(wing)75 2670 y(command)g(w)o(ere)g(executed:)p eop %%Page: 62 64 62 63 bop 75 -58 a Fu(62)1285 b(Bash)15 b(Reference)h(Man)o(ual)195 149 y Ft(if)24 b([)f(-n)h("$BASH_ENV")e(];)i(then)f(.)h("$BASH_ENV";)e (fi)75 230 y Fu(but)15 b(the)h(v)m(alue)g(of)f(the)g Ft(PATH)g Fu(v)m(ariable)h(is)g(not)f(used)h(to)e(searc)o(h)h(for)g (the)g(\014le)h(name.)137 311 y(As)k(noted)f(ab)q(o)o(v)o(e,)g(if)h(a)f (non-in)o(teractiv)o(e)h(shell)h(is)f(in)o(v)o(ok)o(ed)f(with)h(the)f (`)p Ft(--login)p Fu(')f(option,)i(Bash)75 365 y(attempts)14 b(to)h(read)g(and)g(execute)h(commands)f(from)g(the)g(login)h(shell)h (startup)d(\014les.)75 504 y Fm(In)n(v)n(ok)n(ed)22 b(with)f(name)f Fl(sh)137 614 y Fu(If)15 b(Bash)g(is)g(in)o(v)o(ok)o(ed)g(with)g(the)g (name)g Ft(sh)p Fu(,)f(it)h(tries)g(to)f(mimic)i(the)f(startup)f(b)q (eha)o(vior)h(of)g(historical)75 668 y(v)o(ersions)g(of)g Ft(sh)g Fu(as)g(closely)h(as)f(p)q(ossible,)i(while)f(conforming)g(to)e (the)h Fp(posix)g Fu(standard)g(as)g(w)o(ell.)137 749 y(When)26 b(in)o(v)o(ok)o(ed)g(as)f(an)h(in)o(teractiv)o(e)g(login)g (shell,)k(or)25 b(as)g(a)g(non-in)o(teractiv)o(e)i(shell)g(with)f(the) 75 804 y(`)p Ft(--login)p Fu(')18 b(option,)j(it)g(\014rst)f(attempts)f (to)g(read)h(and)g(execute)h(commands)f(from)f(`)p Ft(/etc/profile)p Fu(')75 858 y(and)g(`)p Ft(~/.profile)p Fu(',)e(in)j(that)e(order.)30 b(The)19 b(`)p Ft(--noprofile)p Fu(')e(option)i(ma)o(y)f(b)q(e)h(used)g (to)f(inhibit)k(this)75 913 y(b)q(eha)o(vior.)41 b(When)22 b(in)o(v)o(ok)o(ed)h(as)e(an)h(in)o(teractiv)o(e)h(shell)g(with)g(the)f (name)g Ft(sh)p Fu(,)h(Bash)f(lo)q(oks)g(for)g(the)75 968 y(v)m(ariable)d Ft(ENV)p Fu(,)f(expands)h(its)f(v)m(alue)i(if)e(it) g(is)h(de\014ned,)h(and)e(uses)g(the)h(expanded)g(v)m(alue)g(as)f(the)g (name)75 1023 y(of)h(a)g(\014le)h(to)e(read)h(and)h(execute.)32 b(Since)21 b(a)e(shell)i(in)o(v)o(ok)o(ed)e(as)g Ft(sh)g Fu(do)q(es)g(not)g(attempt)f(to)h(read)g(and)75 1078 y(execute)h(commands)g(from)f(an)o(y)h(other)f(startup)g(\014les,)i (the)f(`)p Ft(--rcfile)p Fu(')e(option)i(has)g(no)g(e\013ect.)33 b(A)75 1132 y(non-in)o(teractiv)o(e)15 b(shell)h(in)o(v)o(ok)o(ed)f (with)g(the)f(name)h Ft(sh)f Fu(do)q(es)h(not)f(attempt)f(to)h(read)g (an)o(y)h(other)f(startup)75 1187 y(\014les.)137 1268 y(When)i(in)o(v)o(ok)o(ed)f(as)g Ft(sh)p Fu(,)g(Bash)g(en)o(ters)g Fp(posix)g Fu(mo)q(de)g(after)g(the)g(startup)f(\014les)i(are)f(read.) 75 1406 y Fm(In)n(v)n(ok)n(ed)22 b(in)e Fk(posix)g Fm(mo)r(de)137 1516 y Fu(When)f(Bash)g(is)g(started)f(in)h Fp(posix)g Fu(mo)q(de,)g(as)f(with)h(the)g(`)p Ft(--posix)p Fu(')e(command)h(line) i(option,)g(it)75 1571 y(follo)o(ws)14 b(the)f Fp(posix)h Fu(standard)f(for)g(startup)g(\014les.)20 b(In)14 b(this)g(mo)q(de,)g (in)o(teractiv)o(e)g(shells)h(expand)g(the)e Ft(ENV)75 1626 y Fu(v)m(ariable)19 b(and)f(commands)g(are)f(read)h(and)g (executed)h(from)e(the)g(\014le)i(whose)f(name)g(is)g(the)g(expanded)75 1680 y(v)m(alue.)j(No)15 b(other)g(startup)f(\014les)j(are)d(read.)75 1819 y Fm(In)n(v)n(ok)n(ed)22 b(b)n(y)f(remote)f(shell)h(daemon)137 1929 y Fu(Bash)d(attempts)e(to)g(determine)j(when)f(it)f(is)h(b)q(eing) g(run)g(b)o(y)f(the)h(remote)e(shell)j(daemon,)f(usually)75 1983 y Ft(rshd)p Fu(.)29 b(If)19 b(Bash)g(determines)g(it)g(is)g(b)q (eing)h(run)f(b)o(y)f(rshd,)h(it)g(reads)f(and)h(executes)g(commands)g (from)75 2038 y(`)p Ft(~/.bashrc)p Fu(',)e(if)i(that)f(\014le)h(exists) g(and)g(is)g(readable.)30 b(It)19 b(will)h(not)e(do)h(this)f(if)h(in)o (v)o(ok)o(ed)g(as)f Ft(sh)p Fu(.)30 b(The)75 2093 y(`)p Ft(--norc)p Fu(')16 b(option)i(ma)o(y)f(b)q(e)i(used)f(to)f(inhibit)j (this)f(b)q(eha)o(vior,)f(and)g(the)g(`)p Ft(--rcfile)p Fu(')e(option)i(ma)o(y)f(b)q(e)75 2148 y(used)c(to)g(force)f(another)g (\014le)i(to)e(b)q(e)i(read,)f(but)g Ft(rshd)f Fu(do)q(es)h(not)f (generally)i(in)o(v)o(ok)o(e)f(the)g(shell)h(with)f(those)75 2203 y(options)i(or)g(allo)o(w)g(them)h(to)e(b)q(e)i(sp)q(eci\014ed.)75 2341 y Fm(In)n(v)n(ok)n(ed)22 b(with)f(unequal)g(e\013ectiv)n(e)g(and)f (real)h Fk(uid/gid)p Fm(s)137 2451 y Fu(If)14 b(Bash)g(is)g(started)f (with)h(the)g(e\013ectiv)o(e)g(user)f(\(group\))g(id)i(not)e(equal)h (to)f(the)h(real)g(user)g(\(group\))e(id,)75 2506 y(and)i(the)f Ft(-p)g Fu(option)h(is)g(not)f(supplied,)j(no)e(startup)e(\014les)j (are)e(read,)g(shell)j(functions)e(are)f(not)g(inherited)75 2560 y(from)g(the)h(en)o(vironmen)o(t,)g(the)g Ft(SHELLOPTS)e Fu(v)m(ariable,)k(if)e(it)g(app)q(ears)g(in)h(the)e(en)o(vironmen)o(t,) h(is)h(ignored,)75 2615 y(and)f(the)g(e\013ectiv)o(e)g(user)g(id)h(is)g (set)e(to)g(the)h(real)h(user)f(id.)20 b(If)14 b(the)g Ft(-p)g Fu(option)g(is)g(supplied)j(at)c(in)o(v)o(o)q(cation,)75 2670 y(the)i(startup)g(b)q(eha)o(vior)g(is)h(the)f(same,)g(but)g(the)h (e\013ectiv)o(e)f(user)g(id)h(is)g(not)f(reset.)p eop %%Page: 63 65 63 64 bop 75 -58 a Fu(Chapter)15 b(6:)k(Bash)d(F)l(eatures)1241 b(63)75 149 y Fs(6.3)33 b(In)n(teractiv)n(e)24 b(Shells)75 284 y Fm(6.3.1)30 b(What)20 b(is)h(an)g(In)n(teractiv)n(e)g(Shell?)137 378 y Fu(An)13 b(in)o(teractiv)o(e)g(shell)i(is)e(one)g(started)f (without)g(non-option)i(argumen)o(ts,)e(unless)h(`)p Ft(-s)p Fu(')f(is)h(sp)q(eci\014ed,)75 433 y(without)21 b(sp)q(eci\014ying)h(the)f(`)p Ft(-c)p Fu(')f(option,)h(and)g(whose)f (input)i(and)f(output)f(are)g(b)q(oth)h(connected)h(to)75 487 y(terminals)16 b(\(as)e(determined)j(b)o(y)e Ft(isatty\(3\))p Fu(\),)e(or)i(one)g(started)g(with)g(the)g(`)p Ft(-i)p Fu(')g(option.)137 552 y(An)h(in)o(teractiv)o(e)f(shell)i(generally)f (reads)g(from)e(and)h(writes)h(to)e(a)h(user's)g(terminal.)137 617 y(The)g(`)p Ft(-s)p Fu(')f(in)o(v)o(o)q(cation)h(option)g(ma)o(y)f (b)q(e)h(used)h(to)e(set)g(the)h(p)q(ositional)h(parameters)e(when)h (an)g(in)o(ter-)75 672 y(activ)o(e)g(shell)i(is)f(started.)75 777 y Fm(6.3.2)30 b(Is)20 b(this)h(Shell)g(In)n(teractiv)n(e?)137 871 y Fu(T)l(o)16 b(determine)h(within)g(a)f(startup)g(script)g (whether)g(or)g(not)f(Bash)i(is)f(running)h(in)o(teractiv)o(ely)l(,)h (test)75 926 y(the)j(v)m(alue)h(of)e(the)h(`)p Ft(-)p Fu(')f(sp)q(ecial)j(parameter.)35 b(It)21 b(con)o(tains)g Ft(i)g Fu(when)g(the)g(shell)h(is)g(in)o(teractiv)o(e.)37 b(F)l(or)75 981 y(example:)195 1043 y Ft(case)23 b("$-")h(in)195 1095 y(*i*\))f(echo)h(This)f(shell)g(is)h(interactive)e(;;)195 1147 y(*\))i(echo)f(This)g(shell)g(is)h(not)f(interactive)g(;;)195 1199 y(esac)137 1263 y Fu(Alternativ)o(ely)l(,)14 b(startup)d(scripts)h (ma)o(y)f(examine)i(the)f(v)m(ariable)i Ft(PS1)p Fu(;)e(it)g(is)g (unset)g(in)h(non-in)o(teractiv)o(e)75 1318 y(shells,)j(and)g(set)f(in) h(in)o(teractiv)o(e)f(shells.)22 b(Th)o(us:)195 1380 y Ft(if)i([)f(-z)h("$PS1")f(];)h(then)386 1432 y(echo)f(This)h(shell)f (is)g(not)h(interactive)195 1484 y(else)386 1536 y(echo)f(This)h(shell) f(is)g(interactive)195 1588 y(fi)75 1693 y Fm(6.3.3)30 b(In)n(teractiv)n(e)21 b(Shell)g(Beha)n(vior)137 1787 y Fu(When)16 b(the)f(shell)i(is)f(running)g(in)o(teractiv)o(ely)l(,)g (it)f(c)o(hanges)h(its)f(b)q(eha)o(vior)h(in)g(sev)o(eral)f(w)o(a)o (ys.)100 1852 y(1.)29 b(Startup)18 b(\014les)i(are)e(read)h(and)g (executed)g(as)g(describ)q(ed)h(in)g(Section)f(6.2)f([Bash)g(Startup)h (Files],)165 1907 y(page)c(61.)100 1972 y(2.)29 b(Job)18 b(Con)o(trol)f(\(see)g(Chapter)g(7)g([Job)h(Con)o(trol],)f(page)g(75\)) f(is)i(enabled)h(b)o(y)f(default.)27 b(When)18 b(job)165 2027 y(con)o(trol)f(is)g(in)h(e\013ect,)e(Bash)h(ignores)g(the)g(k)o (eyb)q(oard-generated)g(job)g(con)o(trol)g(signals)g Ft(SIGTTIN)p Fu(,)165 2081 y Ft(SIGTTOU)p Fu(,)d(and)h Ft(SIGTSTP)p Fu(.)100 2146 y(3.)29 b(Bash)19 b(expands)h(and)g(displa)o (ys)h Ft(PS1)e Fu(b)q(efore)g(reading)h(the)g(\014rst)f(line)i(of)e(a)g (command,)h(and)g(ex-)165 2201 y(pands)c(and)f(displa)o(ys)i Ft(PS2)e Fu(b)q(efore)g(reading)h(the)g(second)g(and)f(subsequen)o(t)h (lines)h(of)e(a)g(m)o(ulti-line)165 2256 y(command.)100 2321 y(4.)29 b(Bash)13 b(executes)h(the)f(v)m(alue)h(of)f(the)g Ft(PROMPT_COMMAND)f Fu(v)m(ariable)i(as)f(a)g(command)g(b)q(efore)g (prin)o(ting)165 2376 y(the)i(primary)h(prompt,)e Ft($PS1)g Fu(\(see)i(Section)g(5.2)e([Bash)h(V)l(ariables],)g(page)h(51\).)100 2441 y(5.)29 b(Readline)16 b(\(see)f(Chapter)f(8)h([Command)f(Line)i (Editing],)f(page)g(79\))f(is)h(used)g(to)f(read)h(commands)165 2495 y(from)f(the)i(user's)f(terminal.)100 2560 y(6.)29 b(Bash)18 b(insp)q(ects)i(the)e(v)m(alue)h(of)f(the)g Ft(ignoreeof)f Fu(option)h(to)g Ft(set)d(-o)j Fu(instead)g(of)g (exiting)h(imme-)165 2615 y(diately)g(when)g(it)f(receiv)o(es)h(an)f Ft(EOF)f Fu(on)h(its)h(standard)e(input)i(when)g(reading)f(a)g(command) g(\(see)165 2670 y(Section)e(4.3)e([The)h(Set)h(Builtin],)g(page)f (46\).)p eop %%Page: 64 66 64 65 bop 75 -58 a Fu(64)1285 b(Bash)15 b(Reference)h(Man)o(ual)100 149 y(7.)29 b(Command)22 b(history)g(\(see)f(Section)i(9.1)e([Bash)h (History)g(F)l(acilities],)j(page)d(103\))f(and)h(history)165 204 y(expansion)13 b(\(see)e(Section)i(9.3)e([History)g(In)o (teraction],)h(page)g(105\))e(are)i(enabled)h(b)o(y)f(default.)19 b(Bash)165 259 y(will)13 b(sa)o(v)o(e)e(the)g(command)h(history)f(to)g (the)g(\014le)i(named)f(b)o(y)f Ft($HISTFILE)f Fu(when)i(an)g(in)o (teractiv)o(e)f(shell)165 314 y(exits.)100 382 y(8.)29 b(Alias)16 b(expansion)g(\(see)f(Section)i(6.6)d([Aliases],)h(page)g (67\))f(is)i(p)q(erformed)f(b)o(y)h(default.)100 451 y(9.)29 b(In)13 b(the)f(absence)h(of)f(an)o(y)f(traps,)h(Bash)g (ignores)h Ft(SIGTERM)e Fu(\(see)h(Section)h(3.7.6)e([Signals],)h(page) g(28\).)77 519 y(10.)29 b(In)14 b(the)g(absence)g(of)f(an)o(y)g(traps,) g Ft(SIGINT)f Fu(is)i(caugh)o(t)f(and)h(handled)h(\(\(see)e(Section)h (3.7.6)e([Signals],)165 574 y(page)j(28\).)k Ft(SIGINT)14 b Fu(will)j(in)o(terrupt)f(some)f(shell)h(builtins.)77 642 y(11.)29 b(An)20 b(in)o(teractiv)o(e)h(login)g(shell)h(sends)e(a)g Ft(SIGHUP)g Fu(to)f(all)i(jobs)f(on)g(exit)h(if)f(the)g Ft(hupoxexit)f Fu(shell)165 697 y(option)c(has)g(b)q(een)i(enabled)f (\(see)g(Section)g(3.7.6)d([Signals],)i(page)h(28\).)77 765 y(12.)29 b(The)16 b(`)p Ft(-n)p Fu(')e(in)o(v)o(o)q(cation)i (option)g(is)g(ignored,)g(and)g(`)p Ft(set)e(-n)p Fu(')h(has)h(no)f (e\013ect)g(\(see)h(Section)g(4.3)f([The)165 820 y(Set)g(Builtin],)i (page)e(46\).)77 888 y(13.)29 b(Bash)16 b(will)i(c)o(hec)o(k)e(for)f (mail)i(p)q(erio)q(dically)m(,)h(dep)q(ending)g(on)e(the)g(v)m(alues)i (of)d(the)h Ft(MAIL)p Fu(,)f Ft(MAILPATH)p Fu(,)165 943 y(and)g Ft(MAILCHECK)f Fu(shell)j(v)m(ariables)g(\(see)e(Section)h(5.2) e([Bash)h(V)l(ariables],)h(page)f(51\).)77 1012 y(14.)29 b(Expansion)17 b(errors)f(due)h(to)f(references)h(to)f(un)o(b)q(ound)i (shell)g(v)m(ariables)g(after)d(`)p Ft(set)g(-u)p Fu(')g(has)i(b)q(een) 165 1066 y(enabled)g(will)g(not)d(cause)i(the)f(shell)i(to)d(exit)i (\(see)f(Section)h(4.3)f([The)g(Set)g(Builtin],)i(page)e(46\).)77 1135 y(15.)29 b(The)24 b(shell)i(will)g(not)e(exit)h(on)f(expansion)h (errors)e(caused)i(b)o(y)f Fo(v)m(ar)k Fu(b)q(eing)d(unset)g(or)e(n)o (ull)j(in)165 1190 y Ft(${)p Fo(v)m(ar)s Ft(:?)p Fo(w)o(ord)r Ft(})14 b Fu(expansions)i(\(see)f(Section)h(3.5.3)e([Shell)i(P)o (arameter)e(Expansion],)h(page)g(17\).)77 1258 y(16.)29 b(Redirection)16 b(errors)f(encoun)o(tered)h(b)o(y)f(shell)h(builtins)i (will)f(not)d(cause)i(the)f(shell)i(to)e(exit.)77 1326 y(17.)29 b(When)14 b(running)g(in)g Fp(posix)f Fu(mo)q(de,)h(a)f(sp)q (ecial)i(builtin)h(returning)d(an)h(error)e(status)h(will)i(not)e (cause)165 1381 y(the)i(shell)i(to)e(exit)g(\(see)g(Section)i(6.11)c ([Bash)i(POSIX)i(Mo)q(de],)d(page)h(72\).)77 1450 y(18.)29 b(A)17 b(failed)h Ft(exec)e Fu(will)j(not)d(cause)h(the)g(shell)i(to)d (exit)h(\(see)g(Section)h(4.1)e([Bourne)h(Shell)i(Builtins],)165 1504 y(page)c(31\).)77 1573 y(19.)29 b(P)o(arser)14 b(syn)o(tax)h (errors)f(will)j(not)e(cause)g(the)h(shell)g(to)f(exit.)77 1641 y(20.)29 b(Simple)13 b(sp)q(elling)g(correction)e(for)f(directory) h(argumen)o(ts)f(to)g(the)h Ft(cd)f Fu(builtin)j(is)e(enabled)i(b)o(y)d (default)165 1696 y(\(see)18 b(the)h(description)g(of)f(the)h Ft(cdspell)e Fu(option)h(to)g(the)h Ft(shopt)e Fu(builtin)k(in)e (Section)g(4.2)e([Bash)165 1751 y(Builtins],)g(page)e(36\).)77 1819 y(21.)29 b(The)22 b(shell)g(will)h(c)o(hec)o(k)f(the)f(v)m(alue)i (of)e(the)g Ft(TMOUT)g Fu(v)m(ariable)h(and)g(exit)g(if)f(a)g(command)h (is)f(not)165 1874 y(read)15 b(within)h(the)f(sp)q(eci\014ed)j(n)o(um)o (b)q(er)d(of)g(seconds)g(after)g(prin)o(ting)h Ft($PS1)e Fu(\(see)h(Section)h(5.2)e([Bash)165 1929 y(V)l(ariables],)i(page)f (51\).)75 2063 y Fs(6.4)33 b(Bash)21 b(Conditional)k(Expressions)137 2161 y Fu(Conditional)c(expressions)f(are)f(used)g(b)o(y)g(the)h Ft([[)f Fu(comp)q(ound)h(command)f(and)g(the)g Ft(test)g Fu(and)g Ft([)75 2216 y Fu(builtin)e(commands.)137 2286 y(Expressions)g(ma)o(y)f(b)q(e)h(unary)g(or)f(binary)l(.)24 b(Unary)17 b(expressions)g(are)f(often)h(used)g(to)f(examine)h(the)75 2341 y(status)12 b(of)h(a)f(\014le.)21 b(There)13 b(are)g(string)g(op)q (erators)f(and)h(n)o(umeric)h(comparison)f(op)q(erators)f(as)g(w)o (ell.)21 b(If)13 b(the)75 2395 y Fo(\014le)19 b Fu(argumen)o(t)d(to)f (one)h(of)f(the)h(primaries)h(is)g(of)e(the)h(form)f(`)p Ft(/dev/fd/)p Fo(N)5 b Fu(',)14 b(then)i(\014le)h(descriptor)g Fo(N)j Fu(is)75 2450 y(c)o(hec)o(k)o(ed.)g(If)13 b(the)g Fo(\014le)j Fu(argumen)o(t)d(to)f(one)h(of)g(the)g(primaries)h(is)f (one)g(of)g(`)p Ft(/dev/stdin)p Fu(',)e(`)p Ft(/dev/stdout)p Fu(',)75 2505 y(or)k(`)p Ft(/dev/stderr)p Fu(',)d(\014le)k(descriptor)g (0,)f(1,)f(or)h(2,)f(resp)q(ectiv)o(ely)l(,)j(is)f(c)o(hec)o(k)o(ed.)75 2588 y Ft(-a)f Fo(\014le)120 b Fu(T)l(rue)15 b(if)h Fo(\014le)j Fu(exists.)75 2670 y Ft(-b)c Fo(\014le)120 b Fu(T)l(rue)15 b(if)h Fo(\014le)j Fu(exists)c(and)h(is)f(a)g(blo)q(c)o(k)h(sp)q(ecial) h(\014le.)p eop %%Page: 65 67 65 66 bop 75 -58 a Fu(Chapter)15 b(6:)k(Bash)d(F)l(eatures)1241 b(65)75 149 y Ft(-c)15 b Fo(\014le)120 b Fu(T)l(rue)15 b(if)h Fo(\014le)j Fu(exists)c(and)h(is)f(a)g(c)o(haracter)g(sp)q (ecial)i(\014le.)75 227 y Ft(-d)e Fo(\014le)120 b Fu(T)l(rue)15 b(if)h Fo(\014le)j Fu(exists)c(and)h(is)f(a)g(directory)l(.)75 305 y Ft(-e)g Fo(\014le)120 b Fu(T)l(rue)15 b(if)h Fo(\014le)j Fu(exists.)75 383 y Ft(-f)c Fo(\014le)120 b Fu(T)l(rue)15 b(if)h Fo(\014le)j Fu(exists)c(and)h(is)f(a)g(regular)h(\014le.)75 461 y Ft(-g)f Fo(\014le)120 b Fu(T)l(rue)15 b(if)h Fo(\014le)j Fu(exists)c(and)h(its)f(set-group-id)h(bit)g(is)f(set.)75 539 y Ft(-h)g Fo(\014le)120 b Fu(T)l(rue)15 b(if)h Fo(\014le)j Fu(exists)c(and)h(is)f(a)g(sym)o(b)q(olic)i(link.)75 617 y Ft(-k)e Fo(\014le)120 b Fu(T)l(rue)15 b(if)h Fo(\014le)j Fu(exists)c(and)h(its)f Ft(")p Fu(stic)o(ky)p Ft(")g Fu(bit)h(is)g(set.)75 695 y Ft(-p)f Fo(\014le)120 b Fu(T)l(rue)15 b(if)h Fo(\014le)j Fu(exists)c(and)h(is)f(a)g(named)h(pip)q(e)h(\(FIF)o (O\).)75 773 y Ft(-r)e Fo(\014le)120 b Fu(T)l(rue)15 b(if)h Fo(\014le)j Fu(exists)c(and)h(is)f(readable.)75 851 y Ft(-s)g Fo(\014le)120 b Fu(T)l(rue)15 b(if)h Fo(\014le)j Fu(exists)c(and)h(has)f(a)g(size)h(greater)e(than)h(zero.)75 929 y Ft(-t)g Fo(fd)138 b Fu(T)l(rue)15 b(if)h(\014le)g(descriptor)g Fo(fd)h Fu(is)f(op)q(en)g(and)f(refers)g(to)g(a)f(terminal.)75 1007 y Ft(-u)h Fo(\014le)120 b Fu(T)l(rue)15 b(if)h Fo(\014le)j Fu(exists)c(and)h(its)f(set-user-id)h(bit)g(is)g(set.)75 1085 y Ft(-w)f Fo(\014le)120 b Fu(T)l(rue)15 b(if)h Fo(\014le)j Fu(exists)c(and)h(is)f(writable.)75 1163 y Ft(-x)g Fo(\014le)120 b Fu(T)l(rue)15 b(if)h Fo(\014le)j Fu(exists)c(and)h(is)f(executable.) 75 1241 y Ft(-O)g Fo(\014le)120 b Fu(T)l(rue)15 b(if)h Fo(\014le)j Fu(exists)c(and)h(is)f(o)o(wned)h(b)o(y)f(the)g(e\013ectiv) o(e)h(user)f(id.)75 1319 y Ft(-G)g Fo(\014le)120 b Fu(T)l(rue)15 b(if)h Fo(\014le)j Fu(exists)c(and)h(is)f(o)o(wned)h(b)o(y)f(the)g (e\013ectiv)o(e)h(group)e(id.)75 1397 y Ft(-L)h Fo(\014le)120 b Fu(T)l(rue)15 b(if)h Fo(\014le)j Fu(exists)c(and)h(is)f(a)g(sym)o(b)q (olic)i(link.)75 1475 y Ft(-S)e Fo(\014le)120 b Fu(T)l(rue)15 b(if)h Fo(\014le)j Fu(exists)c(and)h(is)f(a)g(so)q(c)o(k)o(et.)75 1553 y Ft(-N)g Fo(\014le)120 b Fu(T)l(rue)15 b(if)h Fo(\014le)j Fu(exists)c(and)h(has)f(b)q(een)h(mo)q(di\014ed)h(since)f(it)g(w)o(as)e (last)h(read.)75 1631 y Fo(\014le1)20 b Ft(-nt)14 b Fo(\014le2)315 1686 y Fu(T)l(rue)h(if)h Fo(\014le1)k Fu(is)15 b(new)o(er)h (\(according)f(to)f(mo)q(di\014cation)j(date\))e(than)g Fo(\014le2)p Fu(.)75 1764 y Fo(\014le1)20 b Ft(-ot)14 b Fo(\014le2)315 1819 y Fu(T)l(rue)h(if)h Fo(\014le1)k Fu(is)15 b(older)h(than)f Fo(\014le2)p Fu(.)75 1897 y Fo(\014le1)20 b Ft(-ef)14 b Fo(\014le2)315 1951 y Fu(T)l(rue)h(if)h Fo(\014le1)k Fu(and)15 b Fo(\014le2)20 b Fu(ha)o(v)o(e)14 b(the)i(same)f(device)h(and)g(ino)q(de)g(n)o(um)o(b)q(ers.)75 2029 y Ft(-o)f Fo(optname)315 2084 y Fu(T)l(rue)21 b(if)g(shell)h (option)f Fo(optname)i Fu(is)e(enabled.)37 b(The)21 b(list)h(of)e (options)h(app)q(ears)f(in)i(the)315 2139 y(description)12 b(of)d(the)i(`)p Ft(-o)p Fu(')e(option)h(to)g(the)g Ft(set)f Fu(builtin)k(\(see)d(Section)h(4.3)e([The)h(Set)g(Builtin],)315 2194 y(page)15 b(46\).)75 2272 y Ft(-z)g Fo(string)63 b Fu(T)l(rue)15 b(if)h(the)f(length)h(of)f Fo(string)k Fu(is)d(zero.)75 2350 y Ft(-n)f Fo(string)75 2404 y(string)126 b Fu(T)l(rue)15 b(if)h(the)f(length)h(of)f Fo(string)k Fu(is)d(non-zero.)75 2482 y Fo(string1)j Ft(==)14 b Fo(string2)315 2537 y Fu(T)l(rue)h(if)h(the)f(strings)g(are)g(equal.)21 b(`)p Ft(=)p Fu(')14 b(ma)o(y)h(b)q(e)h(used)f(in)h(place)h(of)d(`)p Ft(==)p Fu('.)75 2615 y Fo(string1)19 b Ft(!=)14 b Fo(string2)315 2670 y Fu(T)l(rue)h(if)h(the)f(strings)g(are)g(not)g(equal.)p eop %%Page: 66 68 66 67 bop 75 -58 a Fu(66)1285 b(Bash)15 b(Reference)h(Man)o(ual)75 149 y Fo(string1)j Ft(<)c Fo(string2)315 204 y Fu(T)l(rue)g(if)h Fo(string1)j Fu(sorts)14 b(b)q(efore)h Fo(string2)k Fu (lexicographically)f(in)e(the)f(curren)o(t)g(lo)q(cale.)75 286 y Fo(string1)k Ft(>)c Fo(string2)315 341 y Fu(T)l(rue)g(if)h Fo(string1)j Fu(sorts)14 b(after)g Fo(string2)19 b Fu (lexicographically)f(in)e(the)f(curren)o(t)g(lo)q(cale.)75 423 y Fo(arg1)j Ft(OP)d Fo(arg2)315 478 y Ft(OP)i Fu(is)g(one)g(of)g(`) p Ft(-eq)p Fu(',)f(`)p Ft(-ne)p Fu(',)f(`)p Ft(-lt)p Fu(',)h(`)p Ft(-le)p Fu(',)g(`)p Ft(-gt)p Fu(',)g(or)g(`)p Ft(-ge)p Fu('.)24 b(These)18 b(arithmetic)f(binary)315 533 y(op)q(erators)g(return)h(true)f(if)i Fo(arg1)h Fu(is)e(equal)h (to,)e(not)h(equal)g(to,)g(less)g(than,)g(less)h(than)e(or)315 588 y(equal)e(to,)e(greater)g(than,)h(or)g(greater)f(than)h(or)f(equal) i(to)f Fo(arg2)p Fu(,)e(resp)q(ectiv)o(ely)l(.)22 b Fo(Arg1)17 b Fu(and)315 642 y Fo(arg2)h Fu(ma)o(y)c(b)q(e)i(p)q(ositiv)o(e)g(or)f (negativ)o(e)g(in)o(tegers.)75 777 y Fs(6.5)33 b(Shell)24 b(Arithmetic)137 876 y Fu(The)18 b(shell)h(allo)o(ws)e(arithmetic)h (expressions)g(to)f(b)q(e)h(ev)m(aluated,)h(as)d(one)i(of)f(the)g (shell)i(expansions)75 930 y(or)c(b)o(y)g(the)g Ft(let)g Fu(builtin.)137 1000 y(Ev)m(aluation)k(is)e(done)h(in)g(long)g(in)o (tegers)f(with)h(no)f(c)o(hec)o(k)h(for)f(o)o(v)o(er\015o)o(w,)f (though)h(division)i(b)o(y)e(0)g(is)75 1055 y(trapp)q(ed)f(and)g (\015agged)f(as)h(an)f(error.)21 b(The)16 b(op)q(erators)f(and)h(their) g(precedence)h(and)f(asso)q(ciativit)o(y)g(are)75 1110 y(the)k(same)f(as)g(in)i(the)e(C)h(language.)33 b(The)20 b(follo)o(wing)g(list)h(of)e(op)q(erators)g(is)h(group)q(ed)g(in)o(to)f (lev)o(els)i(of)75 1164 y(equal-precedence)d(op)q(erators.)h(The)c(lev) o(els)i(are)e(listed)h(in)g(order)f(of)g(decreasing)h(precedence.)75 1248 y Fo(id)r Ft(++)g Fo(id)p Ft(--)52 b Fu(v)m(ariable)17 b(p)q(ost-incremen)o(t)f(and)f(p)q(ost-decremen)o(t)75 1330 y Ft(++)p Fo(id)j Ft(--)p Fo(id)52 b Fu(v)m(ariable)17 b(pre-incremen)o(t)f(and)f(pre-decremen)o(t)75 1412 y Ft(-)g(+)177 b Fu(unary)15 b(min)o(us)h(and)f(plus)75 1494 y Ft(!)g(~)177 b Fu(logical)16 b(and)g(bit)o(wise)g(negation)75 1576 y Ft(**)192 b Fu(exp)q(onen)o(tiation)75 1658 y Ft(*)15 b(/)g(\045)138 b Fu(m)o(ultiplication,)17 b(division,)g (remainder)75 1740 y Ft(+)e(-)177 b Fu(addition,)16 b(subtraction)75 1822 y Ft(<<)f(>>)129 b Fu(left)16 b(and)f(righ)o(t)g(bit)o(wise)h (shifts)75 1904 y Ft(<=)f(>=)g(<)g(>)51 b Fu(comparison)75 1986 y Ft(==)15 b(!=)129 b Fu(equalit)o(y)16 b(and)f(inequalit)o(y)75 2068 y Ft(&)216 b Fu(bit)o(wise)16 b(AND)75 2150 y Ft(^)216 b Fu(bit)o(wise)16 b(exclusiv)o(e)h(OR)75 2232 y Ft(|)216 b Fu(bit)o(wise)16 b(OR)75 2314 y Ft(&&)192 b Fu(logical)16 b(AND)75 2396 y Ft(||)192 b Fu(logical)16 b(OR)75 2478 y Ft(expr)f(?)g(expr)f(:)h(expr)315 2533 y Fu(conditional)i(ev)m (aluation)75 2615 y Ft(=)e(*=)g(/=)g(\045=)g(+=)g(-=)f(<<=)h(>>=)g(&=)g (^=)g(|=)315 2670 y Fu(assignmen)o(t)p eop %%Page: 67 69 67 68 bop 75 -58 a Fu(Chapter)15 b(6:)k(Bash)d(F)l(eatures)1241 b(67)75 149 y Ft(expr1)14 b(,)h(expr2)315 204 y Fu(comma)137 283 y(Shell)21 b(v)m(ariables)g(are)e(allo)o(w)o(ed)h(as)f(op)q (erands;)i(parameter)e(expansion)h(is)g(p)q(erformed)f(b)q(efore)h(the) 75 337 y(expression)g(is)g(ev)m(aluated.)32 b(Within)21 b(an)e(expression,)h(shell)h(v)m(ariables)g(ma)o(y)d(also)h(b)q(e)h (referenced)g(b)o(y)75 392 y(name)c(without)h(using)f(the)h(parameter)e (expansion)i(syn)o(tax.)23 b(The)16 b(v)m(alue)i(of)e(a)f(v)m(ariable)j (is)f(ev)m(aluated)75 447 y(as)d(an)g(arithmetic)h(expression)g(when)f (it)h(is)f(referenced.)21 b(A)14 b(shell)i(v)m(ariable)f(need)g(not)f (ha)o(v)o(e)f(its)i(in)o(teger)75 502 y(attribute)g(turned)h(on)f(to)f (b)q(e)i(used)g(in)g(an)f(expression.)137 568 y(Constan)o(ts)20 b(with)g(a)h(leading)h(0)e(are)g(in)o(terpreted)i(as)e(o)q(ctal)g(n)o (um)o(b)q(ers.)37 b(A)20 b(leading)i(`)p Ft(0x)p Fu(')e(or)g(`)p Ft(0X)p Fu(')75 623 y(denotes)c(hexadecimal.)22 b(Otherwise,)16 b(n)o(um)o(b)q(ers)f(tak)o(e)g(the)g(form)g([)p Fo(base)s Ft(#)p Fu(])p Fo(n)p Fu(,)f(where)i Fo(base)i Fu(is)d(a)g(decimal)75 678 y(n)o(um)o(b)q(er)f(b)q(et)o(w)o(een)g(2)f(and)h(64)f(represen)o (ting)h(the)g(arithmetic)g(base,)g(and)g Fo(n)g Fu(is)g(a)f(n)o(um)o(b) q(er)h(in)g(that)f(base.)75 733 y(If)20 b Fo(base)s Ft(#)g Fu(is)g(omitted,)h(then)f(base)g(10)f(is)h(used.)35 b(The)20 b(digits)h(greater)e(than)h(9)f(are)h(represen)o(ted)g(b)o(y)75 788 y(the)d(lo)o(w)o(ercase)f(letters,)h(the)g(upp)q(ercase)g(letters,) g(`)p Ft(@)p Fu(',)f(and)h(`)p Ft(_)p Fu(',)f(in)h(that)f(order.)24 b(If)17 b Fo(base)j Fu(is)d(less)g(than)75 842 y(or)h(equal)i(to)e(36,) h(lo)o(w)o(ercase)g(and)g(upp)q(ercase)h(letters)f(ma)o(y)f(b)q(e)i (used)f(in)o(terc)o(hangably)h(to)e(represen)o(t)75 897 y(n)o(um)o(b)q(ers)d(b)q(et)o(w)o(een)h(10)f(and)g(35.)137 964 y(Op)q(erators)22 b(are)h(ev)m(aluated)g(in)g(order)g(of)f (precedence.)43 b(Sub-expressions)24 b(in)g(paren)o(theses)e(are)75 1019 y(ev)m(aluated)16 b(\014rst)f(and)g(ma)o(y)g(o)o(v)o(erride)g(the) g(precedence)i(rules)f(ab)q(o)o(v)o(e.)75 1145 y Fs(6.6)33 b(Aliases)137 1241 y Fo(Aliases)18 b Fu(allo)o(w)d(a)g(string)g(to)f(b) q(e)i(substituted)f(for)f(a)h(w)o(ord)f(when)i(it)f(is)g(used)h(as)e (the)h(\014rst)g(w)o(ord)f(of)g(a)75 1296 y(simple)j(command.)23 b(The)16 b(shell)h(main)o(tains)g(a)e(list)i(of)f(aliases)g(that)g(ma)o (y)f(b)q(e)h(set)g(and)g(unset)h(with)f(the)75 1351 y Ft(alias)e Fu(and)i Ft(unalias)e Fu(builtin)k(commands.)137 1417 y(The)d(\014rst)g(w)o(ord)f(of)g(eac)o(h)h(simple)h(command,)f(if) g(unquoted,)g(is)g(c)o(hec)o(k)o(ed)h(to)e(see)h(if)g(it)g(has)g(an)g (alias.)75 1472 y(If)i(so,)g(that)g(w)o(ord)f(is)i(replaced)h(b)o(y)e (the)g(text)g(of)f(the)i(alias.)26 b(The)18 b(alias)f(name)h(and)f(the) g(replacemen)o(t)75 1527 y(text)f(ma)o(y)g(con)o(tain)g(an)o(y)g(v)m (alid)i(shell)g(input,)g(including)h(shell)f(metac)o(haracters,)d(with) h(the)h(exception)75 1582 y(that)f(the)h(alias)h(name)f(ma)o(y)g(not)f (con)o(tain)h(`)p Ft(=)p Fu('.)25 b(The)17 b(\014rst)g(w)o(ord)f(of)h (the)g(replacemen)o(t)h(text)e(is)i(tested)75 1636 y(for)13 b(aliases,)h(but)f(a)g(w)o(ord)g(that)f(is)i(iden)o(tical)h(to)e(an)g (alias)h(b)q(eing)g(expanded)h(is)e(not)g(expanded)h(a)f(second)75 1691 y(time.)20 b(This)15 b(means)f(that)g(one)h(ma)o(y)e(alias)i Ft(ls)g Fu(to)e Ft("ls)i(-F")p Fu(,)f(for)g(instance,)h(and)f(Bash)h (do)q(es)g(not)f(try)g(to)75 1746 y(recursiv)o(ely)k(expand)f(the)f (replacemen)o(t)i(text.)23 b(If)17 b(the)f(last)g(c)o(haracter)g(of)g (the)h(alias)g(v)m(alue)h(is)f(a)f(space)75 1801 y(or)g(tab)f(c)o (haracter,)g(then)i(the)f(next)g(command)g(w)o(ord)f(follo)o(wing)i (the)f(alias)h(is)f(also)g(c)o(hec)o(k)o(ed)h(for)e(alias)75 1856 y(expansion.)137 1922 y(Aliases)g(are)f(created)g(and)h(listed)g (with)f(the)g Ft(alias)g Fu(command,)g(and)g(remo)o(v)o(ed)f(with)i (the)f Ft(unalias)75 1977 y Fu(command.)137 2044 y(There)23 b(is)g(no)f(mec)o(hanism)h(for)f(using)h(argumen)o(ts)f(in)h(the)g (replacemen)o(t)g(text,)g(as)f(in)i Ft(csh)p Fu(.)41 b(If)75 2098 y(argumen)o(ts)18 b(are)g(needed,)i(a)e(shell)i(function)g (should)f(b)q(e)g(used)g(\(see)g(Section)g(3.3)f([Shell)i(F)l (unctions],)75 2153 y(page)15 b(12\).)137 2220 y(Aliases)j(are)e(not)g (expanded)h(when)g(the)f(shell)i(is)f(not)f(in)o(teractiv)o(e,)h (unless)g(the)g Ft(expand_aliases)75 2275 y Fu(shell)g(option)e(is)h (set)f(using)h Ft(shopt)e Fu(\(see)h(Section)i(4.2)d([Bash)h (Builtins],)h(page)f(36\).)137 2341 y(The)20 b(rules)h(concerning)f (the)g(de\014nition)i(and)d(use)h(of)f(aliases)i(are)e(somewhat)g (confusing.)34 b(Bash)75 2396 y(alw)o(a)o(ys)20 b(reads)g(at)g(least)h (one)f(complete)h(line)h(of)f(input)g(b)q(efore)g(executing)g(an)o(y)g (of)f(the)g(commands)75 2451 y(on)h(that)g(line.)39 b(Aliases)22 b(are)f(expanded)h(when)g(a)f(command)g(is)h(read,)g(not)f(when)g(it)h (is)f(executed.)75 2506 y(Therefore,)g(an)e(alias)i(de\014nition)h(app) q(earing)e(on)g(the)g(same)g(line)h(as)f(another)f(command)h(do)q(es)g (not)75 2560 y(tak)o(e)14 b(e\013ect)g(un)o(til)i(the)f(next)f(line)i (of)f(input)g(is)g(read.)20 b(The)15 b(commands)f(follo)o(wing)h(the)g (alias)g(de\014nition)75 2615 y(on)f(that)e(line)k(are)d(not)g (a\013ected)g(b)o(y)h(the)g(new)f(alias.)20 b(This)14 b(b)q(eha)o(vior)h(is)f(also)f(an)h(issue)g(when)g(functions)75 2670 y(are)d(executed.)20 b(Aliases)12 b(are)f(expanded)h(when)g(a)f (function)h(de\014nition)h(is)f(read,)g(not)f(when)h(the)f(function)p eop %%Page: 68 70 68 69 bop 75 -58 a Fu(68)1285 b(Bash)15 b(Reference)h(Man)o(ual)75 149 y(is)d(executed,)h(b)q(ecause)f(a)g(function)g(de\014nition)i(is)e (itself)g(a)g(comp)q(ound)g(command.)19 b(As)13 b(a)f(consequence,)75 204 y(aliases)18 b(de\014ned)g(in)g(a)f(function)h(are)f(not)g(a)o(v)m (ailable)h(un)o(til)h(after)d(that)g(function)i(is)g(executed.)26 b(T)l(o)17 b(b)q(e)75 259 y(safe,)i(alw)o(a)o(ys)g(put)g(alias)h (de\014nitions)h(on)e(a)g(separate)g(line,)i(and)e(do)g(not)g(use)h Ft(alias)e Fu(in)i(comp)q(ound)75 314 y(commands.)137 385 y(F)l(or)15 b(almost)g(ev)o(ery)g(purp)q(ose,)g(shell)i(functions)f (are)f(preferred)g(o)o(v)o(er)g(aliases.)75 523 y Fs(6.7)33 b(Arra)n(ys)137 623 y Fu(Bash)17 b(pro)o(vides)g(one-dimensional)i (arra)o(y)c(v)m(ariables.)25 b(An)o(y)17 b(v)m(ariable)h(ma)o(y)e(b)q (e)h(used)g(as)f(an)h(arra)o(y;)75 678 y(the)d Ft(declare)g Fu(builtin)i(will)g(explicitly)h(declare)e(an)g(arra)o(y)l(.)j(There)d (is)f(no)h(maxim)o(um)f(limit)h(on)g(the)f(size)75 733 y(of)e(an)h(arra)o(y)l(,)f(nor)h(an)o(y)f(requiremen)o(t)i(that)e(mem)o (b)q(ers)h(b)q(e)g(indexed)i(or)d(assigned)i(con)o(tiguously)l(.)20 b(Arra)o(ys)75 788 y(are)15 b(zero-based.)137 859 y(An)h(arra)o(y)e(is) h(created)h(automatically)f(if)h(an)o(y)f(v)m(ariable)h(is)g(assigned)g (to)e(using)i(the)g(syn)o(tax)195 927 y Ft(name[)p Fo(subscript)q Ft(]=)p Fo(v)m(alue)75 998 y Fu(The)d Fo(subscript)h Fu(is)f(treated)f(as)h(an)f(arithmetic)h(expression)h(that)d(m)o(ust)h (ev)m(aluate)i(to)e(a)g(n)o(um)o(b)q(er)h(greater)75 1053 y(than)i(or)g(equal)h(to)e(zero.)20 b(T)l(o)15 b(explicitly)j (declare)e(an)f(arra)o(y)l(,)f(use)195 1121 y Ft(declare)23 b(-a)g Fo(name)75 1192 y Fu(The)15 b(syn)o(tax)195 1260 y Ft(declare)23 b(-a)g Fo(name)s Ft([)p Fo(subscript)q Ft(])75 1331 y Fu(is)15 b(also)g(accepted;)g(the)g Fo(subscript)h Fu(is)g(ignored.)k(A)o(ttributes)14 b(ma)o(y)g(b)q(e)i(sp)q(eci\014ed)g (for)f(an)f(arra)o(y)g(v)m(ariable)75 1386 y(using)21 b(the)f Ft(declare)g Fu(and)g Ft(readonly)f Fu(builtins.)38 b(Eac)o(h)20 b(attribute)g(applies)i(to)e(all)h(mem)o(b)q(ers)f(of)g (an)75 1441 y(arra)o(y)l(.)137 1512 y(Arra)o(ys)14 b(are)h(assigned)h (to)f(using)h(comp)q(ound)g(assignmen)o(ts)f(of)f(the)i(form)195 1580 y Ft(name=\(value)p Fo(1)26 b Ft(...)d(value)p Fo(n)p Ft(\))75 1651 y Fu(where)15 b(eac)o(h)g Fo(v)m(alue)k Fu(is)d(of)e(the)h(form)g Ft([[)p Fo(subscript)q Ft(]=])p Fo(string)p Fu(.)20 b(If)15 b(the)g(optional)h(subscript)f(is)h (supplied,)75 1706 y(that)k(index)i(is)g(assigned)f(to;)i(otherwise)e (the)f(index)j(of)d(the)h(elemen)o(t)g(assigned)h(is)f(the)g(last)g (index)75 1761 y(assigned)f(to)g(b)o(y)f(the)h(statemen)o(t)f(plus)i (one.)34 b(Indexing)21 b(starts)e(at)g(zero.)33 b(This)21 b(syn)o(tax)e(is)h(also)g(ac-)75 1816 y(cepted)h(b)o(y)e(the)h Ft(declare)f Fu(builtin.)36 b(Individual)22 b(arra)o(y)d(elemen)o(ts)h (ma)o(y)f(b)q(e)i(assigned)f(to)f(using)i(the)75 1870 y Ft(name[)p Fo(subscript)q Ft(]=)p Fo(v)m(alue)e Fu(syn)o(tax)14 b(in)o(tro)q(duced)j(ab)q(o)o(v)o(e.)137 1941 y(An)o(y)g(elemen)o(t)g (of)g(an)f(arra)o(y)g(ma)o(y)g(b)q(e)h(referenced)h(using)f Ft(${name[)p Fo(subscript)q Ft(]})p Fu(.)25 b(The)16 b(braces)h(are)75 1996 y(required)f(to)e(a)o(v)o(oid)g(con\015icts)i (with)f(the)f(shell's)i(\014lename)g(expansion)g(op)q(erators.)i(If)d (the)g Fo(subscript)h Fu(is)75 2051 y(`)p Ft(@)p Fu(')e(or)g(`)p Ft(*)p Fu(',)f(the)i(w)o(ord)f(expands)h(to)f(all)h(mem)o(b)q(ers)g(of) f(the)h(arra)o(y)e Fo(name)p Fu(.)20 b(These)15 b(subscripts)g (di\013er)g(only)75 2106 y(when)k(the)f(w)o(ord)g(app)q(ears)g(within)i (double)f(quotes.)29 b(If)18 b(the)h(w)o(ord)e(is)i(double-quoted,)h Ft(${name[*]})75 2161 y Fu(expands)11 b(to)f(a)g(single)h(w)o(ord)f (with)g(the)h(v)m(alue)g(of)f(eac)o(h)h(arra)o(y)e(mem)o(b)q(er)h (separated)g(b)o(y)g(the)h(\014rst)f(c)o(haracter)75 2215 y(of)19 b(the)g Ft(IFS)f Fu(v)m(ariable,)j(and)e Ft(${name[@]})f Fu(expands)h(eac)o(h)g(elemen)o(t)h(of)e Fo(name)k Fu(to)c(a)h(separate)f(w)o(ord.)75 2270 y(When)f(there)f(are) g(no)h(arra)o(y)e(mem)o(b)q(ers,)i Ft(${name[@]})e Fu(expands)i(to)e (nothing.)25 b(This)17 b(is)f(analogous)h(to)75 2325 y(the)h(expansion)g(of)f(the)h(sp)q(ecial)h(parameters)e(`)p Ft(@)p Fu(')g(and)h(`)p Ft(*)p Fu('.)26 b Ft(${#name[)p Fo(subscript)q Ft(]})17 b Fu(expands)h(to)f(the)75 2380 y(length)k(of)f Ft(${name[)p Fo(subscript)q Ft(]})p Fu(.)34 b(If)21 b Fo(subscript)h Fu(is)e(`)p Ft(@)p Fu(')g(or)f(`)p Ft(*)p Fu(',)h(the)h(expansion)g(is)g(the)f(n)o(um)o(b)q(er)g(of)75 2435 y(elemen)o(ts)f(in)g(the)f(arra)o(y)l(.)28 b(Referencing)20 b(an)e(arra)o(y)f(v)m(ariable)i(without)g(a)f(subscript)h(is)g(equiv)m (alen)o(t)h(to)75 2489 y(referencing)c(elemen)o(t)g(zero.)137 2560 y(The)h Ft(unset)f Fu(builtin)j(is)e(used)g(to)f(destro)o(y)g (arra)o(ys.)23 b Ft(unset)16 b Fo(name)s Fu([)p Fo(subscript)q Fu(])h(destro)o(ys)e(the)i(arra)o(y)75 2615 y(elemen)o(t)e(at)f(index)h Fo(subscript)p Fu(.)21 b Ft(unset)14 b Fo(name)p Fu(,)g(where)g Fo(name)j Fu(is)e(an)f(arra)o(y)l(,)g(remo)o(v)o(es)f(the)i(en)o(tire)f (arra)o(y)l(.)75 2670 y(A)h(subscript)h(of)f(`)p Ft(*)p Fu(')f(or)h(`)p Ft(@)p Fu(')f(also)h(remo)o(v)o(es)g(the)g(en)o(tire)h (arra)o(y)l(.)p eop %%Page: 69 71 69 70 bop 75 -58 a Fu(Chapter)15 b(6:)k(Bash)d(F)l(eatures)1241 b(69)137 149 y(The)12 b Ft(declare)p Fu(,)f Ft(local)p Fu(,)g(and)h Ft(readonly)e Fu(builtins)k(eac)o(h)e(accept)g(a)f(`)p Ft(-a)p Fu(')f(option)i(to)f(sp)q(ecify)i(an)e(arra)o(y)l(.)75 204 y(The)i Ft(read)f Fu(builtin)i(accepts)f(a)f(`)p Ft(-a)p Fu(')g(option)g(to)g(assign)h(a)f(list)h(of)f(w)o(ords)g(read)h (from)e(the)i(standard)f(input)75 259 y(to)17 b(an)h(arra)o(y)l(,)g (and)g(can)g(read)g(v)m(alues)h(from)f(the)g(standard)g(input)h(in)o (to)f(individual)j(arra)o(y)c(elemen)o(ts.)75 314 y(The)e Ft(set)g Fu(and)g Ft(declare)g Fu(builtins)i(displa)o(y)f(arra)o(y)e(v) m(alues)i(in)g(a)f(w)o(a)o(y)f(that)h(allo)o(ws)g(them)g(to)g(b)q(e)g (reused)75 369 y(as)g(input.)75 506 y Fs(6.8)33 b(The)22 b(Directory)h(Stac)n(k)137 606 y Fu(The)14 b(directory)f(stac)o(k)g(is) g(a)g(list)h(of)f(recen)o(tly-visited)j(directories.)k(The)13 b Ft(pushd)g Fu(builtin)i(adds)f(direc-)75 661 y(tories)e(to)f(the)h (stac)o(k)f(as)h(it)g(c)o(hanges)g(the)g(curren)o(t)g(directory)l(,)h (and)f(the)g Ft(popd)f Fu(builtin)k(remo)o(v)o(es)c(sp)q(eci\014ed)75 716 y(directories)k(from)f(the)g(stac)o(k)f(and)i(c)o(hanges)f(the)g (curren)o(t)g(directory)g(to)g(the)g(directory)h(remo)o(v)o(ed.)k(The) 75 771 y Ft(dirs)c Fu(builtin)i(displa)o(ys)f(the)g(con)o(ten)o(ts)e (of)h(the)g(directory)h(stac)o(k.)137 842 y(The)i(con)o(ten)o(ts)g(of)f (the)h(directory)g(stac)o(k)g(are)f(also)h(visible)i(as)e(the)g(v)m (alue)h(of)f(the)g Ft(DIRSTACK)e Fu(shell)75 896 y(v)m(ariable.)75 1016 y Fm(6.8.1)30 b(Directory)21 b(Stac)n(k)g(Builtins)75 1130 y Ft(dirs)435 1196 y(dirs)i([+)p Fo(N)29 b Ft(|)24 b(-)p Fo(N)5 b Ft(])23 b([-clpv])315 1265 y Fu(Displa)o(y)17 b(the)g(list)h(of)e(curren)o(tly)i(remem)o(b)q(ered)f(directories.)26 b(Directories)18 b(are)e(added)i(to)315 1320 y(the)c(list)h(with)f(the) h Ft(pushd)e Fu(command;)h(the)g Ft(popd)f Fu(command)h(remo)o(v)o(es)g (directories)h(from)315 1375 y(the)g(list.)315 1458 y Ft(+)p Fo(N)182 b Fu(Displa)o(ys)11 b(the)g Fo(N)5 b Fu(th)11 b(directory)g(\(coun)o(ting)g(from)f(the)h(left)g(of)g(the)g (list)g(prin)o(ted)555 1513 y(b)o(y)k Ft(dirs)g Fu(when)g(in)o(v)o(ok)o (ed)h(without)f(options\),)g(starting)f(with)i(zero.)315 1596 y Ft(-)p Fo(N)182 b Fu(Displa)o(ys)24 b(the)f Fo(N)5 b Fu(th)23 b(directory)g(\(coun)o(ting)h(from)e(the)h(righ)o(t)g(of)g (the)g(list)555 1651 y(prin)o(ted)14 b(b)o(y)e Ft(dirs)g Fu(when)i(in)o(v)o(ok)o(ed)f(without)f(options\),)h(starting)f(with)h (zero.)315 1734 y Ft(-c)192 b Fu(Clears)15 b(the)h(directory)f(stac)o (k)f(b)o(y)i(deleting)g(all)g(of)f(the)g(elemen)o(ts.)315 1818 y Ft(-l)192 b Fu(Pro)q(duces)16 b(a)g(longer)g(listing;)h(the)e (default)i(listing)g(format)d(uses)i(a)g(tilde)h(to)555 1873 y(denote)e(the)h(home)f(directory)l(.)315 1956 y Ft(-p)192 b Fu(Causes)15 b Ft(dirs)g Fu(to)f(prin)o(t)i(the)f (directory)g(stac)o(k)g(with)g(one)h(en)o(try)e(p)q(er)i(line.)315 2039 y Ft(-v)192 b Fu(Causes)18 b Ft(dirs)g Fu(to)f(prin)o(t)i(the)f (directory)g(stac)o(k)f(with)i(one)f(en)o(try)g(p)q(er)h(line,)555 2094 y(pre\014xing)d(eac)o(h)g(en)o(try)e(with)i(its)f(index)i(in)f (the)f(stac)o(k.)75 2177 y Ft(popd)435 2244 y(popd)23 b([+)p Fo(N)29 b Ft(|)24 b(-)p Fo(N)5 b Ft(])23 b([-n])315 2313 y Fu(Remo)o(v)o(e)11 b(the)h(top)g(en)o(try)f(from)h(the)g (directory)g(stac)o(k,)g(and)g Ft(cd)f Fu(to)h(the)g(new)g(top)g (directory)l(.)315 2367 y(When)17 b(no)f(argumen)o(ts)f(are)h(giv)o (en,)h Ft(popd)e Fu(remo)o(v)o(es)g(the)i(top)f(directory)g(from)f(the) i(stac)o(k)315 2422 y(and)f(p)q(erforms)f(a)h Ft(cd)f Fu(to)g(the)h(new)g(top)f(directory)l(.)22 b(The)16 b(elemen)o(ts)g (are)f(n)o(um)o(b)q(ered)i(from)315 2477 y(0)c(starting)g(at)f(the)i (\014rst)f(directory)g(listed)i(with)e Ft(dirs)p Fu(;)g(i.e.,)g Ft(popd)g Fu(is)h(equiv)m(alen)o(t)h(to)e Ft(popd)315 2532 y(+0)p Fu(.)315 2615 y Ft(+)p Fo(N)182 b Fu(Remo)o(v)o(es)9 b(the)h Fo(N)5 b Fu(th)10 b(directory)h(\(coun)o(ting)f(from)f(the)i (left)f(of)g(the)g(list)h(prin)o(ted)555 2670 y(b)o(y)k Ft(dirs)p Fu(\),)f(starting)h(with)g(zero.)p eop %%Page: 70 72 70 71 bop 75 -58 a Fu(70)1285 b(Bash)15 b(Reference)h(Man)o(ual)315 149 y Ft(-)p Fo(N)182 b Fu(Remo)o(v)o(es)21 b(the)i Fo(N)5 b Fu(th)22 b(directory)h(\(coun)o(ting)f(from)g(the)g(righ)o(t)h(of)f (the)g(list)555 204 y(prin)o(ted)16 b(b)o(y)f Ft(dirs)p Fu(\),)f(starting)h(with)g(zero.)315 283 y Ft(-n)192 b Fu(Suppresses)16 b(the)f(normal)f(c)o(hange)h(of)f(directory)h(when)h (remo)o(ving)e(directo-)555 338 y(ries)i(from)e(the)h(stac)o(k,)f(so)h (that)g(only)h(the)f(stac)o(k)f(is)i(manipulated.)75 441 y Ft(pushd)435 505 y(pushd)23 b([)p Fo(dir)28 b Ft(|)c(+)p Fo(N)k Ft(|)c Fo(-N)5 b Ft(])24 b([-n])315 571 y Fu(Sa)o(v)o(e)14 b(the)g(curren)o(t)g(directory)g(on)h(the)f(top)g(of)f(the)i(directory) f(stac)o(k)f(and)i(then)f Ft(cd)g Fu(to)g Fo(dir)p Fu(.)315 626 y(With)h(no)h(argumen)o(ts,)e Ft(pushd)g Fu(exc)o(hanges)h(the)h (top)e(t)o(w)o(o)g(directories.)315 705 y Ft(+)p Fo(N)182 b Fu(Brings)15 b(the)f Fo(N)5 b Fu(th)14 b(directory)h(\(coun)o(ting)f (from)g(the)g(left)h(of)f(the)g(list)h(prin)o(ted)555 760 y(b)o(y)i Ft(dirs)p Fu(,)g(starting)f(with)i(zero\))e(to)h(the)g (top)g(of)f(the)i(list)g(b)o(y)f(rotating)f(the)555 814 y(stac)o(k.)315 893 y Ft(-)p Fo(N)182 b Fu(Brings)12 b(the)g Fo(N)5 b Fu(th)11 b(directory)h(\(coun)o(ting)f(from)g(the)h (righ)o(t)f(of)g(the)h(list)g(prin)o(ted)555 948 y(b)o(y)17 b Ft(dirs)p Fu(,)g(starting)f(with)i(zero\))e(to)h(the)g(top)g(of)f (the)i(list)g(b)o(y)f(rotating)f(the)555 1003 y(stac)o(k.)315 1082 y Ft(-n)192 b Fu(Suppresses)15 b(the)f(normal)g(c)o(hange)g(of)g (directory)g(when)h(adding)g(directories)555 1136 y(to)g(the)g(stac)o (k,)f(so)h(that)f(only)i(the)f(stac)o(k)g(is)g(manipulated.)315 1215 y Fo(dir)185 b Fu(Mak)o(es)17 b(the)g(curren)o(t)g(w)o(orking)g (directory)h(b)q(e)g(the)g(top)f(of)g(the)g(stac)o(k,)g(and)555 1270 y(then)f(executes)f(the)h(equiv)m(alen)o(t)h(of)d(`)p Ft(cd)h Fo(dir)s Fu('.)20 b Ft(cd)p Fu(s)15 b(to)g Fo(dir)p Fu(.)75 1397 y Fs(6.9)33 b(Con)n(trolling)24 b(the)f(Prompt)137 1493 y Fu(The)f(v)m(alue)g(of)f(the)g(v)m(ariable)h Ft(PROMPT_COMMAND)d Fu(is)j(examined)g(just)f(b)q(efore)g(Bash)h(prin)o(ts)f(eac)o(h)75 1548 y(primary)g(prompt.)36 b(If)21 b Ft(PROMPT_COMMAND)e Fu(is)i(set)g(and)g(has)f(a)h(non-n)o(ull)h(v)m(alue,)h(then)f(the)e(v) m(alue)i(is)75 1603 y(executed)16 b(just)f(as)g(if)h(it)f(had)g(b)q (een)i(t)o(yp)q(ed)e(on)g(the)h(command)f(line.)137 1670 y(In)g(addition,)g(the)g(follo)o(wing)g(table)g(describ)q(es)h(the)e (sp)q(ecial)i(c)o(haracters)e(whic)o(h)h(can)f(app)q(ear)h(in)g(the)75 1724 y(prompt)g(v)m(ariables:)75 1803 y Ft(\\a)192 b Fu(A)15 b(b)q(ell)i(c)o(haracter.)75 1882 y Ft(\\d)192 b Fu(The)15 b(date,)g(in)h Ft(")p Fu(W)l(eekda)o(y)f(Mon)o(th)g(Date)p Ft(")f Fu(format)g(\(e.g.,)f Ft(")p Fu(T)l(ue)j(Ma)o(y)e(26)p Ft(")p Fu(\).)75 1961 y Ft(\\e)192 b Fu(An)15 b(escap)q(e)h(c)o (haracter.)75 2040 y Ft(\\h)192 b Fu(The)15 b(hostname,)g(up)h(to)e (the)h(\014rst)g(`.'.)75 2118 y Ft(\\H)192 b Fu(The)15 b(hostname.)75 2197 y Ft(\\j)192 b Fu(The)15 b(n)o(um)o(b)q(er)h(of)f (jobs)g(curren)o(tly)g(managed)g(b)o(y)g(the)h(shell.)75 2276 y Ft(\\l)192 b Fu(The)15 b(basename)h(of)f(the)g(shell's)h (terminal)g(device)h(name.)75 2355 y Ft(\\n)192 b Fu(A)15 b(newline.)75 2434 y Ft(\\r)192 b Fu(A)15 b(carriage)g(return.)75 2512 y Ft(\\s)192 b Fu(The)11 b(name)h(of)e(the)i(shell,)h(the)e (basename)g(of)g Ft($0)g Fu(\(the)g(p)q(ortion)g(follo)o(wing)h(the)f (\014nal)h(slash\).)75 2591 y Ft(\\t)192 b Fu(The)15 b(time,)h(in)g(24-hour)e(HH:MM:SS)h(format.)75 2670 y Ft(\\T)192 b Fu(The)15 b(time,)h(in)g(12-hour)e(HH:MM:SS)h(format.)p eop %%Page: 71 73 71 72 bop 75 -58 a Fu(Chapter)15 b(6:)k(Bash)d(F)l(eatures)1241 b(71)75 149 y Ft(\\@)192 b Fu(The)15 b(time,)h(in)g(12-hour)e(am/pm)h (format.)75 228 y Ft(\\A)192 b Fu(The)15 b(time,)h(in)g(24-hour)e (HH:MM)h(format.)75 306 y Ft(\\u)192 b Fu(The)15 b(username)h(of)f(the) g(curren)o(t)g(user.)75 384 y Ft(\\v)192 b Fu(The)15 b(v)o(ersion)h(of)f(Bash)g(\(e.g.,)f(2.00\))75 463 y Ft(\\V)192 b Fu(The)15 b(release)h(of)f(Bash,)g(v)o(ersion)g Ft(+)g Fu(patc)o(hlev)o(el)i(\(e.g.,)c(2.00.0\))75 541 y Ft(\\w)192 b Fu(The)15 b(curren)o(t)h(w)o(orking)e(directory)l(.)75 619 y Ft(\\W)192 b Fu(The)15 b(basename)h(of)f Ft($PWD)p Fu(.)75 698 y Ft(\\!)192 b Fu(The)15 b(history)h(n)o(um)o(b)q(er)f(of)g (this)h(command.)75 776 y Ft(\\#)192 b Fu(The)15 b(command)h(n)o(um)o (b)q(er)f(of)g(this)g(command.)75 854 y Ft(\\$)192 b Fu(If)15 b(the)h(e\013ectiv)o(e)f(uid)i(is)e(0,)g Ft(#)p Fu(,)f(otherwise)i Ft($)p Fu(.)75 933 y Ft(\\)p Fo(nnn)141 b Fu(The)15 b(c)o(haracter)g(whose)g(ASCI)q(I)h(co)q(de)g(is)g(the)f(o) q(ctal)h(v)m(alue)g Fo(nnn)p Fu(.)75 1011 y Ft(\\\\)192 b Fu(A)15 b(bac)o(kslash.)75 1089 y Ft(\\[)192 b Fu(Begin)19 b(a)g(sequence)g(of)f(non-prin)o(ting)i(c)o(haracters.)29 b(This)19 b(could)g(b)q(e)g(used)g(to)f(em)o(b)q(ed)h(a)315 1144 y(terminal)d(con)o(trol)f(sequence)h(in)o(to)f(the)h(prompt.)75 1222 y Ft(\\])192 b Fu(End)16 b(a)e(sequence)j(of)e(non-prin)o(ting)h (c)o(haracters.)137 1301 y(The)e(command)f(n)o(um)o(b)q(er)g(and)g(the) h(history)f(n)o(um)o(b)q(er)g(are)g(usually)h(di\013eren)o(t:)19 b(the)14 b(history)f(n)o(um)o(b)q(er)75 1356 y(of)g(a)g(command)g(is)h (its)f(p)q(osition)h(in)g(the)g(history)f(list,)h(whic)o(h)g(ma)o(y)e (include)k(commands)d(restored)g(from)75 1410 y(the)20 b(history)f(\014le)i(\(see)f(Section)g(9.1)f([Bash)g(History)h(F)l (acilities],)i(page)d(103\),)g(while)i(the)f(command)75 1465 y(n)o(um)o(b)q(er)i(is)g(the)g(p)q(osition)g(in)h(the)f(sequence)g (of)g(commands)f(executed)i(during)f(the)g(curren)o(t)f(shell)75 1520 y(session.)137 1587 y(After)c(the)h(string)f(is)h(deco)q(ded,)h (it)f(is)g(expanded)h(via)f(parameter)e(expansion,)j(command)e(substi-) 75 1641 y(tution,)h(arithmetic)h(expansion,)g(and)f(quote)g(remo)o(v)m (al,)g(sub)s(ject)g(to)f(the)h(v)m(alue)h(of)e(the)h Ft(promptvars)75 1696 y Fu(shell)f(option)e(\(see)g(Section)h(4.2)f ([Bash)g(Builtins],)h(page)f(36\).)75 1823 y Fs(6.10)32 b(The)22 b(Restricted)i(Shell)137 1918 y Fu(If)c(Bash)g(is)g(started)e (with)i(the)g(name)f Ft(rbash)p Fu(,)h(or)e(the)i(`)p Ft(--restricted)p Fu(')d(option)j(is)g(supplied)i(at)75 1973 y(in)o(v)o(o)q(cation,)14 b(the)g(shell)h(b)q(ecomes)f (restricted.)19 b(A)14 b(restricted)g(shell)h(is)f(used)g(to)f(set)g (up)h(an)g(en)o(vironmen)o(t)75 2028 y(more)f(con)o(trolled)i(than)e (the)h(standard)f(shell.)21 b(A)14 b(restricted)f(shell)j(b)q(eha)o(v)o (es)e(iden)o(tically)i(to)d Ft(bash)g Fu(with)75 2083 y(the)i(exception)i(that)d(the)h(follo)o(wing)h(are)f(disallo)o(w)o (ed:)112 2149 y Fr(\017)30 b Fu(Changing)16 b(directories)g(with)f(the) h Ft(cd)e Fu(builtin.)112 2216 y Fr(\017)30 b Fu(Setting)16 b(or)e(unsetting)i(the)f(v)m(alues)i(of)d(the)i Ft(SHELL)p Fu(,)e Ft(PATH)p Fu(,)g Ft(ENV)p Fu(,)g(or)h Ft(BASH_ENV)f Fu(v)m(ariables.)112 2282 y Fr(\017)30 b Fu(Sp)q(ecifying)17 b(command)f(names)f(con)o(taining)h(slashes.)112 2349 y Fr(\017)30 b Fu(Sp)q(ecifying)17 b(a)e(\014lename)i(con)o(taining)f (a)e(slash)i(as)f(an)g(argumen)o(t)f(to)h(the)g Ft(.)g Fu(builtin)j(command.)112 2416 y Fr(\017)30 b Fu(Sp)q(ecifying)17 b(a)d(\014lename)h(con)o(taining)h(a)e(slash)h(as)f(an)g(argumen)o(t)g (to)g(the)g(`)p Ft(-p)p Fu(')g(option)g(to)g(the)h Ft(hash)165 2470 y Fu(builtin)i(command.)112 2537 y Fr(\017)30 b Fu(Imp)q(orting)16 b(function)g(de\014nitions)h(from)d(the)h(shell)i (en)o(vironmen)o(t)f(at)e(startup.)112 2603 y Fr(\017)30 b Fu(P)o(arsing)15 b(the)g(v)m(alue)i(of)d Ft(SHELLOPTS)g Fu(from)h(the)g(shell)i(en)o(vironmen)o(t)e(at)g(startup.)112 2670 y Fr(\017)30 b Fu(Redirecting)16 b(output)f(using)h(the)f(`)p Ft(>)p Fu(',)f(`)p Ft(>|)p Fu(',)g(`)p Ft(<>)p Fu(',)g(`)p Ft(>&)p Fu(',)g(`)p Ft(&>)p Fu(',)f(and)j(`)p Ft(>>)p Fu(')e(redirection)i(op)q(erators.)p eop %%Page: 72 74 72 73 bop 75 -58 a Fu(72)1285 b(Bash)15 b(Reference)h(Man)o(ual)112 149 y Fr(\017)30 b Fu(Using)16 b(the)f Ft(exec)g Fu(builtin)i(to)e (replace)h(the)f(shell)i(with)e(another)g(command.)112 215 y Fr(\017)30 b Fu(Adding)22 b(or)d(deleting)j(builtin)h(commands)d (with)h(the)g(`)p Ft(-f)p Fu(')e(and)i(`)p Ft(-d)p Fu(')e(options)i(to) e(the)i Ft(enable)165 270 y Fu(builtin.)112 335 y Fr(\017)30 b Fu(Sp)q(ecifying)17 b(the)f(`)p Ft(-p)p Fu(')e(option)h(to)g(the)g Ft(command)f Fu(builtin.)112 400 y Fr(\017)30 b Fu(T)l(urning)16 b(o\013)f(restricted)g(mo)q(de)h(with)f(`)p Ft(set)f(+r)p Fu(')h(or)g(`)p Ft(set)f(+o)h(restricted)p Fu('.)75 523 y Fs(6.11)32 b(Bash)22 b(POSIX)g(Mo)r(de)137 617 y Fu(Starting)10 b(Bash)h(with)g(the)f(`)p Ft(--posix)p Fu(')f(command-line)j(option)f (or)e(executing)j(`)p Ft(set)i(-o)h(posix)p Fu(')9 b(while)75 672 y(Bash)16 b(is)h(running)g(will)h(cause)f(Bash)f(to)g(conform)g (more)f(closely)j(to)d(the)i Fp(posix)f Fu(1003.2)e(standard)i(b)o(y)75 727 y(c)o(hanging)j(the)f(b)q(eha)o(vior)h(to)f(matc)o(h)g(that)g(sp)q (eci\014ed)i(b)o(y)f Fp(posix)f Fu(in)h(areas)f(where)g(the)h(Bash)f (default)75 782 y(di\013ers.)137 847 y(The)e(follo)o(wing)g(list)g(is)f (what's)g(c)o(hanged)g(when)h(`)p Fp(posix)e Fu(mo)q(de')h(is)h(in)g (e\013ect:)100 913 y(1.)29 b(When)15 b(a)f(command)g(in)h(the)g(hash)f (table)h(no)f(longer)h(exists,)f(Bash)h(will)h(re-searc)o(h)e Ft($PATH)g Fu(to)f(\014nd)165 967 y(the)i(new)h(lo)q(cation.)k(This)c (is)g(also)f(a)o(v)m(ailable)i(with)e(`)p Ft(shopt)g(-s)f(checkhash)p Fu('.)100 1033 y(2.)29 b(The)21 b(message)g(prin)o(ted)h(b)o(y)f(the)g (job)g(con)o(trol)f(co)q(de)i(and)f(builtins)i(when)f(a)f(job)f(exits)i (with)f(a)165 1087 y(non-zero)15 b(status)g(is)h(`Done\(status\)'.)100 1153 y(3.)29 b(The)20 b(message)g(prin)o(ted)h(b)o(y)f(the)g(job)g(con) o(trol)g(co)q(de)h(and)f(builtins)j(when)d(a)g(job)g(is)h(stopp)q(ed)f (is)165 1208 y(`Stopp)q(ed\()p Fo(signame)s Fu(\)',)14 b(where)i Fo(signame)i Fu(is,)d(for)g(example,)g Ft(SIGTSTP)p Fu(.)100 1273 y(4.)29 b(Reserv)o(ed)15 b(w)o(ords)f(ma)o(y)h(not)g(b)q (e)h(aliased.)100 1338 y(5.)29 b(The)20 b Fp(posix)f Fu(1003.2)f Ft(PS1)h Fu(and)h Ft(PS2)f Fu(expansions)i(of)e(`)p Ft(!)p Fu(')g(to)g(the)h(history)f(n)o(um)o(b)q(er)h(and)g(`)p Ft(!!)p Fu(')f(to)165 1393 y(`)p Ft(!)p Fu(')e(are)g(enabled,)i(and)f (parameter)f(expansion)i(is)f(p)q(erformed)g(on)g(the)f(v)m(alues)i(of) e Ft(PS1)h Fu(and)f Ft(PS2)165 1448 y Fu(regardless)e(of)g(the)g (setting)h(of)e(the)i Ft(promptvars)d Fu(option.)100 1513 y(6.)29 b(In)o(teractiv)o(e)15 b(commen)o(ts)g(are)g(enabled)i(b)o (y)e(default.)20 b(\(Bash)15 b(has)g(them)g(on)g(b)o(y)h(default)f(an)o (yw)o(a)o(y)l(.\))100 1578 y(7.)29 b(The)15 b Fp(posix)g Fu(1003.2)f(startup)g(\014les)i(are)f(executed)h(\()p Ft($ENV)p Fu(\))e(rather)h(than)g(the)g(normal)g(Bash)h(\014les.)100 1644 y(8.)29 b(Tilde)16 b(expansion)g(is)g(only)f(p)q(erformed)g(on)g (assignmen)o(ts)g(preceding)h(a)f(command)g(name,)g(rather)165 1699 y(than)g(on)g(all)h(assignmen)o(t)f(statemen)o(ts)f(on)i(the)f (line.)100 1764 y(9.)29 b(The)15 b(default)h(history)f(\014le)i(is)e(`) p Ft(~/.sh_history)p Fu(')e(\(this)i(is)h(the)f(default)h(v)m(alue)g (of)f Ft($HISTFILE)p Fu(\).)77 1829 y(10.)29 b(The)12 b(output)f(of)g(`)p Ft(kill)k(-l)p Fu(')10 b(prin)o(ts)i(all)h(the)e (signal)i(names)e(on)h(a)f(single)i(line,)g(separated)f(b)o(y)f (spaces.)77 1894 y(11.)29 b(Non-in)o(teractiv)o(e)16 b(shells)h(exit)e(if)h Fo(\014lename)j Fu(in)d Ft(.)f Fo(\014lename)k Fu(is)c(not)g(found.)77 1960 y(12.)29 b(Non-in)o(teractiv)o(e)20 b(shells)g(exit)f(if)h(a)e(syn)o(tax)h (error)f(in)i(an)f(arithmetic)g(expansion)h(results)f(in)h(an)165 2015 y(in)o(v)m(alid)d(expression.)77 2080 y(13.)29 b(Redirection)13 b(op)q(erators)e(do)h(not)g(p)q(erform)f(\014lename)i(expansion)g(on)f (the)g(w)o(ord)g(in)h(the)f(redirection)165 2135 y(unless)k(the)g (shell)g(is)g(in)o(teractiv)o(e.)77 2200 y(14.)29 b(Redirection)16 b(op)q(erators)e(do)i(not)e(p)q(erform)h(w)o(ord)g(splitting)h(on)g (the)f(w)o(ord)f(in)i(the)g(redirection.)77 2265 y(15.)29 b(F)l(unction)18 b(names)f(m)o(ust)g(b)q(e)h(v)m(alid)h(shell)g Ft(name)p Fu(s.)25 b(That)17 b(is,)h(they)f(ma)o(y)f(not)h(con)o(tain)h (c)o(haracters)165 2320 y(other)e(than)g(letters,)h(digits,)g(and)f (underscores,)h(and)g(ma)o(y)f(not)g(start)f(with)i(a)f(digit.)24 b(Declaring)165 2375 y(a)15 b(function)h(with)f(an)h(in)o(v)m(alid)h (name)e(causes)h(a)f(fatal)f(syn)o(tax)h(error)f(in)i(non-in)o (teractiv)o(e)g(shells.)77 2440 y(16.)29 b Fp(posix)11 b Fu(1003.2)f(`sp)q(ecial')j(builtins)h(are)d(found)h(b)q(efore)h (shell)g(functions)f(during)h(command)f(lo)q(okup.)77 2506 y(17.)29 b(If)17 b(a)g Fp(posix)f Fu(1003.2)f(sp)q(ecial)k (builtin)g(returns)e(an)f(error)g(status,)g(a)h(non-in)o(teractiv)o(e)h (shell)g(exits.)165 2560 y(The)k(fatal)g(errors)f(are)h(those)f(listed) j(in)f(the)f(POSIX.2)g(standard,)h(and)f(include)i(things)f(lik)o(e)165 2615 y(passing)13 b(incorrect)g(options,)g(redirection)h(errors,)e(v)m (ariable)i(assignmen)o(t)f(errors)f(for)g(assignmen)o(ts)165 2670 y(preceding)17 b(the)e(command)g(name,)g(and)g(so)g(on.)p eop %%Page: 73 75 73 74 bop 75 -58 a Fu(Chapter)15 b(6:)k(Bash)d(F)l(eatures)1241 b(73)77 149 y(18.)29 b(If)17 b(the)g Ft(cd)g Fu(builtin)i(\014nds)e(a)g (directory)g(to)f(c)o(hange)h(to)g(using)g Ft($CDPATH)p Fu(,)f(the)h(v)m(alue)h(it)g(assigns)f(to)165 204 y(the)e Ft(PWD)g Fu(v)m(ariable)i(do)q(es)e(not)g(con)o(tain)g(an)o(y)g(sym)o (b)q(olic)i(links,)f(as)f(if)g(`)p Ft(cd)g(-P)p Fu(')f(had)i(b)q(een)g (executed.)77 271 y(19.)29 b(If)17 b Ft(CDPATH)g Fu(is)h(set,)f(the)g Ft(cd)g Fu(builtin)i(will)g(not)e(implicitly)j(app)q(end)f(the)e (curren)o(t)g(directory)h(to)e(it.)165 326 y(This)f(means)g(that)f Ft(cd)h Fu(will)h(fail)g(if)f(no)g(v)m(alid)h(directory)f(name)g(can)g (b)q(e)g(constructed)g(from)f(an)o(y)g(of)165 381 y(the)i(en)o(tries)g (in)g Ft($CDPATH)p Fu(,)f(ev)o(en)h(if)g(the)g(a)f(directory)h(with)g (the)g(same)f(name)h(as)f(the)h(name)f(giv)o(en)165 436 y(as)g(an)g(argumen)o(t)f(to)h Ft(cd)g Fu(exists)g(in)h(the)g(curren)o (t)f(directory)l(.)77 503 y(20.)29 b(A)16 b(non-in)o(teractiv)o(e)g (shell)h(exits)f(with)g(an)f(error)g(status)f(if)i(a)g(v)m(ariable)g (assignmen)o(t)g(error)f(o)q(ccurs)165 558 y(when)20 b(no)g(command)f(name)h(follo)o(ws)f(the)h(assignmen)o(t)g(statemen)o (ts.)31 b(A)20 b(v)m(ariable)h(assignmen)o(t)165 613 y(error)14 b(o)q(ccurs,)i(for)e(example,)i(when)g(trying)f(to)f(assign) i(a)f(v)m(alue)h(to)f(a)f(readonly)i(v)m(ariable.)77 680 y(21.)29 b(A)21 b(non-in)o(teractiv)o(e)i(shell)g(exits)f(with)f (an)h(error)e(status)h(if)h(the)f(iteration)h(v)m(ariable)h(in)f(a)f Ft(for)165 735 y Fu(statemen)o(t)14 b(or)h(the)g(selection)i(v)m (ariable)f(in)g(a)f Ft(select)f Fu(statemen)o(t)h(is)g(a)g(readonly)h (v)m(ariable.)77 802 y(22.)29 b(Pro)q(cess)15 b(substitution)h(is)g (not)f(a)o(v)m(ailable.)77 869 y(23.)29 b(Assignmen)o(t)16 b(statemen)o(ts)e(preceding)j Fp(posix)e Fu(1003.2)f(sp)q(ecial)j (builtins)h(p)q(ersist)e(in)h(the)e(shell)i(en-)165 924 y(vironmen)o(t)e(after)g(the)g(builtin)i(completes.)77 991 y(24.)29 b(Assignmen)o(t)18 b(statemen)o(ts)e(preceding)i(shell)h (function)f(calls)h(p)q(ersist)e(in)h(the)g(shell)h(en)o(vironmen)o(t) 165 1046 y(after)14 b(the)i(function)g(returns,)e(as)h(if)h(a)f Fp(posix)g Fu(sp)q(ecial)i(builtin)g(command)e(had)h(b)q(een)g (executed.)77 1113 y(25.)29 b(The)19 b Ft(export)g Fu(and)g Ft(readonly)f Fu(builtin)k(commands)d(displa)o(y)h(their)g(output)f(in) h(the)f(format)f(re-)165 1168 y(quired)e(b)o(y)f Fp(posix)g Fu(1003.2.)77 1235 y(26.)29 b(The)15 b Ft(trap)g Fu(builtin)j(displa)o (ys)e(signal)g(names)f(without)g(the)g(leading)i Ft(SIG)p Fu(.)77 1303 y(27.)29 b(The)11 b Ft(.)g Fu(and)g Ft(source)f Fu(builtins)j(do)e(not)f(searc)o(h)h(the)g(curren)o(t)g(directory)g (for)f(the)h(\014lename)h(argumen)o(t)165 1357 y(if)k(it)f(is)h(not)f (found)g(b)o(y)g(searc)o(hing)h Ft(PATH)p Fu(.)77 1425 y(28.)29 b(Subshells)13 b(spa)o(wned)e(to)f(execute)h(command)g (substitutions)g(inherit)h(the)f(v)m(alue)h(of)e(the)h(`)p Ft(-e)p Fu(')f(option)165 1479 y(from)17 b(the)g(paren)o(t)g(shell.)28 b(When)18 b(not)f(in)i Fp(posix)e Fu(mo)q(de,)g(Bash)h(clears)g(the)f (`)p Ft(-e)p Fu(')g(option)g(in)i(suc)o(h)165 1534 y(subshells.)77 1601 y(29.)29 b(Alias)16 b(expansion)g(is)g(alw)o(a)o(ys)e(enabled,)j (ev)o(en)e(in)h(non-in)o(teractiv)o(e)g(shells.)77 1669 y(30.)29 b(When)20 b(the)h Ft(set)e Fu(builtin)j(is)f(in)o(v)o(ok)o(ed) f(without)g(options,)h(it)f(do)q(es)h(not)e(displa)o(y)j(shell)f (function)165 1724 y(names)15 b(and)h(de\014nitions.)77 1791 y(31.)29 b(When)19 b(the)f Ft(set)f Fu(builtin)k(is)d(in)o(v)o(ok) o(ed)h(without)f(options,)h(it)f(displa)o(ys)h(v)m(ariable)h(v)m(alues) f(without)165 1846 y(quotes,)12 b(unless)h(they)f(con)o(tain)h(shell)g (metac)o(haracters,)e(ev)o(en)i(if)f(the)g(result)h(con)o(tains)f (nonprin)o(ting)165 1900 y(c)o(haracters.)137 1980 y(There)k(is)f (other)g Fp(posix)g Fu(1003.2)e(b)q(eha)o(vior)j(that)f(Bash)g(do)q(es) g(not)g(implemen)o(t.)21 b(Sp)q(eci\014call)q(y:)100 2047 y(1.)29 b(Assignmen)o(t)13 b(statemen)o(ts)f(a\013ect)g(the)h (execution)h(en)o(vironmen)o(t)f(of)f(all)i(builtins,)h(not)e(just)f (sp)q(ecial)165 2102 y(ones.)100 2169 y(2.)29 b(When)11 b(a)f(subshell)i(is)f(created)f(to)g(execute)h(a)f(shell)i(script)f (with)f(execute)h(p)q(ermission,)i(but)d(without)165 2224 y(a)17 b(leading)i(`)p Ft(#!)p Fu(',)e(Bash)g(sets)h Ft($0)f Fu(to)g(the)g(full)i(pathname)e(of)h(the)f(script)h(as)f(found) h(b)o(y)g(searc)o(hing)165 2279 y Ft($PATH)p Fu(,)c(rather)h(than)g (the)g(command)g(as)g(t)o(yp)q(ed)g(b)o(y)h(the)f(user.)100 2346 y(3.)29 b(When)14 b(using)h(`)p Ft(.)p Fu(')e(to)g(source)h(a)g (shell)h(script)g(found)f(in)h Ft($PATH)p Fu(,)e(bash)h(c)o(hec)o(ks)g (execute)h(p)q(ermission)165 2401 y(bits)h(rather)e(than)h(read)g(p)q (ermission)i(bits,)e(just)g(as)g(if)h(it)f(w)o(ere)g(searc)o(hing)h (for)e(a)h(command.)p eop %%Page: 74 76 74 75 bop 75 -58 a Fu(74)1285 b(Bash)15 b(Reference)h(Man)o(ual)p eop %%Page: 75 77 75 76 bop 75 -58 a Fu(Chapter)15 b(7:)k(Job)d(Con)o(trol)1285 b(75)75 149 y Fq(7)41 b(Job)26 b(Con)n(trol)137 278 y Fu(This)19 b(c)o(hapter)e(discusses)i(what)e(job)h(con)o(trol)f(is,)h (ho)o(w)g(it)g(w)o(orks,)f(and)g(ho)o(w)h(Bash)f(allo)o(ws)h(y)o(ou)g (to)75 333 y(access)d(its)h(facilities.)75 471 y Fs(7.1)33 b(Job)22 b(Con)n(trol)h(Basics)137 571 y Fu(Job)16 b(con)o(trol)g (refers)f(to)g(the)h(abilit)o(y)h(to)e(selectiv)o(ely)i(stop)f(\(susp)q (end\))g(the)g(execution)g(of)g(pro)q(cesses)75 625 y(and)d(con)o(tin)o (ue)g(\(resume\))f(their)g(execution)i(at)e(a)g(later)g(p)q(oin)o(t.)20 b(A)12 b(user)h(t)o(ypically)g(emplo)o(ys)g(this)g(facilit)o(y)75 680 y(via)i(an)h(in)o(teractiv)o(e)f(in)o(terface)h(supplied)h(join)o (tly)f(b)o(y)f(the)g(system's)g(terminal)h(driv)o(er)f(and)h(Bash.)137 751 y(The)d(shell)h(asso)q(ciates)e(a)g Fo(job)h Fu(with)f(eac)o(h)g (pip)q(eline)q(.)22 b(It)12 b(k)o(eeps)g(a)g(table)h(of)f(curren)o(tly) g(executing)i(jobs,)75 806 y(whic)o(h)k(ma)o(y)e(b)q(e)h(listed)h(with) g(the)f Ft(jobs)f Fu(command.)24 b(When)18 b(Bash)f(starts)e(a)i(job)f (async)o(hronously)l(,)i(it)75 861 y(prin)o(ts)d(a)g(line)i(that)e(lo)q (oks)g(lik)o(e:)195 929 y Ft([1])23 b(25647)75 1000 y Fu(indicating)c(that)c(this)j(job)e(is)h(job)g(n)o(um)o(b)q(er)g(1)f (and)h(that)f(the)g(pro)q(cess)h Fp(id)g Fu(of)f(the)h(last)f(pro)q (cess)h(in)h(the)75 1055 y(pip)q(eline)24 b(asso)q(ciated)e(with)f (this)h(job)f(is)h(25647.)36 b(All)23 b(of)e(the)g(pro)q(cesses)g(in)h (a)f(single)i(pip)q(eline)h(are)75 1110 y(mem)o(b)q(ers)15 b(of)g(the)g(same)g(job.)20 b(Bash)15 b(uses)h(the)f Fo(job)h Fu(abstraction)f(as)g(the)g(basis)g(for)g(job)g(con)o(trol.) 137 1181 y(T)l(o)d(facilitate)g(the)g(implemen)o(tation)h(of)e(the)g (user)h(in)o(terface)g(to)f(job)g(con)o(trol,)h(the)g(op)q(erating)f (system)75 1235 y(main)o(tains)i(the)h(notion)f(of)f(a)h(curren)o(t)g (terminal)h(pro)q(cess)f(group)g Fp(id)p Fu(.)19 b(Mem)o(b)q(ers)13 b(of)f(this)i(pro)q(cess)f(group)75 1290 y(\(pro)q(cesses)g(whose)g (pro)q(cess)h(group)f Fp(id)g Fu(is)g(equal)h(to)f(the)g(curren)o(t)g (terminal)h(pro)q(cess)f(group)g Fp(id)p Fu(\))g(receiv)o(e)75 1345 y(k)o(eyb)q(oard-generated)e(signals)g(suc)o(h)g(as)f Ft(SIGINT)p Fu(.)17 b(These)11 b(pro)q(cesses)g(are)f(said)h(to)f(b)q (e)h(in)g(the)g(foreground.)75 1400 y(Bac)o(kground)19 b(pro)q(cesses)g(are)f(those)h(whose)f(pro)q(cess)h(group)g Fp(id)f Fu(di\013ers)h(from)f(the)h(terminal's;)i(suc)o(h)75 1454 y(pro)q(cesses)12 b(are)g(imm)o(une)h(to)e(k)o(eyb)q (oard-generated)h(signals.)20 b(Only)13 b(foreground)f(pro)q(cesses)g (are)g(allo)o(w)o(ed)75 1509 y(to)k(read)h(from)f(or)h(write)g(to)f (the)h(terminal.)26 b(Bac)o(kground)17 b(pro)q(cesses)h(whic)o(h)f (attempt)f(to)h(read)g(from)75 1564 y(\(write)e(to\))f(the)h(terminal)h (are)f(sen)o(t)g(a)g Ft(SIGTTIN)f Fu(\()p Ft(SIGTTOU)p Fu(\))g(signal)i(b)o(y)f(the)g(terminal)h(driv)o(er,)f(whic)o(h,)75 1619 y(unless)h(caugh)o(t,)f(susp)q(ends)h(the)f(pro)q(cess.)137 1690 y(If)j(the)g(op)q(erating)g(system)f(on)h(whic)o(h)g(Bash)g(is)g (running)h(supp)q(orts)f(job)f(con)o(trol,)h(Bash)g(con)o(tains)75 1745 y(facilities)e(to)e(use)g(it.)20 b(T)o(yping)14 b(the)g Fo(susp)q(end)j Fu(c)o(haracter)d(\(t)o(ypically)h(`)p Ft(^Z)p Fu(',)d(Con)o(trol-Z\))h(while)j(a)e(pro)q(cess)75 1799 y(is)22 b(running)g(causes)f(that)g(pro)q(cess)g(to)g(b)q(e)h (stopp)q(ed)f(and)h(returns)f(con)o(trol)g(to)f(Bash.)38 b(T)o(yping)22 b(the)75 1854 y Fo(dela)o(y)o(ed)h(susp)q(end)i Fu(c)o(haracter)c(\(t)o(ypically)j(`)p Ft(^Y)p Fu(',)e(Con)o(trol-Y\))f (causes)i(the)f(pro)q(cess)g(to)g(b)q(e)g(stopp)q(ed)75 1909 y(when)14 b(it)g(attempts)f(to)g(read)h(input)g(from)f(the)h (terminal,)g(and)g(con)o(trol)g(to)f(b)q(e)h(returned)g(to)f(Bash.)20 b(The)75 1964 y(user)f(then)g(manipulates)h(the)f(state)f(of)g(this)i (job,)f(using)g(the)g Ft(bg)g Fu(command)f(to)h(con)o(tin)o(ue)g(it)g (in)h(the)75 2019 y(bac)o(kground,)f(the)f Ft(fg)g Fu(command)h(to)e (con)o(tin)o(ue)i(it)g(in)g(the)g(foreground,)f(or)g(the)h Ft(kill)e Fu(command)i(to)75 2073 y(kill)c(it.)20 b(A)13 b(`)p Ft(^Z)p Fu(')f(tak)o(es)h(e\013ect)g(immediately)l(,)i(and)f(has) f(the)g(additional)i(side)f(e\013ect)f(of)g(causing)h(p)q(ending)75 2128 y(output)h(and)g(t)o(yp)q(eahead)h(to)e(b)q(e)i(discarded.)137 2199 y(There)h(are)f(a)g(n)o(um)o(b)q(er)g(of)g(w)o(a)o(ys)f(to)h (refer)g(to)g(a)g(job)g(in)h(the)f(shell.)25 b(The)16 b(c)o(haracter)g(`)p Ft(\045)p Fu(')f(in)o(tro)q(duces)75 2254 y(a)g(job)g(name.)137 2325 y(Job)h(n)o(um)o(b)q(er)g Ft(n)g Fu(ma)o(y)f(b)q(e)i(referred)f(to)f(as)g(`)p Ft(\045n)p Fu('.)21 b(The)16 b(sym)o(b)q(ols)g(`)p Ft(\045\045)p Fu(')e(and)i(`)p Ft(\045+)p Fu(')f(refer)h(to)f(the)h(shell's)75 2380 y(notion)21 b(of)g(the)g(curren)o(t)g(job,)h(whic)o(h)g(is)g(the)f (last)g(job)g(stopp)q(ed)h(while)g(it)g(w)o(as)e(in)i(the)f(foreground) 75 2435 y(or)d(started)f(in)i(the)f(bac)o(kground.)29 b(The)18 b(previous)h(job)f(ma)o(y)f(b)q(e)i(referenced)g(using)g(`)p Ft(\045-)p Fu('.)27 b(In)19 b(output)75 2489 y(p)q(ertaining)14 b(to)f(jobs)g(\(e.g.,)f(the)h(output)f(of)h(the)g Ft(jobs)g Fu(command\),)f(the)h(curren)o(t)g(job)g(is)h(alw)o(a)o(ys)e(\015agged) 75 2544 y(with)k(a)e(`)p Ft(+)p Fu(',)g(and)i(the)f(previous)h(job)f (with)g(a)g(`)p Ft(-)p Fu('.)137 2615 y(A)k(job)g(ma)o(y)g(also)g(b)q (e)h(referred)f(to)g(using)h(a)f(pre\014x)g(of)g(the)g(name)g(used)h (to)f(start)f(it,)i(or)e(using)i(a)75 2670 y(substring)c(that)e(app)q (ears)h(in)h(its)g(command)f(line.)21 b(F)l(or)15 b(example,)h(`)p Ft(\045ce)p Fu(')e(refers)h(to)f(a)h(stopp)q(ed)h Ft(ce)f Fu(job.)p eop %%Page: 76 78 76 77 bop 75 -58 a Fu(76)1285 b(Bash)15 b(Reference)h(Man)o(ual)75 149 y(Using)e(`)p Ft(\045?ce)p Fu(',)e(on)h(the)h(other)f(hand,)g (refers)g(to)g(an)o(y)g(job)g(con)o(taining)h(the)g(string)f(`)p Ft(ce)p Fu(')f(in)j(its)e(command)75 204 y(line.)22 b(If)15 b(the)g(pre\014x)h(or)f(substring)g(matc)o(hes)g(more)g(than)g(one)g (job,)g(Bash)g(rep)q(orts)g(an)g(error.)137 274 y(Simply)i(naming)f(a)f (job)h(can)f(b)q(e)i(used)f(to)f(bring)h(it)g(in)o(to)f(the)h (foreground:)k(`)p Ft(\0451)p Fu(')14 b(is)i(a)f(synon)o(ym)h(for)75 328 y(`)p Ft(fg)f(\0451)p Fu(',)f(bringing)j(job)f(1)f(from)g(the)h (bac)o(kground)g(in)o(to)f(the)h(foreground.)21 b(Similarly)l(,)d(`)p Ft(\0451)d(&)p Fu(')g(resumes)75 383 y(job)g(1)g(in)h(the)f(bac)o (kground,)g(equiv)m(alen)o(t)i(to)d(`)p Ft(bg)h(\0451)p Fu(')137 453 y(The)h(shell)h(learns)g(immediately)g(whenev)o(er)f(a)f (job)h(c)o(hanges)f(state.)21 b(Normally)l(,)16 b(Bash)g(w)o(aits)f(un) o(til)75 507 y(it)e(is)f(ab)q(out)h(to)e(prin)o(t)i(a)f(prompt)g(b)q (efore)h(rep)q(orting)f(c)o(hanges)h(in)g(a)f(job's)g(status)f(so)h(as) g(to)g(not)g(in)o(terrupt)75 562 y(an)o(y)g(other)g(output.)19 b(If)13 b(the)f(`)p Ft(-b)p Fu(')g(option)g(to)g(the)h Ft(set)f Fu(builtin)i(is)f(enabled,)i(Bash)d(rep)q(orts)g(suc)o(h)h(c)o (hanges)75 617 y(immediately)j(\(see)f(Section)g(4.3)f([The)h(Set)f (Builtin],)j(page)d(46\).)19 b(An)o(y)c(trap)f(on)g Ft(SIGCHLD)g Fu(is)h(executed)75 672 y(for)g(eac)o(h)g(c)o(hild)i(pro)q(cess)e(that) g(exits.)137 741 y(If)g(an)g(attempt)f(to)g(exit)i(Bash)f(is)g(while)h (jobs)f(are)f(stopp)q(ed,)i(the)f(shell)h(prin)o(ts)f(a)g(message)f(w)o (arning)75 796 y(that)g(there)h(are)g(stopp)q(ed)g(jobs.)20 b(The)15 b Ft(jobs)f Fu(command)h(ma)o(y)f(then)h(b)q(e)h(used)f(to)g (insp)q(ect)h(their)f(status.)75 851 y(If)h(a)f(second)g(attempt)g(to)f (exit)i(is)g(made)f(without)g(an)h(in)o(terv)o(ening)g(command,)f(Bash) g(do)q(es)h(not)f(prin)o(t)75 905 y(another)g(w)o(arning,)g(and)g(the)g (stopp)q(ed)h(jobs)f(are)g(terminated.)75 1039 y Fs(7.2)33 b(Job)22 b(Con)n(trol)h(Builtins)75 1151 y Ft(bg)435 1217 y(bg)h([)p Fo(jobsp)q(ec)s Ft(])315 1285 y Fu(Resume)14 b(the)g(susp)q(ended)i(job)d Fo(jobsp)q(ec)18 b Fu(in)d(the)f(bac)o (kground,)f(as)h(if)g(it)h(had)f(b)q(een)h(started)315 1340 y(with)h(`)p Ft(&)p Fu('.)21 b(If)c Fo(jobsp)q(ec)i Fu(is)d(not)g(supplied,)i(the)e(curren)o(t)g(job)g(is)g(used.)23 b(The)16 b(return)g(status)315 1395 y(is)h(zero)f(unless)i(it)e(is)h (run)g(when)f(job)h(con)o(trol)f(is)h(not)f(enabled,)h(or,)f(when)h (run)f(with)h(job)315 1449 y(con)o(trol)h(enabled,)j(if)e Fo(jobsp)q(ec)j Fu(w)o(as)17 b(not)h(found)h(or)f Fo(jobsp)q(ec)k Fu(sp)q(eci\014es)e(a)f(job)f(that)g(w)o(as)315 1504 y(started)c(without)i(job)f(con)o(trol.)75 1586 y Ft(fg)435 1651 y(fg)24 b([)p Fo(jobsp)q(ec)s Ft(])315 1720 y Fu(Resume)d(the)h (job)g Fo(jobsp)q(ec)j Fu(in)d(the)g(foreground)f(and)h(mak)o(e)f(it)h (the)f(curren)o(t)h(job.)39 b(If)315 1774 y Fo(jobsp)q(ec)22 b Fu(is)c(not)g(supplied,)j(the)d(curren)o(t)g(job)g(is)h(used.)29 b(The)19 b(return)f(status)f(is)i(that)e(of)315 1829 y(the)g(command)g(placed)h(in)o(to)f(the)g(foreground,)g(or)g(non-zero) g(if)h(run)f(when)g(job)g(con)o(trol)315 1884 y(is)h(disabled)i(or,)d (when)h(run)g(with)g(job)f(con)o(trol)h(enabled,)h Fo(jobsp)q(ec)i Fu(do)q(es)d(not)f(sp)q(ecify)i(a)315 1939 y(v)m(alid)e(job)e(or)g Fo(jobsp)q(ec)j Fu(sp)q(eci\014es)f(a)e(job)g(that)g(w)o(as)f(started)g (without)i(job)f(con)o(trol.)75 2021 y Ft(jobs)435 2086 y(jobs)23 b([-lnprs])g([)p Fo(jobsp)q(ec)s Ft(])435 2138 y(jobs)g(-x)h Fo(command)h Ft([)p Fo(argumen)o(ts)r Ft(])315 2206 y Fu(The)15 b(\014rst)g(form)g(lists)h(the)f(activ)o(e)g(jobs.)20 b(The)15 b(options)h(ha)o(v)o(e)e(the)i(follo)o(wing)g(meanings:)315 2288 y Ft(-l)192 b Fu(List)16 b(pro)q(cess)f Fp(id)p Fu(s)g(in)h(addition)h(to)d(the)i(normal)f(information.)315 2370 y Ft(-n)192 b Fu(Displa)o(y)13 b(information)g(only)g(ab)q(out)f (jobs)g(that)g(ha)o(v)o(e)g(c)o(hanged)h(status)f(since)555 2425 y(the)j(user)h(w)o(as)e(last)h(noti\014ed)h(of)f(their)h(status.) 315 2506 y Ft(-p)192 b Fu(List)16 b(only)g(the)f(pro)q(cess)g Fp(id)h Fu(of)e(the)i(job's)e(pro)q(cess)i(group)f(leader.)315 2588 y Ft(-r)192 b Fu(Restrict)15 b(output)g(to)f(running)j(jobs.)315 2670 y Ft(-s)192 b Fu(Restrict)15 b(output)g(to)f(stopp)q(ed)i(jobs.)p eop %%Page: 77 79 77 78 bop 75 -58 a Fu(Chapter)15 b(7:)k(Job)d(Con)o(trol)1285 b(77)315 149 y(If)12 b Fo(jobsp)q(ec)j Fu(is)d(giv)o(en,)h(output)f(is) g(restricted)g(to)f(information)h(ab)q(out)g(that)f(job.)18 b(If)12 b Fo(jobsp)q(ec)315 204 y Fu(is)k(not)f(supplied,)i(the)e (status)f(of)h(all)h(jobs)f(is)h(listed.)315 277 y(If)g(the)g(`)p Ft(-x)p Fu(')e(option)i(is)g(supplied,)i Ft(jobs)d Fu(replaces)h(an)o (y)g Fo(jobsp)q(ec)j Fu(found)d(in)g Fo(command)h Fu(or)315 332 y Fo(argumen)o(ts)j Fu(with)f(the)f(corresp)q(onding)i(pro)q(cess)f (group)f Fp(id)p Fu(,)h(and)g(executes)g Fo(command)p Fu(,)315 386 y(passing)d(it)f Fo(argumen)o(t)q Fu(s,)f(returning)i(its) f(exit)h(status.)75 477 y Ft(kill)435 546 y(kill)23 b([-s)h Fo(sigsp)q(ec)s Ft(])g([-n)g Fo(sign)o(um)p Ft(])g([-)p Fo(sigsp)q(ec)s Ft(])g Fo(jobsp)q(ec)k Ft(or)23 b Fo(pid)435 598 y Ft(kill)g(-l)h([)p Fo(exit)p 727 598 14 2 v 17 w(status)r Ft(])315 671 y Fu(Send)13 b(a)e(signal)i(sp)q(eci\014ed)g(b) o(y)f Fo(sigsp)q(ec)k Fu(or)11 b Fo(sign)o(um)h Fu(to)f(the)h(pro)q (cess)g(named)g(b)o(y)g(job)f(sp)q(eci\014-)315 726 y(cation)i Fo(jobsp)q(ec)k Fu(or)12 b(pro)q(cess)i Fp(id)f Fo(pid)p Fu(.)20 b Fo(sigsp)q(ec)d Fu(is)c(either)h(a)f(signal)h(name)f(suc)o(h) g(as)g Ft(SIGINT)315 781 y Fu(\(with)g(or)g(without)g(the)g Ft(SIG)g Fu(pre\014x\))g(or)g(a)f(signal)i(n)o(um)o(b)q(er;)g Fo(sign)o(um)g Fu(is)f(a)g(signal)h(n)o(um)o(b)q(er.)315 835 y(If)k Fo(sigsp)q(ec)j Fu(and)d Fo(sign)o(um)g Fu(are)f(not)g (presen)o(t,)h Ft(SIGTERM)f Fu(is)h(used.)27 b(The)18 b(`)p Ft(-l)p Fu(')e(option)i(lists)315 890 y(the)d(signal)i(names.)j (If)15 b(an)o(y)g(argumen)o(ts)g(are)g(supplied)i(when)f(`)p Ft(-l)p Fu(')e(is)i(giv)o(en,)g(the)f(names)315 945 y(of)g(the)g (signals)h(corresp)q(onding)g(to)f(the)g(argumen)o(ts)g(are)g(listed,)h (and)f(the)h(return)f(status)315 1000 y(is)j(zero.)28 b Fo(exit)p 562 1000 V 16 w(status)19 b Fu(is)f(a)g(n)o(um)o(b)q(er)g (sp)q(ecifying)i(a)d(signal)i(n)o(um)o(b)q(er)f(or)f(the)h(exit)g (status)315 1054 y(of)g(a)g(pro)q(cess)g(terminated)h(b)o(y)f(a)g (signal.)29 b(The)19 b(return)f(status)f(is)i(zero)f(if)h(at)e(least)i (one)315 1109 y(signal)d(w)o(as)f(successfully)j(sen)o(t,)d(or)g (non-zero)g(if)h(an)g(error)f(o)q(ccurs)g(or)g(an)h(in)o(v)m(alid)i (option)315 1164 y(is)e(encoun)o(tered.)75 1254 y Ft(wait)435 1324 y(wait)23 b([)p Fo(jobsp)q(ec)28 b Ft(or)23 b Fo(pid)r Ft(])315 1397 y Fu(W)l(ait)e(un)o(til)i(the)f(c)o(hild)h(pro)q(cess)f (sp)q(eci\014ed)h(b)o(y)f(pro)q(cess)g Fp(id)f Fo(pid)k Fu(or)c(job)g(sp)q(eci\014cation)315 1451 y Fo(jobsp)q(ec)g Fu(exits)c(and)h(return)f(the)h(exit)f(status)g(of)g(the)g(last)g (command)h(w)o(aited)f(for.)26 b(If)17 b(a)315 1506 y(job)g(sp)q(ec)i (is)e(giv)o(en,)i(all)f(pro)q(cesses)g(in)g(the)g(job)f(are)g(w)o (aited)h(for.)26 b(If)17 b(no)h(argumen)o(ts)e(are)315 1561 y(giv)o(en,)g(all)g(curren)o(tly)g(activ)o(e)g(c)o(hild)h(pro)q (cesses)f(are)g(w)o(aited)f(for,)g(and)h(the)f(return)h(status)315 1616 y(is)g(zero.)21 b(If)16 b(neither)g Fo(jobsp)q(ec)j Fu(nor)c Fo(pid)k Fu(sp)q(eci\014es)e(an)e(activ)o(e)h(c)o(hild)h(pro)q (cess)f(of)f(the)h(shell,)315 1671 y(the)f(return)g(status)g(is)g(127.) 75 1761 y Ft(disown)435 1831 y(disown)23 b([-ar])g([-h])h([)p Fo(jobsp)q(ec)j Ft(...)o(])315 1903 y Fu(Without)16 b(options,)f(eac)o (h)h Fo(jobsp)q(ec)j Fu(is)d(remo)o(v)o(ed)g(from)f(the)g(table)i(of)e (activ)o(e)h(jobs.)21 b(If)16 b(the)315 1958 y(`)p Ft(-h)p Fu(')h(option)i(is)f(giv)o(en,)i(the)e(job)g(is)h(not)f(remo)o(v)o(ed)f (from)h(the)g(table,)h(but)g(is)g(mark)o(ed)e(so)315 2013 y(that)f Ft(SIGHUP)g Fu(is)h(not)f(sen)o(t)g(to)g(the)h(job)f(if)i (the)e(shell)i(receiv)o(es)g(a)e Ft(SIGHUP)p Fu(.)24 b(If)16 b Fo(jobsp)q(ec)k Fu(is)315 2068 y(not)15 b(presen)o(t,)h(and)g (neither)g(the)g(`)p Ft(-a)p Fu(')f(nor)g(`)p Ft(-r)p Fu(')g(option)h(is)g(supplied,)i(the)d(curren)o(t)h(job)f(is)315 2122 y(used.)29 b(If)19 b(no)f Fo(jobsp)q(ec)k Fu(is)c(supplied,)j(the) d(`)p Ft(-a)p Fu(')f(option)i(means)f(to)f(remo)o(v)o(e)h(or)f(mark)h (all)315 2177 y(jobs;)13 b(the)h(`)p Ft(-r)p Fu(')e(option)i(without)f (a)h Fo(jobsp)q(ec)i Fu(argumen)o(t)d(restricts)g(op)q(eration)h(to)f (running)315 2232 y(jobs.)75 2322 y Ft(suspend)435 2392 y(suspend)23 b([-f])315 2465 y Fu(Susp)q(end)17 b(the)e(execution)h(of) f(this)h(shell)h(un)o(til)f(it)g(receiv)o(es)g(a)f Ft(SIGCONT)f Fu(signal.)21 b(The)15 b(`)p Ft(-f)p Fu(')315 2519 y(option)g(means)h (to)e(susp)q(end)j(ev)o(en)e(if)h(the)f(shell)i(is)f(a)e(login)j (shell.)137 2615 y(When)f(job)f(con)o(trol)g(is)g(not)g(activ)o(e,)g (the)g Ft(kill)g Fu(and)g Ft(wait)f Fu(builtins)k(do)d(not)f(accept)i Fo(jobsp)q(ec)i Fu(argu-)75 2670 y(men)o(ts.)i(They)15 b(m)o(ust)g(b)q(e)g(supplied)j(pro)q(cess)d Fp(id)p Fu(s.)p eop %%Page: 78 80 78 79 bop 75 -58 a Fu(78)1285 b(Bash)15 b(Reference)h(Man)o(ual)75 149 y Fs(7.3)33 b(Job)22 b(Con)n(trol)h(V)-6 b(ariables)75 271 y Ft(auto_resume)315 325 y Fu(This)16 b(v)m(ariable)h(con)o(trols)f (ho)o(w)f(the)h(shell)h(in)o(teracts)f(with)g(the)f(user)h(and)g(job)g (con)o(trol.)21 b(If)315 380 y(this)15 b(v)m(ariable)g(exists)g(then)g (single)g(w)o(ord)f(simple)h(commands)f(without)h(redirections)g(are) 315 435 y(treated)g(as)f(candidates)i(for)f(resumption)g(of)g(an)g (existing)h(job.)k(There)15 b(is)h(no)f(am)o(biguit)o(y)315 490 y(allo)o(w)o(ed;)f(if)g(there)f(is)h(more)f(than)h(one)f(job)g(b)q (eginning)j(with)e(the)f(string)g(t)o(yp)q(ed,)h(then)g(the)315 545 y(most)g(recen)o(tly)h(accessed)h(job)e(will)j(b)q(e)e(selected.)21 b(The)15 b(name)g(of)f(a)g(stopp)q(ed)i(job,)e(in)i(this)315 599 y(con)o(text,)d(is)i(the)f(command)f(line)j(used)e(to)f(start)g (it.)20 b(If)14 b(this)g(v)m(ariable)i(is)e(set)g(to)f(the)h(v)m(alue) 315 654 y(`)p Ft(exact)p Fu(',)h(the)i(string)f(supplied)j(m)o(ust)d (matc)o(h)g(the)g(name)h(of)f(a)g(stopp)q(ed)h(job)f(exactly;)h(if)315 709 y(set)d(to)g(`)p Ft(substring)p Fu(',)e(the)j(string)f(supplied)j (needs)e(to)f(matc)o(h)g(a)g(substring)g(of)g(the)h(name)315 764 y(of)j(a)h(stopp)q(ed)g(job.)30 b(The)19 b(`)p Ft(substring)p Fu(')e(v)m(alue)j(pro)o(vides)f(functionalit)o(y)h(analogous)f(to)315 819 y(the)g(`)p Ft(\045?)p Fu(')f(job)g Fp(id)h Fu(\(see)g(Section)h (7.1)e([Job)g(Con)o(trol)g(Basics],)i(page)f(75\).)29 b(If)20 b(set)e(to)g(an)o(y)315 873 y(other)d(v)m(alue,)i(the)f (supplied)i(string)e(m)o(ust)f(b)q(e)i(a)e(pre\014x)h(of)g(a)f(stopp)q (ed)i(job's)e(name;)h(this)315 928 y(pro)o(vides)g(functionalit)o(y)g (analogous)f(to)f(the)i(`)p Ft(\045)p Fu(')e(job)h Fp(id)p Fu(.)p eop %%Page: 79 81 79 80 bop 75 -58 a Fu(Chapter)15 b(8:)k(Command)c(Line)i(Editing)1055 b(79)75 149 y Fq(8)41 b(Command)28 b(Line)e(Editing)137 282 y Fu(This)21 b(c)o(hapter)f(describ)q(es)h(the)f(basic)h(features)f (of)f(the)h Fp(gnu)g Fu(command)g(line)i(editing)f(in)o(terface.)75 337 y(Command)12 b(line)j(editing)f(is)g(pro)o(vided)f(b)o(y)g(the)g (Readline)h(library)l(,)g(whic)o(h)g(is)f(used)h(b)o(y)f(sev)o(eral)g (di\013eren)o(t)75 392 y(programs,)h(including)k(Bash.)75 533 y Fs(8.1)33 b(In)n(tro)r(duction)24 b(to)e(Line)i(Editing)137 635 y Fu(The)16 b(follo)o(wing)g(paragraphs)e(describ)q(e)j(the)e (notation)g(used)h(to)e(represen)o(t)i(k)o(eystrok)o(es.)137 707 y(The)h(text)f Fj(C-k)h Fu(is)g(read)g(as)f(`Con)o(trol-K')g(and)h (describ)q(es)h(the)f(c)o(haracter)f(pro)q(duced)h(when)h(the)1831 705 y Fi(h)p 1844 679 19 2 v 1844 707 a Fh(k)p 1844 715 V 1860 705 a Fi(i)75 762 y Fu(k)o(ey)d(is)h(pressed)g(while)g(the)f (Con)o(trol)g(k)o(ey)g(is)h(depressed.)137 835 y(The)g(text)g Fj(M-k)f Fu(is)i(read)f(as)f(`Meta-K')g(and)h(describ)q(es)i(the)e(c)o (haracter)f(pro)q(duced)i(when)g(the)f(Meta)75 889 y(k)o(ey)e(\(if)g(y) o(ou)g(ha)o(v)o(e)g(one\))g(is)h(depressed,)g(and)f(the)930 887 y Fi(h)p 942 861 V 942 889 a Fh(k)p 942 897 V 958 887 a Fi(i)987 889 y Fu(k)o(ey)g(is)h(pressed.)20 b(The)15 b(Meta)e(k)o(ey)h(is)h(lab)q(eled)1779 887 y Fi(h)p 1791 861 72 2 v 1791 889 a Fh(AL)m(T)p 1791 897 V 1860 887 a Fi(i)75 944 y Fu(on)e(man)o(y)g(k)o(eyb)q(oards.)19 b(On)13 b(k)o(eyb)q(oards)g(with)h(t)o(w)o(o)e(k)o(eys)g(lab)q(eled) 1213 942 y Fi(h)p 1225 916 V 1225 944 a Fh(AL)m(T)p 1225 952 V 1294 942 a Fi(i)1322 944 y Fu(\(usually)i(to)e(either)i(side)g (of)f(the)75 999 y(space)j(bar\),)f(the)388 997 y Fi(h)p 400 971 V 400 999 a Fh(AL)m(T)p 400 1007 V 469 997 a Fi(i)499 999 y Fu(on)h(the)g(left)g(side)g(is)g(generally)h(set)f(to)f (w)o(ork)g(as)g(a)g(Meta)g(k)o(ey)l(.)22 b(The)1697 997 y Fi(h)p 1709 971 V 1709 999 a Fh(AL)m(T)p 1709 1007 V 1778 997 a Fi(i)1808 999 y Fu(k)o(ey)75 1054 y(on)17 b(the)f(righ)o(t)h(ma)o(y)f(also)h(b)q(e)g(con\014gured)g(to)f(w)o(ork) g(as)g(a)h(Meta)f(k)o(ey)g(or)g(ma)o(y)g(b)q(e)i(con\014gured)f(as)f (some)75 1109 y(other)f(mo)q(di\014er,)h(suc)o(h)f(as)g(a)g(Comp)q(ose) g(k)o(ey)g(for)f(t)o(yping)i(accen)o(ted)f(c)o(haracters.)137 1181 y(If)c(y)o(ou)g(do)g(not)f(ha)o(v)o(e)h(a)f(Meta)h(or)694 1179 y Fi(h)p 706 1153 V 706 1181 a Fh(AL)m(T)p 706 1189 V 775 1179 a Fi(i)801 1181 y Fu(k)o(ey)l(,)g(or)g(another)f(k)o(ey)h(w) o(orking)f(as)h(a)f(Meta)h(k)o(ey)l(,)g(the)g(iden)o(tical)75 1236 y(k)o(eystrok)o(e)f(can)i(b)q(e)g(generated)f(b)o(y)g(t)o(yping) 809 1234 y Fi(h)p 822 1208 70 2 v 822 1236 a Fh(ESC)p 822 1244 V 888 1234 a Fi(i)915 1236 y Fn(\014rst)p Fu(,)g(and)g(then)h (t)o(yping)1339 1234 y Fi(h)p 1351 1208 19 2 v 1351 1236 a Fh(k)p 1351 1244 V 1368 1234 a Fi(i)1383 1236 y Fu(.)18 b(Either)12 b(pro)q(cess)f(is)h(kno)o(wn)75 1291 y(as)j Fo(metafying)k Fu(the)425 1289 y Fi(h)p 437 1263 V 437 1291 a Fh(k)p 437 1298 V 454 1289 a Fi(i)484 1291 y Fu(k)o(ey)l(.)137 1363 y(The)i(text)e Fj(M-C-k)h Fu(is)h(read)f(as)f(`Meta-Con)o(trol-k') g(and)h(describ)q(es)i(the)e(c)o(haracter)g(pro)q(duced)h(b)o(y)75 1418 y Fo(metafying)e Fj(C-k)p Fu(.)137 1490 y(In)g(addition,)h(sev)o (eral)f(k)o(eys)f(ha)o(v)o(e)g(their)h(o)o(wn)f(names.)30 b(Sp)q(eci\014cally)l(,)1384 1488 y Fi(h)p 1396 1462 73 2 v 1396 1490 a Fh(DEL)p 1396 1498 V 1467 1488 a Fi(i)1482 1490 y Fu(,)1514 1488 y Fi(h)p 1526 1462 70 2 v 1526 1490 a Fh(ESC)p 1526 1498 V 1593 1488 a Fi(i)1608 1490 y Fu(,)1640 1488 y Fi(h)p 1652 1462 72 2 v 1652 1490 a Fh(LFD)p 1652 1498 V 1722 1488 a Fi(i)1737 1490 y Fu(,)1768 1488 y Fi(h)p 1780 1462 70 2 v 1780 1490 a Fh(SPC)p 1780 1498 V 1847 1488 a Fi(i)1862 1490 y Fu(,)75 1543 y Fi(h)p 87 1517 76 2 v 87 1545 a Fh(RET)p 87 1553 V 160 1543 a Fi(i)175 1545 y Fu(,)23 b(and)306 1543 y Fi(h)p 318 1517 74 2 v 318 1545 a Fh(T)m(AB)p 318 1553 V 390 1543 a Fi(i)427 1545 y Fu(all)f(stand)g(for)f(themselv)o(es)h(when)h(seen)f (in)g(this)g(text,)h(or)e(in)i(an)e(init)i(\014le)g(\(see)75 1600 y(Section)c(8.3)e([Readline)i(Init)g(File],)g(page)f(82\).)28 b(If)18 b(y)o(our)f(k)o(eyb)q(oard)h(lac)o(ks)h(a)1448 1598 y Fi(h)p 1460 1572 72 2 v 1460 1600 a Fh(LFD)p 1460 1608 V 1530 1598 a Fi(i)1563 1600 y Fu(k)o(ey)l(,)g(t)o(yping)1802 1598 y Fi(h)p 1814 1572 49 2 v 1814 1600 a Fh(C-j)p 1814 1608 V 1860 1598 a Fi(i)75 1655 y Fu(will)d(pro)q(duce)g(the)f(desired) h(c)o(haracter.)j(The)874 1653 y Fi(h)p 886 1627 76 2 v 886 1655 a Fh(RET)p 886 1662 V 959 1653 a Fi(i)989 1655 y Fu(k)o(ey)c(ma)o(y)f(b)q(e)h(lab)q(eled)1385 1653 y Fi(h)p 1397 1627 109 2 v 1397 1655 a Fh(Return)p 1397 1662 V 1503 1653 a Fi(i)1533 1655 y Fu(or)1588 1653 y Fi(h)p 1600 1627 86 2 v 1600 1655 a Fh(En)o(ter)p 1600 1662 V 1684 1653 a Fi(i)1714 1655 y Fu(on)f(some)75 1710 y(k)o(eyb)q(oards.)75 1851 y Fs(8.2)33 b(Readline)23 b(In)n(teraction)137 1953 y Fu(Often)13 b(during)h(an)e(in)o(teractiv)o (e)h(session)g(y)o(ou)g(t)o(yp)q(e)f(in)i(a)e(long)h(line)h(of)e(text,) h(only)g(to)f(notice)h(that)f(the)75 2008 y(\014rst)k(w)o(ord)f(on)h (the)h(line)h(is)e(missp)q(elled.)26 b(The)16 b(Readline)i(library)f (giv)o(es)f(y)o(ou)g(a)g(set)g(of)g(commands)g(for)75 2062 y(manipulating)g(the)f(text)g(as)f(y)o(ou)h(t)o(yp)q(e)g(it)g(in,) g(allo)o(wing)h(y)o(ou)f(to)f(just)h(\014x)g(y)o(our)f(t)o(yp)q(o,)g (and)h(not)g(forcing)75 2117 y(y)o(ou)f(to)f(ret)o(yp)q(e)h(the)g(ma)s (jorit)o(y)f(of)h(the)g(line.)21 b(Using)15 b(these)f(editing)h (commands,)f(y)o(ou)g(mo)o(v)o(e)f(the)h(cursor)75 2172 y(to)i(the)i(place)g(that)e(needs)i(correction,)g(and)f(delete)h(or)f (insert)g(the)h(text)e(of)h(the)g(corrections.)26 b(Then,)75 2227 y(when)16 b(y)o(ou)f(are)h(satis\014ed)g(with)g(the)f(line,)i(y)o (ou)e(simply)i(press)1160 2225 y Fi(h)p 1172 2199 76 2 v 1172 2227 a Fh(RET)p 1172 2234 V 1245 2225 a Fi(i)1260 2227 y Fu(.)k(Y)l(ou)16 b(do)f(not)h(ha)o(v)o(e)f(to)g(b)q(e)h(at)f (the)75 2282 y(end)k(of)e(the)h(line)i(to)d(press)563 2280 y Fi(h)p 575 2254 V 575 2282 a Fh(RET)p 575 2289 V 648 2280 a Fi(i)663 2282 y Fu(;)i(the)f(en)o(tire)h(line)g(is)g (accepted)f(regardless)g(of)g(the)g(lo)q(cation)g(of)g(the)75 2336 y(cursor)d(within)h(the)g(line.)75 2459 y Fm(8.2.1)30 b(Readline)20 b(Bare)g(Essen)n(tials)137 2560 y Fu(In)12 b(order)g(to)f(en)o(ter)g(c)o(haracters)g(in)o(to)g(the)h(line,)h (simply)g(t)o(yp)q(e)f(them.)18 b(The)12 b(t)o(yp)q(ed)g(c)o(haracter)f (app)q(ears)75 2615 y(where)16 b(the)h(cursor)f(w)o(as,)f(and)h(then)h (the)f(cursor)g(mo)o(v)o(es)g(one)g(space)g(to)g(the)g(righ)o(t.)23 b(If)17 b(y)o(ou)f(mist)o(yp)q(e)g(a)75 2670 y(c)o(haracter,)e(y)o(ou)h (can)g(use)h(y)o(our)f(erase)g(c)o(haracter)f(to)h(bac)o(k)g(up)g(and)h (delete)g(the)f(mist)o(yp)q(ed)h(c)o(haracter.)p eop %%Page: 80 82 80 81 bop 75 -58 a Fu(80)1285 b(Bash)15 b(Reference)h(Man)o(ual)137 149 y(Sometimes)g(y)o(ou)f(ma)o(y)g(mist)o(yp)q(e)h(a)f(c)o(haracter,)f (and)i(not)f(notice)h(the)f(error)g(un)o(til)i(y)o(ou)e(ha)o(v)o(e)g(t) o(yp)q(ed)75 204 y(sev)o(eral)g(other)f(c)o(haracters.)19 b(In)c(that)e(case,)i(y)o(ou)f(can)g(t)o(yp)q(e)h Fj(C-b)f Fu(to)g(mo)o(v)o(e)f(the)i(cursor)f(to)g(the)g(left,)h(and)75 259 y(then)h(correct)e(y)o(our)h(mistak)o(e.)20 b(Afterw)o(ards,)13 b(y)o(ou)i(can)g(mo)o(v)o(e)g(the)g(cursor)g(to)g(the)g(righ)o(t)g (with)g Fj(C-f)p Fu(.)137 325 y(When)i(y)o(ou)f(add)g(text)g(in)h(the)g (middle)h(of)e(a)f(line,)j(y)o(ou)e(will)i(notice)f(that)f(c)o (haracters)f(to)h(the)g(righ)o(t)75 380 y(of)e(the)g(cursor)g(are)g (`pushed)h(o)o(v)o(er')f(to)f(mak)o(e)h(ro)q(om)g(for)f(the)i(text)f (that)f(y)o(ou)h(ha)o(v)o(e)g(inserted.)21 b(Lik)o(ewise,)75 435 y(when)e(y)o(ou)g(delete)h(text)e(b)q(ehind)j(the)e(cursor,)g(c)o (haracters)f(to)g(the)h(righ)o(t)f(of)g(the)h(cursor)g(are)f(`pulled)75 489 y(bac)o(k')11 b(to)g(\014ll)h(in)h(the)e(blank)h(space)g(created)f (b)o(y)h(the)f(remo)o(v)m(al)g(of)g(the)h(text.)18 b(A)11 b(list)h(of)f(the)h(bare)f(essen)o(tials)75 544 y(for)k(editing)h(the)f (text)g(of)g(an)g(input)h(line)h(follo)o(ws.)75 622 y Fj(C-b)168 b Fu(Mo)o(v)o(e)14 b(bac)o(k)h(one)h(c)o(haracter.)75 699 y Fj(C-f)168 b Fu(Mo)o(v)o(e)14 b(forw)o(ard)g(one)h(c)o(haracter.) 75 774 y Fi(h)p 87 748 73 2 v 87 776 a Fh(DEL)p 87 784 V 158 774 a Fi(i)188 776 y Fu(or)244 774 y Fi(h)p 256 748 159 2 v 256 776 a Fh(Bac)o(kspace)p 256 784 V 412 774 a Fi(i)315 831 y Fu(Delete)h(the)f(c)o(haracter)g(to)f(the)h(left)h (of)f(the)g(cursor.)75 909 y Fj(C-d)168 b Fu(Delete)16 b(the)f(c)o(haracter)g(underneath)h(the)f(cursor.)75 986 y(Prin)o(ting)h(c)o(haracters)315 1041 y(Insert)f(the)h(c)o (haracter)e(in)o(to)h(the)h(line)h(at)d(the)h(cursor.)75 1118 y Fj(C-_)g Fu(or)f Fj(C-x)h(C-u)315 1173 y Fu(Undo)i(the)g(last)f (editing)i(command.)25 b(Y)l(ou)17 b(can)g(undo)g(all)g(the)g(w)o(a)o (y)f(bac)o(k)h(to)f(an)g(empt)o(y)315 1228 y(line.)75 1305 y(\(Dep)q(ending)i(on)f(y)o(our)g(con\014guration,)g(the)863 1303 y Fi(h)p 875 1277 V 875 1305 a Fh(Bac)o(kspace)p 875 1313 V 1032 1303 a Fi(i)1063 1305 y Fu(k)o(ey)g(b)q(e)h(set)f(to)f (delete)i(the)f(c)o(haracter)g(to)f(the)75 1360 y(left)h(of)f(the)h (cursor)f(and)g(the)596 1358 y Fi(h)p 608 1332 73 2 v 608 1360 a Fh(DEL)p 608 1368 V 679 1358 a Fi(i)710 1360 y Fu(k)o(ey)h(set)f(to)g(delete)h(the)g(c)o(haracter)f(underneath)h (the)g(cursor,)f(lik)o(e)75 1415 y Fj(C-d)p Fu(,)e(rather)h(than)g(the) g(c)o(haracter)g(to)f(the)i(left)f(of)g(the)g(cursor.\))75 1523 y Fm(8.2.2)30 b(Readline)20 b(Mo)n(v)n(emen)n(t)i(Commands)137 1618 y Fu(The)14 b(ab)q(o)o(v)o(e)e(table)i(describ)q(es)g(the)g(most)e (basic)i(k)o(eystrok)o(es)d(that)i(y)o(ou)g(need)h(in)f(order)g(to)g (do)g(editing)75 1673 y(of)f(the)h(input)h(line.)21 b(F)l(or)12 b(y)o(our)g(con)o(v)o(enience,)i(man)o(y)f(other)f(commands)h(ha)o(v)o (e)f(b)q(een)i(added)f(in)h(addition)75 1728 y(to)h Fj(C-b)p Fu(,)h Fj(C-f)p Fu(,)f Fj(C-d)p Fu(,)g(and)522 1726 y Fi(h)p 534 1700 V 534 1728 a Fh(DEL)p 534 1736 V 605 1726 a Fi(i)619 1728 y Fu(.)23 b(Here)16 b(are)g(some)f(commands)h(for) f(mo)o(ving)h(more)g(rapidly)h(ab)q(out)f(the)75 1783 y(line.)75 1860 y Fj(C-a)168 b Fu(Mo)o(v)o(e)14 b(to)h(the)g(start)f (of)h(the)g(line.)75 1938 y Fj(C-e)168 b Fu(Mo)o(v)o(e)14 b(to)h(the)g(end)h(of)f(the)g(line.)75 2015 y Fj(M-f)168 b Fu(Mo)o(v)o(e)14 b(forw)o(ard)g(a)h(w)o(ord,)f(where)i(a)e(w)o(ord)h (is)h(comp)q(osed)f(of)g(letters)g(and)h(digits.)75 2092 y Fj(M-b)168 b Fu(Mo)o(v)o(e)14 b(bac)o(kw)o(ard)h(a)g(w)o(ord.)75 2170 y Fj(C-l)168 b Fu(Clear)15 b(the)h(screen,)f(reprin)o(ting)h(the)f (curren)o(t)g(line)i(at)e(the)g(top.)137 2247 y(Notice)e(ho)o(w)f Fj(C-f)g Fu(mo)o(v)o(es)f(forw)o(ard)g(a)h(c)o(haracter,)g(while)i Fj(M-f)e Fu(mo)o(v)o(es)f(forw)o(ard)g(a)h(w)o(ord.)18 b(It)13 b(is)g(a)f(lo)q(ose)75 2302 y(con)o(v)o(en)o(tion)j(that)f(con) o(trol)h(k)o(eystrok)o(es)f(op)q(erate)h(on)f(c)o(haracters)h(while)h (meta)e(k)o(eystrok)o(es)g(op)q(erate)h(on)75 2357 y(w)o(ords.)75 2465 y Fm(8.2.3)30 b(Readline)20 b(Killing)h(Commands)137 2560 y Fo(Killing)26 b Fu(text)18 b(means)g(to)g(delete)i(the)f(text)f (from)g(the)h(line,)i(but)d(to)g(sa)o(v)o(e)g(it)h(a)o(w)o(a)o(y)e(for) h(later)h(use,)75 2615 y(usually)f(b)o(y)f Fo(y)o(anking)22 b Fu(\(re-inserting\))17 b(it)g(bac)o(k)g(in)o(to)g(the)h(line.)27 b(\(`Cut')15 b(and)j(`paste')e(are)g(more)h(recen)o(t)75 2670 y(jargon)d(for)h(`kill')h(and)g(`y)o(ank'.\))p eop %%Page: 81 83 81 82 bop 75 -58 a Fu(Chapter)15 b(8:)k(Command)c(Line)i(Editing)1055 b(81)137 149 y(If)16 b(the)f(description)h(for)f(a)g(command)g(sa)o(ys) f(that)h(it)g(`kills')h(text,)e(then)i(y)o(ou)f(can)g(b)q(e)h(sure)f (that)f(y)o(ou)75 204 y(can)h(get)g(the)g(text)g(bac)o(k)g(in)h(a)f (di\013eren)o(t)g(\(or)g(the)g(same\))g(place)h(later.)137 272 y(When)c(y)o(ou)g(use)g(a)f(kill)i(command,)f(the)g(text)f(is)h(sa) o(v)o(ed)f(in)i(a)e Fo(kill-ring)p Fu(.)21 b(An)o(y)12 b(n)o(um)o(b)q(er)g(of)f(consecutiv)o(e)75 327 y(kills)17 b(sa)o(v)o(e)e(all)h(of)f(the)h(killed)i(text)d(together,)f(so)h(that)g (when)h(y)o(ou)f(y)o(ank)g(it)h(bac)o(k,)f(y)o(ou)g(get)g(it)h(all.)22 b(The)75 382 y(kill)c(ring)f(is)f(not)g(line)i(sp)q(eci\014c;)g(the)e (text)g(that)f(y)o(ou)h(killed)j(on)d(a)g(previously)h(t)o(yp)q(ed)g (line)h(is)e(a)o(v)m(ailable)75 437 y(to)f(b)q(e)g(y)o(ank)o(ed)g(bac)o (k)h(later,)e(when)i(y)o(ou)f(are)g(t)o(yping)g(another)g(line.)137 505 y(Here)h(is)f(the)h(list)g(of)e(commands)h(for)g(killing)j(text.)75 586 y Fj(C-k)168 b Fu(Kill)17 b(the)f(text)e(from)h(the)g(curren)o(t)g (cursor)g(p)q(osition)h(to)f(the)g(end)h(of)f(the)g(line.)75 667 y Fj(M-d)168 b Fu(Kill)15 b(from)e(the)g(cursor)g(to)f(the)i(end)g (of)e(the)i(curren)o(t)f(w)o(ord,)f(or,)h(if)g(b)q(et)o(w)o(een)h(w)o (ords,)e(to)h(the)315 721 y(end)j(of)f(the)g(next)g(w)o(ord.)k(W)l(ord) c(b)q(oundaries)i(are)e(the)g(same)g(as)g(those)f(used)i(b)o(y)f Fj(M-f)p Fu(.)75 802 y Fj(M-)123 800 y Fi(h)p 135 774 73 2 v 135 802 a Fh(DEL)p 135 810 V 206 800 a Fi(i)315 802 y Fu(Kill)i(from)e(the)g(cursor)g(the)h(start)e(of)h(the)g(curren)o (t)g(w)o(ord,)f(or,)h(if)g(b)q(et)o(w)o(een)h(w)o(ords,)e(to)h(the)315 857 y(start)j(of)h(the)g(previous)h(w)o(ord.)31 b(W)l(ord)19 b(b)q(oundaries)h(are)f(the)h(same)e(as)h(those)g(used)h(b)o(y)315 912 y Fj(M-b)p Fu(.)75 992 y Fj(C-w)168 b Fu(Kill)18 b(from)d(the)g(cursor)h(to)f(the)g(previous)i(whitespace.)22 b(This)16 b(is)g(di\013eren)o(t)g(than)f Fj(M-)1777 990 y Fi(h)p 1789 964 V 1789 992 a Fh(DEL)p 1789 1000 V 1860 990 a Fi(i)315 1047 y Fu(b)q(ecause)h(the)f(w)o(ord)g(b)q(oundaries)h (di\013er.)137 1128 y(Here)21 b(is)h(ho)o(w)e(to)g Fo(y)o(ank)j Fu(the)e(text)f(bac)o(k)h(in)o(to)g(the)f(line.)39 b(Y)l(anking)21 b(means)g(to)f(cop)o(y)h(the)g(most-)75 1183 y(recen)o(tly-killed)d (text)d(from)f(the)i(kill)h(bu\013er.)75 1264 y Fj(C-y)168 b Fu(Y)l(ank)15 b(the)h(most)e(recen)o(tly)i(killed)h(text)e(bac)o(k)g (in)o(to)g(the)h(bu\013er)f(at)f(the)i(cursor.)75 1344 y Fj(M-y)168 b Fu(Rotate)16 b(the)h(kill-ring,)j(and)d(y)o(ank)g(the)h (new)f(top.)26 b(Y)l(ou)17 b(can)h(only)g(do)f(this)h(if)f(the)h(prior) 315 1399 y(command)d(is)h Fj(C-y)f Fu(or)f Fj(M-y)p Fu(.)75 1513 y Fm(8.2.4)30 b(Readline)20 b(Argumen)n(ts)137 1610 y Fu(Y)l(ou)15 b(can)g(pass)f(n)o(umeric)i(argumen)o(ts)e(to)g (Readline)h(commands.)20 b(Sometimes)15 b(the)g(argumen)o(t)e(acts)75 1665 y(as)20 b(a)f(rep)q(eat)i(coun)o(t,)f(other)g(times)g(it)h(is)f (the)g Fn(sign)j Fu(of)c(the)h(argumen)o(t)g(that)f(is)i(signi\014can)o (t.)35 b(If)20 b(y)o(ou)75 1720 y(pass)d(a)f(negativ)o(e)h(argumen)o(t) f(to)g(a)g(command)h(whic)o(h)h(normally)f(acts)f(in)i(a)e(forw)o(ard)g (direction,)i(that)75 1775 y(command)g(will)h(act)e(in)i(a)e(bac)o(kw)o (ard)g(direction.)28 b(F)l(or)17 b(example,)i(to)e(kill)j(text)d(bac)o (k)g(to)g(the)h(start)e(of)75 1829 y(the)f(line,)i(y)o(ou)e(migh)o(t)g (t)o(yp)q(e)g(`)p Ft(M--)f(C-k)p Fu('.)137 1898 y(The)h(general)f(w)o (a)o(y)f(to)h(pass)g(n)o(umeric)h(argumen)o(ts)e(to)g(a)h(command)g(is) h(to)e(t)o(yp)q(e)h(meta)g(digits)h(b)q(efore)75 1952 y(the)h(command.)k(If)c(the)f(\014rst)g(`digit')h(t)o(yp)q(ed)f(is)h(a) g(min)o(us)g(sign)g(\(`)p Ft(-)p Fu('\),)d(then)j(the)f(sign)h(of)f (the)h(argumen)o(t)75 2007 y(will)21 b(b)q(e)f(negativ)o(e.)31 b(Once)20 b(y)o(ou)f(ha)o(v)o(e)g(t)o(yp)q(ed)g(one)g(meta)g(digit)h (to)e(get)h(the)g(argumen)o(t)f(started,)h(y)o(ou)75 2062 y(can)c(t)o(yp)q(e)f(the)h(remainder)g(of)f(the)g(digits,)h(and)g (then)g(the)f(command.)20 b(F)l(or)13 b(example,)i(to)f(giv)o(e)h(the)f Fj(C-d)75 2117 y Fu(command)19 b(an)f(argumen)o(t)g(of)g(10,)h(y)o(ou)f (could)i(t)o(yp)q(e)f(`)p Ft(M-1)14 b(0)h(C-d)p Fu(',)k(whic)o(h)g (will)h(delete)g(the)f(next)g(ten)75 2172 y(c)o(haracters)14 b(on)i(the)f(input)h(line.)75 2285 y Fm(8.2.5)30 b(Searc)n(hing)21 b(for)f(Commands)h(in)f(the)h(History)137 2383 y Fu(Readline)13 b(pro)o(vides)f(commands)f(for)g(searc)o(hing)h(through)f(the)g (command)h(history)f(\(see)h(Section)g(9.1)75 2437 y([Bash)18 b(History)g(F)l(acilities],)j(page)d(103\))f(for)h(lines)i(con)o (taining)f(a)f(sp)q(eci\014ed)j(string.)30 b(There)18 b(are)g(t)o(w)o(o)75 2492 y(searc)o(h)d(mo)q(des:)20 b Fo(incremen)o(tal)e Fu(and)e Fo(non-incremen)o(tal)p Fu(.)137 2560 y(Incremen)o(tal)e(searc)o(hes)f(b)q(egin)h(b)q(efore)f (the)g(user)g(has)g(\014nished)h(t)o(yping)f(the)g(searc)o(h)g(string.) 19 b(As)13 b(eac)o(h)75 2615 y(c)o(haracter)k(of)g(the)h(searc)o(h)g (string)f(is)h(t)o(yp)q(ed,)h(Readline)g(displa)o(ys)f(the)g(next)g(en) o(try)f(from)g(the)h(history)75 2670 y(matc)o(hing)12 b(the)g(string)g(t)o(yp)q(ed)g(so)g(far.)18 b(An)13 b(incremen)o(tal)g (searc)o(h)f(requires)g(only)h(as)f(man)o(y)f(c)o(haracters)g(as)p eop %%Page: 82 84 82 83 bop 75 -58 a Fu(82)1285 b(Bash)15 b(Reference)h(Man)o(ual)75 149 y(needed)g(to)d(\014nd)j(the)e(desired)i(history)e(en)o(try)l(.)19 b(T)l(o)c(searc)o(h)f(bac)o(kw)o(ard)f(in)j(the)e(history)g(for)g(a)g (particular)75 204 y(string,)g(t)o(yp)q(e)h Fj(C-r)p Fu(.)k(T)o(yping)d Fj(C-s)e Fu(searc)o(hes)h(forw)o(ard)e(through)h (the)h(history)l(.)20 b(The)15 b(c)o(haracters)f(presen)o(t)75 259 y(in)20 b(the)f(v)m(alue)h(of)f(the)g Ft(isearch-terminators)d Fu(v)m(ariable)k(are)f(used)h(to)e(terminate)h(an)g(incremen)o(tal)75 314 y(searc)o(h.)31 b(If)19 b(that)f(v)m(ariable)i(has)f(not)f(b)q(een) i(assigned)g(a)e(v)m(alue,)j(the)1289 312 y Fi(h)p 1301 286 70 2 v 1301 314 a Fh(ESC)p 1301 322 V 1368 312 a Fi(i)1402 314 y Fu(and)e Fj(C-J)f Fu(c)o(haracters)g(will)75 369 y(terminate)j(an)g(incremen)o(tal)i(searc)o(h.)37 b Fj(C-g)21 b Fu(will)i(ab)q(ort)e(an)g(incremen)o(tal)h(searc)o(h)f (and)g(restore)g(the)75 423 y(original)16 b(line.)21 b(When)15 b(the)f(searc)o(h)g(is)h(terminated,)g(the)f(history)h(en)o (try)f(con)o(taining)h(the)g(searc)o(h)f(string)75 478 y(b)q(ecomes)i(the)f(curren)o(t)g(line.)137 546 y(T)l(o)g(\014nd)i (other)e(matc)o(hing)g(en)o(tries)h(in)h(the)e(history)h(list,)g(t)o (yp)q(e)f Fj(C-r)g Fu(or)g Fj(C-s)g Fu(as)h(appropriate.)k(This)75 601 y(will)15 b(searc)o(h)e(bac)o(kw)o(ard)f(or)g(forw)o(ard)g(in)i (the)f(history)g(for)g(the)g(next)g(en)o(try)g(matc)o(hing)g(the)g (searc)o(h)g(string)75 655 y(t)o(yp)q(ed)19 b(so)g(far.)30 b(An)o(y)19 b(other)f(k)o(ey)h(sequence)h(b)q(ound)g(to)e(a)h(Readline) h(command)e(will)j(terminate)e(the)75 710 y(searc)o(h)10 b(and)h(execute)g(that)f(command.)18 b(F)l(or)10 b(instance,)i(a)1063 708 y Fi(h)p 1076 682 76 2 v 1076 710 a Fh(RET)p 1076 718 V 1149 708 a Fi(i)1174 710 y Fu(will)g(terminate)f(the)g(searc)o(h) f(and)h(accept)75 765 y(the)k(line,)h(thereb)o(y)f(executing)g(the)g (command)g(from)f(the)g(history)h(list.)20 b(A)15 b(mo)o(v)o(emen)o(t)f (command)g(will)75 820 y(terminate)h(the)g(searc)o(h,)g(mak)o(e)g(the)g (last)g(line)i(found)f(the)f(curren)o(t)g(line,)h(and)g(b)q(egin)g (editing.)137 887 y(Readline)j(remem)o(b)q(ers)e(the)h(last)f(incremen) o(tal)i(searc)o(h)e(string.)27 b(If)17 b(t)o(w)o(o)f Fj(C-r)p Fu(s)h(are)g(t)o(yp)q(ed)h(without)75 942 y(an)o(y)g(in)o (terv)o(ening)h(c)o(haracters)f(de\014ning)h(a)f(new)h(searc)o(h)f (string,)g(an)o(y)g(remem)o(b)q(ered)h(searc)o(h)f(string)g(is)75 997 y(used.)137 1065 y(Non-incremen)o(tal)25 b(searc)o(hes)e(read)h (the)f(en)o(tire)h(searc)o(h)f(string)g(b)q(efore)h(starting)f(to)f (searc)o(h)i(for)75 1119 y(matc)o(hing)d(history)h(lines.)39 b(The)22 b(searc)o(h)f(string)g(ma)o(y)g(b)q(e)h(t)o(yp)q(ed)f(b)o(y)h (the)f(user)h(or)e(b)q(e)i(part)f(of)g(the)75 1174 y(con)o(ten)o(ts)15 b(of)f(the)i(curren)o(t)f(line.)75 1304 y Fs(8.3)33 b(Readline)23 b(Init)h(File)137 1401 y Fu(Although)f(the)g(Readline)h(library)f (comes)g(with)g(a)f(set)g(of)g(Emacs-lik)o(e)i(k)o(eybindings)g (installed)75 1455 y(b)o(y)d(default,)h(it)f(is)h(p)q(ossible)g(to)e (use)i(a)e(di\013eren)o(t)h(set)g(of)f(k)o(eybindings.)39 b(An)o(y)20 b(user)h(can)g(customize)75 1510 y(programs)15 b(that)h(use)g(Readline)i(b)o(y)e(putting)g(commands)g(in)i(an)e Fo(inputrc)k Fu(\014le,)d(con)o(v)o(en)o(tionally)g(in)g(his)75 1565 y(home)d(directory)l(.)20 b(The)15 b(name)f(of)g(this)h(\014le)g (is)g(tak)o(en)f(from)f(the)i(v)m(alue)g(of)f(the)h(shell)h(v)m (ariable)f Ft(INPUTRC)p Fu(.)75 1620 y(If)g(that)g(v)m(ariable)i(is)e (unset,)g(the)h(default)f(is)h(`)p Ft(~/.inputrc)p Fu('.)137 1687 y(When)f(a)g(program)f(whic)o(h)h(uses)g(the)g(Readline)h(library) g(starts)d(up,)i(the)g(init)h(\014le)g(is)f(read,)g(and)g(the)75 1742 y(k)o(ey)g(bindings)i(are)e(set.)137 1810 y(In)f(addition,)h(the)e Ft(C-x)i(C-r)e Fu(command)g(re-reads)h(this)g(init)g(\014le,)h(th)o(us) e(incorp)q(orating)h(an)o(y)f(c)o(hanges)75 1865 y(that)h(y)o(ou)h (migh)o(t)g(ha)o(v)o(e)g(made)g(to)g(it.)75 1977 y Fm(8.3.1)30 b(Readline)20 b(Init)g(File)h(Syn)n(tax)137 2074 y Fu(There)c(are)g (only)g(a)g(few)f(basic)i(constructs)e(allo)o(w)o(ed)i(in)f(the)g (Readline)h(init)g(\014le.)26 b(Blank)18 b(lines)g(are)75 2129 y(ignored.)36 b(Lines)22 b(b)q(eginning)h(with)d(a)h(`)p Ft(#)p Fu(')e(are)h(commen)o(ts.)35 b(Lines)22 b(b)q(eginning)h(with)e (a)f(`)p Ft($)p Fu(')f(indicate)75 2184 y(conditional)j(constructs)f (\(see)f(Section)i(8.3.2)d([Conditional)j(Init)f(Constructs],)g(page)f (87\).)36 b(Other)75 2239 y(lines)17 b(denote)e(v)m(ariable)i(settings) e(and)g(k)o(ey)g(bindings.)75 2319 y(V)l(ariable)h(Settings)315 2374 y(Y)l(ou)k(can)h(mo)q(dify)g(the)f(run-time)h(b)q(eha)o(vior)g(of) e(Readline)j(b)o(y)e(altering)h(the)f(v)m(alues)h(of)315 2428 y(v)m(ariables)d(in)g(Readline)g(using)f(the)g Ft(set)g Fu(command)f(within)i(the)f(init)h(\014le.)26 b(The)17 b(syn)o(tax)315 2483 y(is)f(simple:)435 2548 y Ft(set)23 b Fo(v)m(ariable)28 b(v)m(alue)315 2615 y Fu(Here,)14 b(for)f(example,)h(is)g(ho)o(w)f(to)g(c)o(hange)h(from)f(the)h(default) g(Emacs-lik)o(e)h(k)o(ey)e(binding)j(to)315 2670 y(use)g Ft(vi)e Fu(line)j(editing)g(commands:)p eop %%Page: 83 85 83 84 bop 75 -58 a Fu(Chapter)15 b(8:)k(Command)c(Line)i(Editing)1055 b(83)435 149 y Ft(set)23 b(editing-mode)g(vi)315 216 y Fu(V)l(ariable)c(names)e(and)h(v)m(alues,)h(where)e(appropriate,)h (are)f(recognized)i(without)e(regard)315 271 y(to)e(case.)315 337 y(The)k Ft(bind)c(-V)j Fu(command)h(lists)h(the)f(curren)o(t)g (Readline)h(v)m(ariable)g(names)f(and)g(v)m(alues.)315 392 y(See)d(Section)g(4.2)e([Bash)h(Builtins],)i(page)e(36.)315 458 y(A)g(great)g(deal)g(of)g(run-time)h(b)q(eha)o(vior)g(is)g(c)o (hangeable)g(with)f(the)h(follo)o(wing)f(v)m(ariables.)315 536 y Ft(bell-style)555 591 y Fu(Con)o(trols)21 b(what)h(happ)q(ens)h (when)f(Readline)h(w)o(an)o(ts)e(to)g(ring)i(the)f(termi-)555 645 y(nal)d(b)q(ell.)32 b(If)19 b(set)f(to)g(`)p Ft(none)p Fu(',)g(Readline)i(nev)o(er)f(rings)g(the)f(b)q(ell.)32 b(If)19 b(set)g(to)555 700 y(`)p Ft(visible)p Fu(',)c(Readline)i(uses)g (a)f(visible)j(b)q(ell)g(if)e(one)f(is)h(a)o(v)m(ailable.)26 b(If)16 b(set)h(to)555 755 y(`)p Ft(audible)p Fu(')g(\(the)h (default\),)i(Readline)g(attempts)e(to)g(ring)h(the)g(terminal's)555 810 y(b)q(ell.)315 888 y Ft(comment-begin)555 943 y Fu(The)c(string)f (to)g(insert)i(at)d(the)i(b)q(eginning)i(of)d(the)h(line)h(when)f(the)g Ft(insert-)555 997 y(comment)f Fu(command)h(is)h(executed.)21 b(The)15 b(default)h(v)m(alue)g(is)g Ft("#")p Fu(.)315 1075 y Ft(completion-ignore-case)555 1130 y Fu(If)e(set)f(to)g(`)p Ft(on)p Fu(',)g(Readline)i(p)q(erforms)e(\014lename)i(matc)o(hing)f (and)g(completion)555 1185 y(in)i(a)f(case-insensitiv)o(e)i(fashion.)k (The)15 b(default)h(v)m(alue)g(is)g(`)p Ft(off)p Fu('.)315 1263 y Ft(completion-query-items)555 1317 y Fu(The)d(n)o(um)o(b)q(er)h (of)e(p)q(ossible)j(completions)g(that)d(determines)i(when)g(the)f (user)555 1372 y(is)21 b(ask)o(ed)g(whether)g(he)h(w)o(an)o(ts)d(to)i (see)g(the)g(list)h(of)e(p)q(ossibilitie)q(s.)40 b(If)21 b(the)555 1427 y(n)o(um)o(b)q(er)14 b(of)f(p)q(ossible)i(completions)f (is)g(greater)f(than)g(this)h(v)m(alue,)h(Readline)555 1482 y(will)g(ask)e(the)g(user)h(whether)f(or)g(not)g(he)g(wishes)h(to) f(view)h(them;)f(otherwise,)555 1537 y(they)f(are)g(simply)i(listed.)20 b(This)13 b(v)m(ariable)g(m)o(ust)f(b)q(e)h(set)f(to)f(an)h(in)o(teger) h(v)m(alue)555 1591 y(greater)h(than)h(or)g(equal)h(to)f(0.)k(The)d (default)f(limit)i(is)f Ft(100)p Fu(.)315 1669 y Ft(convert-meta)555 1724 y Fu(If)11 b(set)g(to)g(`)p Ft(on)p Fu(',)f(Readline)i(will)h(con) o(v)o(ert)d(c)o(haracters)h(with)g(the)g(eigh)o(th)h(bit)f(set)555 1779 y(to)f(an)h Fp(asci)q(i)e Fu(k)o(ey)i(sequence)g(b)o(y)g (stripping)h(the)e(eigh)o(th)h(bit)h(and)e(pre\014xing)i(an)555 1832 y Fi(h)p 567 1806 70 2 v 567 1834 a Fh(ESC)p 567 1841 V 634 1832 a Fi(i)666 1834 y Fu(c)o(haracter,)k(con)o(v)o(erting)h (them)g(to)f(a)h(meta-pre\014xed)g(k)o(ey)g(sequence.)555 1888 y(The)e(default)h(v)m(alue)h(is)e(`)p Ft(on)p Fu('.)315 1966 y Ft(disable-completion)555 2021 y Fu(If)k(set)f(to)f(`)p Ft(On)p Fu(',)h(Readline)i(will)g(inhibit)g(w)o(ord)e(completion.)30 b(Completion)555 2076 y(c)o(haracters)12 b(will)j(b)q(e)f(inserted)g (in)o(to)f(the)g(line)h(as)f(if)h(they)f(had)g(b)q(een)h(mapp)q(ed)555 2131 y(to)h Ft(self-insert)p Fu(.)j(The)d(default)h(is)g(`)p Ft(off)p Fu('.)315 2209 y Ft(editing-mode)555 2263 y Fu(The)f Ft(editing-mode)d Fu(v)m(ariable)k(con)o(trols)e(whic)o(h)h (default)g(set)f(of)g(k)o(ey)g(bind-)555 2318 y(ings)f(is)g(used.)20 b(By)12 b(default,)i(Readline)f(starts)f(up)h(in)g(Emacs)f(editing)i (mo)q(de,)555 2373 y(where)h(the)f(k)o(eystrok)o(es)g(are)g(most)g (similar)i(to)d(Emacs.)20 b(This)15 b(v)m(ariable)h(can)555 2428 y(b)q(e)g(set)f(to)f(either)i(`)p Ft(emacs)p Fu(')e(or)h(`)p Ft(vi)p Fu('.)315 2506 y Ft(enable-keypad)555 2560 y Fu(When)d(set)f(to)h(`)p Ft(on)p Fu(',)e(Readline)j(will)h(try)d(to)g (enable)i(the)f(application)h(k)o(eypad)555 2615 y(when)h(it)f(is)h (called.)21 b(Some)13 b(systems)g(need)h(this)g(to)f(enable)h(the)g (arro)o(w)e(k)o(eys.)555 2670 y(The)j(default)h(is)g(`)p Ft(off)p Fu('.)p eop %%Page: 84 86 84 85 bop 75 -58 a Fu(84)1285 b(Bash)15 b(Reference)h(Man)o(ual)315 149 y Ft(expand-tilde)555 204 y Fu(If)e(set)g(to)f(`)p Ft(on)p Fu(',)f(tilde)k(expansion)e(is)h(p)q(erformed)f(when)g (Readline)h(attempts)555 259 y(w)o(ord)g(completion.)21 b(The)15 b(default)h(is)f(`)p Ft(off)p Fu('.)555 336 y(If)g(set)g(to)f(`)p Ft(on)p Fu(',)g(the)g(history)h(co)q(de)h (attempts)e(to)g(place)i(p)q(oin)o(t)f(at)f(the)h(same)555 391 y(lo)q(cation)20 b(on)f(eac)o(h)g(history)h(line)g(retriv)o(ed)g (with)f Ft(previous-history)e Fu(or)555 445 y Ft(next-history)p Fu(.)315 544 y Ft(horizontal-scroll-mode)555 599 y Fu(This)i(v)m (ariable)g(can)f(b)q(e)g(set)g(to)f(either)i(`)p Ft(on)p Fu(')e(or)g(`)p Ft(off)p Fu('.)27 b(Setting)19 b(it)f(to)f(`)p Ft(on)p Fu(')555 654 y(means)c(that)f(the)i(text)e(of)h(the)g(lines)i (b)q(eing)f(edited)g(will)h(scroll)f(horizon)o(tally)555 708 y(on)i(a)f(single)i(screen)g(line)g(when)g(they)f(are)f(longer)h (than)g(the)g(width)g(of)g(the)555 763 y(screen,)e(instead)f(of)g (wrapping)g(on)o(to)f(a)h(new)g(screen)h(line.)21 b(By)13 b(default,)h(this)555 818 y(v)m(ariable)j(is)e(set)g(to)g(`)p Ft(off)p Fu('.)315 917 y Ft(input-meta)555 971 y Fu(If)h(set)f(to)g(`)p Ft(on)p Fu(',)f(Readline)j(will)h(enable)e(eigh)o(t-bit)h(input)f(\(it) g(will)h(not)e(clear)555 1026 y(the)20 b(eigh)o(th)g(bit)g(in)h(the)f (c)o(haracters)f(it)h(reads\),)g(regardless)g(of)g(what)f(the)555 1081 y(terminal)i(claims)g(it)f(can)g(supp)q(ort.)34 b(The)20 b(default)h(v)m(alue)g(is)g(`)p Ft(off)p Fu('.)33 b(The)555 1136 y(name)15 b Ft(meta-flag)f Fu(is)i(a)f(synon)o(ym)g(for) f(this)i(v)m(ariable.)315 1234 y Ft(isearch-terminators)555 1289 y Fu(The)26 b(string)g(of)f(c)o(haracters)g(that)g(should)i (terminate)f(an)g(incremen)o(tal)555 1344 y(searc)o(h)12 b(without)h(subsequen)o(tly)g(executing)h(the)e(c)o(haracter)g(as)g(a)g (command)555 1399 y(\(see)20 b(Section)i(8.2.5)c([Searc)o(hing],)k (page)e(81\).)35 b(If)20 b(this)h(v)m(ariable)h(has)e(not)555 1454 y(b)q(een)d(giv)o(en)f(a)g(v)m(alue,)g(the)g(c)o(haracters)1247 1452 y Fi(h)p 1259 1426 70 2 v 1259 1454 a Fh(ESC)p 1259 1461 V 1326 1452 a Fi(i)1357 1454 y Fu(and)g Fj(C-J)f Fu(will)i(terminate)f(an)555 1508 y(incremen)o(tal)g(searc)o(h.)315 1607 y Ft(keymap)96 b Fu(Sets)19 b(Readline's)i(idea)f(of)f(the)g (curren)o(t)h(k)o(eymap)f(for)f(k)o(ey)i(binding)h(com-)555 1662 y(mands.)41 b(Acceptable)23 b Ft(keymap)f Fu(names)g(are)f Ft(emacs)p Fu(,)i Ft(emacs-standard)p Fu(,)555 1717 y Ft(emacs-meta)p Fu(,)49 b Ft(emacs-ctlx)p Fu(,)g Ft(vi)p Fu(,)h Ft(vi-move)p Fu(,)f Ft(vi-command)p Fu(,)g(and)555 1771 y Ft(vi-insert)p Fu(.)31 b Ft(vi)20 b Fu(is)g(equiv)m(alen)o(t)h (to)e Ft(vi-command)p Fu(;)g Ft(emacs)g Fu(is)h(equiv)m(alen)o(t)555 1826 y(to)15 b Ft(emacs-standard)p Fu(.)20 b(The)d(default)f(v)m(alue)h (is)g Ft(emacs)p Fu(.)k(The)16 b(v)m(alue)h(of)f(the)555 1881 y Ft(editing-mode)e Fu(v)m(ariable)i(also)f(a\013ects)g(the)g (default)h(k)o(eymap.)315 1980 y Ft(mark-directories)555 2034 y Fu(If)j(set)g(to)g(`)p Ft(on)p Fu(',)f(completed)i(directory)g (names)f(ha)o(v)o(e)f(a)h(slash)h(app)q(ended.)555 2089 y(The)15 b(default)h(is)g(`)p Ft(on)p Fu('.)315 2188 y Ft(mark-modified-lines)555 2243 y Fu(This)j(v)m(ariable,)g(when)g (set)e(to)h(`)p Ft(on)p Fu(',)f(causes)h(Readline)h(to)e(displa)o(y)i (an)f(as-)555 2297 y(terisk)f(\(`)p Ft(*)p Fu('\))e(at)i(the)f(start)g (of)h(history)f(lines)j(whic)o(h)e(ha)o(v)o(e)g(b)q(een)h(mo)q (di\014ed.)555 2352 y(This)e(v)m(ariable)g(is)g(`)p Ft(off)p Fu(')e(b)o(y)h(default.)315 2451 y Ft(match-hidden-files)555 2506 y Fu(This)d(v)m(ariable,)h(when)e(set)g(to)g(`)p Ft(on)p Fu(',)f(causes)h(Readline)i(to)d(matc)o(h)h(\014les)h(whose)555 2560 y(names)22 b(b)q(egin)h(with)g(a)e(`)p Ft(.)p Fu(')h(\(hidden)h (\014les\))g(when)f(p)q(erforming)h(\014lename)555 2615 y(completion,)g(unless)f(the)f(leading)h(`)p Ft(.)p Fu(')e(is)h (supplied)i(b)o(y)e(the)f(user)h(in)h(the)555 2670 y(\014lename)16 b(to)f(b)q(e)h(completed.)21 b(This)15 b(v)m(ariable)i(is)f(`)p Ft(on)p Fu(')e(b)o(y)h(default.)p eop %%Page: 85 87 85 86 bop 75 -58 a Fu(Chapter)15 b(8:)k(Command)c(Line)i(Editing)1055 b(85)315 149 y Ft(output-meta)555 204 y Fu(If)18 b(set)f(to)g(`)p Ft(on)p Fu(',)g(Readline)i(will)h(displa)o(y)f(c)o(haracters)d(with)j (the)e(eigh)o(th)h(bit)555 259 y(set)g(directly)i(rather)d(than)h(as)g (a)g(meta-pre\014xed)h(escap)q(e)g(sequence.)30 b(The)555 314 y(default)16 b(is)f(`)p Ft(off)p Fu('.)315 404 y Ft(print-completions-horizont)o(ally)555 459 y Fu(If)d(set)g(to)f(`)p Ft(on)p Fu(',)h(Readline)h(will)g(displa)o(y)h(completions)f(with)f (matc)o(hes)f(sorted)555 514 y(horizon)o(tally)23 b(in)f(alphab)q (etical)i(order,)f(rather)e(than)g(do)o(wn)h(the)g(screen.)555 568 y(The)15 b(default)h(is)g(`)p Ft(off)p Fu('.)315 658 y Ft(show-all-if-ambiguous)555 713 y Fu(This)g(alters)e(the)i (default)f(b)q(eha)o(vior)h(of)e(the)h(completion)h(functions.)21 b(If)15 b(set)555 768 y(to)e(`)p Ft(on)p Fu(',)g(w)o(ords)g(whic)o(h)h (ha)o(v)o(e)g(more)f(than)g(one)h(p)q(ossible)i(completion)f(cause)555 823 y(the)20 b(matc)o(hes)f(to)f(b)q(e)j(listed)f(immediately)h (instead)f(of)f(ringing)i(the)e(b)q(ell.)555 878 y(The)c(default)h(v)m (alue)h(is)e(`)p Ft(off)p Fu('.)315 968 y Ft(visible-stats)555 1023 y Fu(If)h(set)g(to)f(`)p Ft(on)p Fu(',)g(a)h(c)o(haracter)f (denoting)h(a)g(\014le's)h(t)o(yp)q(e)f(is)g(app)q(ended)i(to)d(the)555 1077 y(\014lename)h(when)g(listing)h(p)q(ossible)g(completions.)j(The)c (default)g(is)f(`)p Ft(off)p Fu('.)75 1167 y(Key)h(Bindings)315 1222 y(The)21 b(syn)o(tax)f(for)h(con)o(trolling)h(k)o(ey)f(bindings)h (in)g(the)f(init)h(\014le)g(is)g(simple.)39 b(First)20 b(y)o(ou)315 1277 y(need)15 b(to)e(\014nd)h(the)g(name)g(of)g(the)f (command)h(that)f(y)o(ou)h(w)o(an)o(t)f(to)g(c)o(hange.)19 b(The)14 b(follo)o(wing)315 1332 y(sections)k(con)o(tain)h(tables)f(of) f(the)h(command)g(name,)g(the)g(default)h(k)o(eybinding,)h(if)e(an)o(y) l(,)315 1387 y(and)d(a)g(short)g(description)i(of)d(what)h(the)g (command)g(do)q(es.)315 1459 y(Once)k(y)o(ou)f(kno)o(w)f(the)h(name)g (of)g(the)g(command,)g(simply)h(place)g(on)f(a)f(line)j(in)f(the)f (init)315 1514 y(\014le)g(the)f(name)g(of)f(the)h(k)o(ey)g(y)o(ou)f (wish)i(to)e(bind)i(the)f(command)g(to,)f(a)g(colon,)i(and)f(then)315 1569 y(the)f(name)g(of)g(the)g(command.)22 b(The)16 b(name)g(of)g(the)g (k)o(ey)f(can)i(b)q(e)f(expressed)h(in)g(di\013eren)o(t)315 1624 y(w)o(a)o(ys,)d(dep)q(ending)j(on)e(what)g(y)o(ou)g(\014nd)h(most) e(comfortable.)315 1696 y(In)19 b(addition)g(to)e(command)h(names,)g (readline)i(allo)o(ws)e(k)o(eys)g(to)f(b)q(e)i(b)q(ound)g(to)e(a)h (string)315 1751 y(that)c(is)i(inserted)g(when)g(the)f(k)o(ey)g(is)h (pressed)g(\(a)e Fo(macro)r Fu(\).)315 1823 y(The)22 b Ft(bind)14 b(-p)21 b Fu(command)h(displa)o(ys)g(Readline)h(function)f (names)g(and)g(bindings)h(in)f(a)315 1878 y(format)17 b(that)h(can)h(put)f(directly)i(in)o(to)f(an)f(initialization)j (\014le.)31 b(See)19 b(Section)h(4.2)d([Bash)315 1933 y(Builtins],)g(page)e(36.)315 2023 y Fo(k)o(eyname)s Fu(:)k Fo(function-name)g Fu(or)c Fo(macro)555 2078 y(k)o(eyname)i Fu(is)e(the)f(name)h(of)f(a)g(k)o(ey)g(sp)q(elled)j(out)d(in)h (English.)21 b(F)l(or)13 b(example:)675 2147 y Ft(Control-u:)22 b(universal-argument)675 2199 y(Meta-Rubout:)g(backward-kill-word)675 2251 y(Control-o:)g(">)i(output")555 2324 y Fu(In)c(the)f(ab)q(o)o(v)o (e)g(example,)i Fj(C-u)e Fu(is)h(b)q(ound)g(to)f(the)g(function)h Ft(universal-)555 2378 y(argument)p Fu(,)e Fj(M-DEL)h Fu(is)g(b)q(ound)h(to)e(the)h(function)h Ft(backward-kill-word)p Fu(,)555 2433 y(and)g Fj(C-o)f Fu(is)h(b)q(ound)g(to)f(run)h(the)f (macro)g(expressed)h(on)g(the)f(righ)o(t)h(hand)555 2488 y(side)c(\(that)e(is,)i(to)e(insert)i(the)f(text)g(`)p Ft(>)f(output)p Fu(')g(in)o(to)i(the)f(line\).)555 2560 y(A)k(n)o(um)o(b)q(er)f(of)g(sym)o(b)q(olic)i(c)o(haracter)e(names)g (are)g(recognized)i(while)g(pro-)555 2615 y(cessing)13 b(this)f(k)o(ey)g(binding)h(syn)o(tax:)18 b Fo(DEL)p Fu(,)11 b Fo(ESC)p Fu(,)h Fo(ESCAPE)p Fu(,)f Fo(LFD)p Fu(,)g Fo(NEW-)555 2670 y(LINE)p Fu(,)16 b Fo(RET)p Fu(,)e Fo(RETURN)p Fu(,)f Fo(R)o(UBOUT)p Fu(,)i Fo(SP)l(A)o(CE)p Fu(,)g Fo(SPC)p Fu(,)f(and)i Fo(T)l(AB)p Fu(.)p eop %%Page: 86 88 86 87 bop 75 -58 a Fu(86)1285 b(Bash)15 b(Reference)h(Man)o(ual)315 149 y Ft(")p Fo(k)o(eyseq)q Ft(")p Fu(:)k Fo(function-name)e Fu(or)d Fo(macro)555 204 y(k)o(eyseq)i Fu(di\013ers)e(from)g Fo(k)o(eyname)j Fu(ab)q(o)o(v)o(e)d(in)i(that)d(strings)i(denoting)g (an)f(en-)555 259 y(tire)i(k)o(ey)g(sequence)h(can)f(b)q(e)g(sp)q (eci\014ed,)i(b)o(y)e(placing)h(the)f(k)o(ey)g(sequence)h(in)555 314 y(double)e(quotes.)j(Some)c Fp(gnu)g Fu(Emacs)f(st)o(yle)h(k)o(ey)g (escap)q(es)g(can)g(b)q(e)g(used,)g(as)555 369 y(in)j(the)f(follo)o (wing)g(example,)h(but)f(the)g(sp)q(ecial)i(c)o(haracter)d(names)h(are) f(not)555 423 y(recognized.)675 485 y Ft("\\C-u":)23 b(universal-argument)675 537 y("\\C-x\\C-r":)f(re-read-init-file)675 589 y("\\e[11~":)h("Function)f(Key)i(1")555 653 y Fu(In)33 b(the)f(ab)q(o)o(v)o(e)g(example,)37 b Fj(C-u)32 b Fu(is)h(again)f(b)q (ound)h(to)f(the)g(function)555 708 y Ft(universal-argument)19 b Fu(\(just)j(as)f(it)h(w)o(as)f(in)i(the)f(\014rst)f(example\),)j(`)p Fj(C-x)555 763 y(C-r)p Fu(')c(is)h(b)q(ound)g(to)f(the)h(function)g Ft(re-read-init-file)p Fu(,)f(and)g(`)1731 761 y Fi(h)p 1743 735 70 2 v 1743 763 a Fh(ESC)p 1743 771 V 1810 761 a Fi(i)15 b(h)p 1852 735 10 2 v 1852 763 a Fh([)p 1852 771 V 1860 761 a Fi(i)555 816 y(h)p 567 790 18 2 v 567 818 a Fh(1)p 567 826 V 583 816 a Fi(i)g(h)p 625 790 V 625 818 a Fh(1)p 625 826 V 640 816 a Fi(i)g(h)p 683 790 24 2 v 683 818 a Ft(~)p 683 826 V 704 816 a Fi(i)719 818 y Fu(')g(is)h(b)q(ound)g(to)e(insert)i(the)f(text)g(`)p Ft(Function)f(Key)g(1)p Fu('.)315 892 y(The)h(follo)o(wing)h Fp(gnu)e Fu(Emacs)h(st)o(yle)g(escap)q(e)h(sequences)g(are)e(a)o(v)m (ailable)j(when)e(sp)q(ecifying)315 947 y(k)o(ey)g(sequences:)315 1021 y Fj(\\C-)168 b Fu(con)o(trol)15 b(pre\014x)315 1096 y Fj(\\M-)168 b Fu(meta)15 b(pre\014x)315 1170 y Fj(\\e)192 b Fu(an)15 b(escap)q(e)h(c)o(haracter)315 1245 y Fj(\\\\)192 b Fu(bac)o(kslash)315 1319 y Fj(\\)p Ft(")555 1317 y Fi(h)p 567 1291 V 567 1319 a Ft(")p 567 1327 V 589 1317 a Fi(i)604 1319 y Fu(,)15 b(a)f(double)j(quotation)e (mark)315 1394 y Fj(\\')555 1392 y Fi(h)p 567 1366 10 2 v 567 1394 a Fh(')p 567 1401 V 575 1392 a Fi(i)590 1394 y Fu(,)g(a)f(single)j(quote)e(or)g(ap)q(ostrophe)315 1468 y(In)f(addition)h(to)f(the)f Fp(gnu)h Fu(Emacs)g(st)o(yle)f(escap) q(e)i(sequences,)g(a)e(second)i(set)e(of)h(bac)o(kslash)315 1523 y(escap)q(es)i(is)g(a)o(v)m(ailable:)315 1597 y Ft(\\a)192 b Fu(alert)15 b(\(b)q(ell\))315 1672 y Ft(\\b)192 b Fu(bac)o(kspace)315 1746 y Ft(\\d)g Fu(delete)315 1820 y Ft(\\f)g Fu(form)14 b(feed)315 1895 y Ft(\\n)192 b Fu(newline)315 1969 y Ft(\\r)g Fu(carriage)15 b(return)315 2044 y Ft(\\t)192 b Fu(horizon)o(tal)16 b(tab)315 2118 y Ft(\\v)192 b Fu(v)o(ertical)16 b(tab)315 2192 y Ft(\\)p Fo(nnn)141 b Fu(the)17 b(eigh)o(t-bit)h(c)o(haracter)f(whose)g(v)m (alue)i(is)e(the)h(o)q(ctal)f(v)m(alue)i Fo(nnn)f Fu(\(one)f(to)555 2247 y(three)e(digits\))315 2322 y Ft(\\x)p Fo(HH)124 b Fu(the)20 b(eigh)o(t-bit)g(c)o(haracter)f(whose)h(v)m(alue)h(is)f (the)g(hexadecimal)h(v)m(alue)g Fo(HH)555 2376 y Fu(\(one)15 b(or)g(t)o(w)o(o)f(hex)h(digits\))315 2451 y(When)k(en)o(tering)g(the)g (text)f(of)g(a)h(macro,)f(single)i(or)e(double)i(quotes)f(m)o(ust)f(b)q (e)h(used)h(to)315 2506 y(indicate)12 b(a)f(macro)f(de\014nition.)20 b(Unquoted)11 b(text)f(is)i(assumed)e(to)h(b)q(e)g(a)f(function)i (name.)18 b(In)315 2560 y(the)11 b(macro)f(b)q(o)q(dy)l(,)i(the)f(bac)o (kslash)g(escap)q(es)g(describ)q(ed)i(ab)q(o)o(v)o(e)d(are)g(expanded.) 20 b(Bac)o(kslash)315 2615 y(will)i(quote)d(an)o(y)h(other)g(c)o (haracter)f(in)i(the)f(macro)f(text,)h(including)j(`)p Ft(")p Fu(')c(and)h(`)p Ft(')p Fu('.)34 b(F)l(or)315 2670 y(example,)14 b(the)f(follo)o(wing)g(binding)i(will)g(mak)o(e)d(`) p Fj(C-x)i Ft(\\)p Fu(')f(insert)g(a)g(single)h(`)p Ft(\\)p Fu(')e(in)o(to)h(the)g(line:)p eop %%Page: 87 89 87 88 bop 75 -58 a Fu(Chapter)15 b(8:)k(Command)c(Line)i(Editing)1055 b(87)435 149 y Ft("\\C-x\\\\":)23 b("\\\\")75 254 y Fm(8.3.2)30 b(Conditional)20 b(Init)g(Constructs)137 348 y Fu(Readline)f(implemen)o (ts)g(a)f(facilit)o(y)g(similar)h(in)g(spirit)f(to)f(the)h(conditional) h(compilation)g(features)75 403 y(of)e(the)g(C)g(prepro)q(cessor)g (whic)o(h)i(allo)o(ws)e(k)o(ey)g(bindings)i(and)f(v)m(ariable)g (settings)f(to)g(b)q(e)h(p)q(erformed)f(as)75 458 y(the)e(result)h(of)f (tests.)k(There)c(are)g(four)g(parser)g(directiv)o(es)h(used.)75 533 y Ft($if)168 b Fu(The)16 b Ft($if)f Fu(construct)g(allo)o(ws)h (bindings)i(to)d(b)q(e)h(made)g(based)g(on)f(the)h(editing)h(mo)q(de,)f (the)315 587 y(terminal)k(b)q(eing)g(used,)g(or)f(the)g(application)i (using)e(Readline.)33 b(The)19 b(text)g(of)f(the)i(test)315 642 y(extends)c(to)e(the)h(end)h(of)f(the)g(line;)i(no)e(c)o(haracters) f(are)h(required)i(to)d(isolate)i(it.)315 717 y Ft(mode)144 b Fu(The)11 b Ft(mode=)e Fu(form)h(of)g(the)h Ft($if)f Fu(directiv)o(e)h(is)g(used)g(to)f(test)g(whether)h(Readline)555 772 y(is)k(in)h Ft(emacs)e Fu(or)g Ft(vi)g Fu(mo)q(de.)20 b(This)c(ma)o(y)e(b)q(e)h(used)g(in)h(conjunction)g(with)f(the)555 827 y(`)p Ft(set)f(keymap)p Fu(')f(command,)g(for)h(instance,)g(to)f (set)h(bindings)h(in)g(the)f Ft(emacs-)555 882 y(standard)d Fu(and)i Ft(emacs-ctlx)e Fu(k)o(eymaps)h(only)i(if)f(Readline)g(is)g (starting)f(out)555 936 y(in)k Ft(emacs)f Fu(mo)q(de.)315 1011 y Ft(term)144 b Fu(The)14 b Ft(term=)e Fu(form)h(ma)o(y)g(b)q(e)h (used)g(to)f(include)j(terminal-sp)q(eci\014c)g(k)o(ey)d(bind-)555 1066 y(ings,)19 b(p)q(erhaps)g(to)e(bind)i(the)g(k)o(ey)e(sequences)j (output)e(b)o(y)g(the)g(terminal's)555 1121 y(function)13 b(k)o(eys.)18 b(The)13 b(w)o(ord)e(on)h(the)g(righ)o(t)g(side)g(of)g (the)g(`)p Ft(=)p Fu(')f(is)h(tested)g(against)555 1176 y(b)q(oth)j(the)g(full)i(name)e(of)f(the)h(terminal)h(and)f(the)g(p)q (ortion)h(of)e(the)h(terminal)555 1230 y(name)i(b)q(efore)g(the)g (\014rst)f(`)p Ft(-)p Fu('.)24 b(This)17 b(allo)o(ws)g Ft(sun)f Fu(to)g(matc)o(h)h(b)q(oth)f Ft(sun)h Fu(and)555 1285 y Ft(sun-cmd)p Fu(,)d(for)g(instance.)315 1360 y Ft(application)555 1415 y Fu(The)d Fo(application)i Fu(construct)e(is)g (used)h(to)e(include)j(application-sp)q(eci)q(\014c)h(set-)555 1470 y(tings.)19 b(Eac)o(h)12 b(program)f(using)j(the)e(Readline)i (library)f(sets)f(the)g Fo(application)555 1524 y(name)p Fu(,)g(and)g(y)o(ou)f(can)h(test)f(for)g(a)g(particular)h(v)m(alue.)20 b(This)12 b(could)h(b)q(e)f(used)h(to)555 1579 y(bind)18 b(k)o(ey)e(sequences)i(to)d(functions)j(useful)f(for)f(a)g(sp)q (eci\014c)i(program.)23 b(F)l(or)555 1634 y(instance,)17 b(the)g(follo)o(wing)g(command)g(adds)f(a)g(k)o(ey)h(sequence)g(that)f (quotes)555 1689 y(the)f(curren)o(t)g(or)g(previous)h(w)o(ord)e(in)j (Bash:)675 1751 y Ft($if)23 b(Bash)675 1803 y(#)h(Quote)f(the)g (current)g(or)h(previous)f(word)675 1855 y("\\C-xq":)g ("\\eb\\"\\ef\\"")675 1906 y($endif)75 1981 y($endif)96 b Fu(This)16 b(command,)e(as)h(seen)h(in)g(the)f(previous)h(example,)g (terminates)f(an)g Ft($if)f Fu(command.)75 2056 y Ft($else)120 b Fu(Commands)15 b(in)h(this)f(branc)o(h)h(of)e(the)i Ft($if)e Fu(directiv)o(e)j(are)e(executed)h(if)g(the)f(test)g(fails.)75 2131 y Ft($include)48 b Fu(This)22 b(directiv)o(e)h(tak)o(es)e(a)h (single)h(\014lename)g(as)e(an)h(argumen)o(t)f(and)h(reads)f(commands) 315 2186 y(and)e(bindings)j(from)c(that)h(\014le.)33 b(F)l(or)19 b(example,)i(the)e(follo)o(wing)h(directiv)o(e)h(reads)e (from)315 2241 y(`)p Ft(/etc/inputrc)p Fu(':)435 2303 y Ft($include)k(/etc/inputrc)75 2407 y Fm(8.3.3)30 b(Sample)20 b(Init)h(File)137 2501 y Fu(Here)16 b(is)g(an)f(example)h(of)f(an)g Fo(inputrc)k Fu(\014le.)i(This)16 b(illustrates)g(k)o(ey)f(binding,)i (v)m(ariable)f(assignmen)o(t,)75 2556 y(and)f(conditional)i(syn)o(tax.) p eop %%Page: 88 90 88 89 bop 75 -58 a Fu(88)1285 b(Bash)15 b(Reference)h(Man)o(ual)195 201 y Ft(#)24 b(This)f(file)g(controls)g(the)h(behaviour)e(of)i(line)f (input)g(editing)g(for)195 253 y(#)h(programs)e(that)i(use)f(the)h(Gnu) f(Readline)g(library.)47 b(Existing)22 b(programs)195 305 y(#)i(include)f(FTP,)g(Bash,)g(and)h(Gdb.)195 357 y(#)195 409 y(#)g(You)f(can)h(re-read)f(the)g(inputrc)g(file)g(with)h (C-x)f(C-r.)195 461 y(#)h(Lines)f(beginning)g(with)g('#')g(are)h (comments.)195 513 y(#)195 565 y(#)g(First,)f(include)g(any)g (systemwide)g(bindings)f(and)i(variable)f(assignments)f(from)195 616 y(#)i(/etc/Inputrc)195 668 y($include)f(/etc/Inputrc)195 772 y(#)195 824 y(#)h(Set)f(various)g(bindings)g(for)g(emacs)g(mode.) 195 928 y(set)g(editing-mode)g(emacs)195 1032 y($if)g(mode=emacs)195 1135 y(Meta-Control-h:)46 b(backward-kill-word)21 b(Text)i(after)h(the) f(function)g(name)g(is)h(ignored)195 1239 y(#)195 1291 y(#)g(Arrow)f(keys)g(in)h(keypad)f(mode)195 1343 y(#)195 1395 y(#"\\M-OD":)190 b(backward-char)195 1447 y(#"\\M-OC":)g (forward-char)195 1499 y(#"\\M-OA":)g(previous-history)195 1550 y(#"\\M-OB":)g(next-history)195 1602 y(#)195 1654 y(#)24 b(Arrow)f(keys)g(in)h(ANSI)f(mode)195 1706 y(#)195 1758 y("\\M-[D":)190 b(backward-char)195 1810 y("\\M-[C":)g (forward-char)195 1862 y("\\M-[A":)g(previous-history)195 1914 y("\\M-[B":)g(next-history)195 1966 y(#)195 2017 y(#)24 b(Arrow)f(keys)g(in)h(8)g(bit)f(keypad)g(mode)195 2069 y(#)195 2121 y(#"\\M-\\C-OD":)165 b(backward-char)195 2173 y(#"\\M-\\C-OC":)g(forward-char)195 2225 y(#"\\M-\\C-OA":)g (previous-history)195 2277 y(#"\\M-\\C-OB":)g(next-history)195 2329 y(#)195 2381 y(#)24 b(Arrow)f(keys)g(in)h(8)g(bit)f(ANSI)g(mode) 195 2433 y(#)195 2484 y(#"\\M-\\C-[D":)165 b(backward-char)195 2536 y(#"\\M-\\C-[C":)g(forward-char)195 2588 y(#"\\M-\\C-[A":)g (previous-history)195 2640 y(#"\\M-\\C-[B":)g(next-history)p eop %%Page: 89 91 89 90 bop 75 -58 a Fu(Chapter)15 b(8:)k(Command)c(Line)i(Editing)1055 b(89)195 201 y Ft(C-q:)23 b(quoted-insert)195 305 y($endif)195 409 y(#)h(An)f(old-style)g(binding.)47 b(This)23 b(happens)g(to)g(be)h (the)f(default.)195 461 y(TAB:)g(complete)195 565 y(#)h(Macros)f(that)g (are)h(convenient)e(for)h(shell)h(interaction)195 616 y($if)f(Bash)195 668 y(#)h(edit)f(the)g(path)195 720 y("\\C-xp":)g("PATH=${PATH}\\e\\C-e\\C-a\\)o(ef\\C-f")195 772 y(#)h(prepare)f(to)g(type)h(a)f(quoted)g(word)h(--)f(insert)g(open) h(and)f(close)g(double)g(quotes)195 824 y(#)h(and)f(move)g(to)h(just)f (after)h(the)f(open)g(quote)195 876 y("\\C-x\\"":)g("\\"\\"\\C-b")195 928 y(#)h(insert)f(a)g(backslash)g(\(testing)g(backslash)g(escapes)f (in)i(sequences)f(and)g(macros\))195 980 y("\\C-x\\\\":)g("\\\\")195 1032 y(#)h(Quote)f(the)g(current)g(or)h(previous)f(word)195 1083 y("\\C-xq":)g("\\eb\\"\\ef\\"")195 1135 y(#)h(Add)f(a)h(binding)f (to)g(refresh)g(the)h(line,)f(which)g(is)h(unbound)195 1187 y("\\C-xr":)f(redraw-current-line)195 1239 y(#)h(Edit)f(variable)g (on)g(current)g(line.)195 1291 y("\\M-\\C-v":)f ("\\C-a\\C-k$\\C-y\\M-\\C-e\\C-a\\C-y=)o(")195 1343 y($endif)195 1447 y(#)i(use)f(a)h(visible)f(bell)g(if)h(one)f(is)h(available)195 1499 y(set)f(bell-style)g(visible)195 1602 y(#)h(don't)f(strip)g (characters)g(to)g(7)h(bits)f(when)h(reading)195 1654 y(set)f(input-meta)g(on)195 1758 y(#)h(allow)f(iso-latin1)f(characters) h(to)g(be)h(inserted)f(rather)g(than)g(converted)g(to)195 1810 y(#)h(prefix-meta)e(sequences)195 1862 y(set)h(convert-meta)g(off) 195 1966 y(#)h(display)f(characters)f(with)h(the)h(eighth)f(bit)g(set)h (directly)f(rather)g(than)195 2017 y(#)h(as)f(meta-prefixed)f (characters)195 2069 y(set)h(output-meta)g(on)195 2173 y(#)h(if)f(there)g(are)h(more)f(than)h(150)f(possible)g(completions)f (for)i(a)f(word,)h(ask)f(the)195 2225 y(#)h(user)f(if)h(he)f(wants)g (to)h(see)f(all)h(of)f(them)195 2277 y(set)g(completion-query-items)e (150)195 2381 y(#)j(For)f(FTP)195 2433 y($if)g(Ftp)195 2484 y("\\C-xg":)g("get)g(\\M-?")195 2536 y("\\C-xt":)g("put)g(\\M-?") 195 2588 y("\\M-.":)g(yank-last-arg)195 2640 y($endif)p eop %%Page: 90 92 90 91 bop 75 -58 a Fu(90)1285 b(Bash)15 b(Reference)h(Man)o(ual)75 149 y Fs(8.4)33 b(Bindable)24 b(Readline)f(Commands)137 246 y Fu(This)c(section)f(describ)q(es)i(Readline)f(commands)e(that)g (ma)o(y)h(b)q(e)g(b)q(ound)h(to)e(k)o(ey)h(sequences.)29 b(Y)l(ou)75 301 y(can)14 b(list)i(y)o(our)e(k)o(ey)g(bindings)i(b)o(y)e (executing)i Ft(bind)e(-P)g Fu(or,)g(for)g(a)g(more)g(terse)g(format,)f (suitable)i(for)f(an)75 355 y Fo(inputrc)k Fu(\014le,)e Ft(bind)e(-p)p Fu(.)20 b(\(See)14 b(Section)i(4.2)d([Bash)h(Builtins],) i(page)f(36.\))k(Command)14 b(names)g(without)75 410 y(an)h(accompan)o(ying)h(k)o(ey)f(sequence)h(are)f(un)o(b)q(ound)h(b)o (y)f(default.)137 478 y(In)f(the)f(follo)o(wing)h(descriptions,)h Fo(p)q(oin)o(t)f Fu(refers)f(to)g(the)g(curren)o(t)g(cursor)f(p)q (osition,)j(and)e Fo(mark)i Fu(refers)75 532 y(to)k(a)g(cursor)g(p)q (osition)h(sa)o(v)o(ed)f(b)o(y)h(the)f Ft(set-mark)g Fu(command.)32 b(The)20 b(text)f(b)q(et)o(w)o(een)g(the)h(p)q(oin)o(t)g (and)75 587 y(mark)15 b(is)g(referred)h(to)e(as)h(the)g Fo(region)p Fu(.)75 699 y Fm(8.4.1)30 b(Commands)21 b(F)-5 b(or)19 b(Mo)n(ving)75 821 y Ft(beginning-of-line)13 b(\(C-a\))315 876 y Fu(Mo)o(v)o(e)h(to)h(the)g(start)f(of)h(the)g (curren)o(t)g(line.)75 968 y Ft(end-of-line)f(\(C-e\))315 1023 y Fu(Mo)o(v)o(e)g(to)h(the)g(end)h(of)f(the)g(line.)75 1115 y Ft(forward-char)f(\(C-f\))315 1170 y Fu(Mo)o(v)o(e)g(forw)o(ard) g(a)h(c)o(haracter.)75 1262 y Ft(backward-char)e(\(C-b\))315 1317 y Fu(Mo)o(v)o(e)h(bac)o(k)h(a)g(c)o(haracter.)75 1409 y Ft(forward-word)f(\(M-f\))315 1464 y Fu(Mo)o(v)o(e)g(forw)o(ard) g(to)g(the)i(end)g(of)e(the)h(next)h(w)o(ord.)j(W)l(ords)c(are)f(comp)q (osed)i(of)f(letters)g(and)315 1519 y(digits.)75 1611 y Ft(backward-word)e(\(M-b\))315 1666 y Fu(Mo)o(v)o(e)j(bac)o(k)g(to)h (the)f(start)g(of)g(the)h(curren)o(t)g(or)f(previous)i(w)o(ord.)24 b(W)l(ords)16 b(are)h(comp)q(osed)315 1721 y(of)e(letters)g(and)g (digits.)75 1813 y Ft(clear-screen)f(\(C-l\))315 1868 y Fu(Clear)f(the)h(screen)g(and)f(redra)o(w)g(the)g(curren)o(t)g(line,) i(lea)o(ving)g(the)e(curren)o(t)g(line)i(at)e(the)g(top)315 1923 y(of)i(the)g(screen.)75 2015 y Ft(redraw-current-line)e(\(\))315 2070 y Fu(Refresh)i(the)g(curren)o(t)g(line.)22 b(By)15 b(default,)h(this)f(is)h(un)o(b)q(ound.)75 2182 y Fm(8.4.2)30 b(Commands)21 b(F)-5 b(or)19 b(Manipulating)i(The)f(History)75 2304 y Ft(accept-line)14 b(\(Newline)g(or)h(Return\))315 2358 y Fu(Accept)d(the)g(line)h(regardless)f(of)g(where)f(the)h(cursor) g(is.)19 b(If)12 b(this)g(line)h(is)g(non-empt)o(y)l(,)f(add)g(it)315 2413 y(to)g(the)i(history)f(list)h(according)f(to)f(the)i(setting)f(of) f(the)i Ft(HISTCONTROL)d Fu(and)i Ft(HISTIGNORE)315 2468 y Fu(v)m(ariables.)22 b(If)15 b(this)h(line)h(is)f(a)f(mo)q(di\014ed)i (history)e(line,)i(then)e(restore)g(the)g(history)h(line)h(to)315 2523 y(its)e(original)i(state.)75 2615 y Ft(previous-history)c(\(C-p\)) 315 2670 y Fu(Mo)o(v)o(e)h(`bac)o(k')h(through)f(the)i(history)f(list,) g(fetc)o(hing)h(the)f(previous)h(command.)p eop %%Page: 91 93 91 92 bop 75 -58 a Fu(Chapter)15 b(8:)k(Command)c(Line)i(Editing)1055 b(91)75 149 y Ft(next-history)14 b(\(C-n\))315 204 y Fu(Mo)o(v)o(e)g(`forw)o(ard')f(through)i(the)h(history)f(list,)g(fetc)o (hing)h(the)f(next)h(command.)75 307 y Ft(beginning-of-history)c (\(M-<\))315 362 y Fu(Mo)o(v)o(e)i(to)h(the)g(\014rst)g(line)i(in)f (the)f(history)l(.)75 465 y Ft(end-of-history)e(\(M->\))315 520 y Fu(Mo)o(v)o(e)h(to)h(the)g(end)h(of)f(the)g(input)h(history)l(,)f (i.e.,)g(the)g(line)i(curren)o(tly)f(b)q(eing)g(en)o(tered.)75 624 y Ft(reverse-search-history)c(\(C-r\))315 678 y Fu(Searc)o(h)k(bac) o(kw)o(ard)e(starting)h(at)g(the)h(curren)o(t)f(line)j(and)d(mo)o(ving) h(`up')f(through)g(the)h(his-)315 733 y(tory)e(as)h(necessary)l(.)20 b(This)c(is)g(an)f(incremen)o(tal)h(searc)o(h.)75 836 y Ft(forward-search-history)c(\(C-s\))315 891 y Fu(Searc)o(h)j(forw)o (ard)e(starting)h(at)h(the)f(curren)o(t)h(line)h(and)f(mo)o(ving)g(`do) o(wn')f(through)g(the)h(the)315 946 y(history)g(as)g(necessary)l(.)20 b(This)c(is)g(an)f(incremen)o(tal)h(searc)o(h.)75 1049 y Ft(non-incremental-reverse-se)o(arch-hi)o(story)c(\(M-p\))315 1104 y Fu(Searc)o(h)k(bac)o(kw)o(ard)e(starting)h(at)g(the)h(curren)o (t)f(line)j(and)d(mo)o(ving)h(`up')f(through)g(the)h(his-)315 1159 y(tory)h(as)h(necessary)g(using)h(a)e(non-incremen)o(tal)j(searc)o (h)e(for)f(a)h(string)g(supplied)i(b)o(y)e(the)315 1214 y(user.)75 1317 y Ft(non-incremental-forward-se)o(arch-hi)o(story)12 b(\(M-n\))315 1372 y Fu(Searc)o(h)j(forw)o(ard)e(starting)h(at)h(the)f (curren)o(t)h(line)h(and)f(mo)o(ving)g(`do)o(wn')f(through)g(the)h(the) 315 1426 y(history)e(as)g(necessary)h(using)g(a)f(non-incremen)o(tal)i (searc)o(h)e(for)g(a)g(string)g(supplied)j(b)o(y)d(the)315 1481 y(user.)75 1584 y Ft(history-search-forward)f(\(\))315 1639 y Fu(Searc)o(h)21 b(forw)o(ard)e(through)i(the)f(history)h(for)f (the)h(string)g(of)f(c)o(haracters)g(b)q(et)o(w)o(een)h(the)315 1694 y(start)16 b(of)h(the)h(curren)o(t)g(line)h(and)e(the)h(p)q(oin)o (t.)28 b(This)18 b(is)g(a)f(non-incremen)o(tal)i(searc)o(h.)27 b(By)315 1749 y(default,)15 b(this)h(command)f(is)h(un)o(b)q(ound.)75 1852 y Ft(history-search-backward)c(\(\))315 1907 y Fu(Searc)o(h)18 b(bac)o(kw)o(ard)e(through)h(the)h(history)f(for)g(the)g(string)h(of)f (c)o(haracters)f(b)q(et)o(w)o(een)i(the)315 1962 y(start)e(of)h(the)h (curren)o(t)g(line)h(and)e(the)h(p)q(oin)o(t.)28 b(This)18 b(is)g(a)f(non-incremen)o(tal)i(searc)o(h.)27 b(By)315 2016 y(default,)15 b(this)h(command)f(is)h(un)o(b)q(ound.)75 2120 y Ft(yank-nth-arg)e(\(M-C-y\))315 2174 y Fu(Insert)f(the)g (\014rst)g(argumen)o(t)f(to)g(the)i(previous)f(command)g(\(usually)h (the)f(second)h(w)o(ord)e(on)315 2229 y(the)j(previous)h(line\))g(at)e (p)q(oin)o(t.)21 b(With)15 b(an)g(argumen)o(t)f Fo(n)p Fu(,)h(insert)g(the)g Fo(n)p Fu(th)g(w)o(ord)g(from)f(the)315 2284 y(previous)g(command)g(\(the)f(w)o(ords)f(in)j(the)e(previous)i (command)e(b)q(egin)i(with)e(w)o(ord)g(0\).)19 b(A)315 2339 y(negativ)o(e)13 b(argumen)o(t)f(inserts)h(the)g Fo(n)p Fu(th)g(w)o(ord)f(from)g(the)h(end)h(of)e(the)h(previous)g (command.)75 2442 y Ft(yank-last-arg)g(\(M-.)i(or)g(M-_\))315 2497 y Fu(Insert)j(last)f(argumen)o(t)g(to)g(the)g(previous)i(command)e (\(the)g(last)h(w)o(ord)f(of)g(the)g(previous)315 2552 y(history)e(en)o(try\).)20 b(With)15 b(an)g(argumen)o(t,)g(b)q(eha)o(v) o(e)g(exactly)h(lik)o(e)g Ft(yank-nth-arg)p Fu(.)j(Succes-)315 2606 y(siv)o(e)f(calls)g(to)f Ft(yank-last-arg)e Fu(mo)o(v)o(e)i(bac)o (k)g(through)g(the)g(history)g(list,)i(inserting)f(the)315 2661 y(last)d(argumen)o(t)g(of)f(eac)o(h)i(line)g(in)g(turn.)p eop %%Page: 92 94 92 93 bop 75 -58 a Fu(92)1285 b(Bash)15 b(Reference)h(Man)o(ual)75 149 y Fm(8.4.3)30 b(Commands)21 b(F)-5 b(or)19 b(Changing)i(T)-5 b(ext)75 268 y Ft(delete-char)14 b(\(C-d\))315 323 y Fu(Delete)20 b(the)g(c)o(haracter)e(at)h(p)q(oin)o(t.)33 b(If)20 b(p)q(oin)o(t)g(is)g(at)e(the)i(b)q(eginning)i(of)d(the)g (line,)j(there)315 377 y(are)c(no)h(c)o(haracters)e(in)j(the)e(line,)j (and)e(the)f(last)h(c)o(haracter)e(t)o(yp)q(ed)i(w)o(as)f(not)g(b)q (ound)i(to)315 432 y Ft(delete-char)p Fu(,)13 b(then)j(return)f Fp(eof)p Fu(.)75 522 y Ft(backward-delete-char)d(\(Rubout\))315 576 y Fu(Delete)k(the)f(c)o(haracter)f(b)q(ehind)j(the)f(cursor.)j(A)c (n)o(umeric)h(argumen)o(t)e(means)i(to)e(kill)j(the)315 631 y(c)o(haracters)d(instead)i(of)f(deleting)i(them.)75 721 y Ft(forward-backward-delete-ch)o(ar)12 b(\(\))315 775 y Fu(Delete)20 b(the)f(c)o(haracter)f(under)i(the)f(cursor,)h (unless)g(the)f(cursor)g(is)h(at)e(the)h(end)h(of)f(the)315 830 y(line,)e(in)g(whic)o(h)g(case)e(the)h(c)o(haracter)g(b)q(ehind)h (the)f(cursor)g(is)g(deleted.)23 b(By)16 b(default,)h(this)315 885 y(is)f(not)f(b)q(ound)h(to)e(a)h(k)o(ey)l(.)75 974 y Ft(quoted-insert)e(\(C-q)i(or)g(C-v\))315 1029 y Fu(Add)j(the)f(next) g(c)o(haracter)g(t)o(yp)q(ed)g(to)f(the)i(line)g(v)o(erbatim.)26 b(This)18 b(is)f(ho)o(w)g(to)g(insert)g(k)o(ey)315 1084 y(sequences)f(lik)o(e)h Fj(C-q)p Fu(,)d(for)h(example.)75 1173 y Ft(self-insert)f(\(a,)g(b,)h(A,)g(1,)g(!,)g(...)o(\))315 1228 y Fu(Insert)g(y)o(ourself.)75 1318 y Ft(transpose-chars)e(\(C-t\)) 315 1372 y Fu(Drag)i(the)h(c)o(haracter)f(b)q(efore)h(the)h(cursor)e (forw)o(ard)g(o)o(v)o(er)g(the)h(c)o(haracter)f(at)h(the)g(cursor,)315 1427 y(mo)o(ving)i(the)f(cursor)h(forw)o(ard)e(as)i(w)o(ell.)28 b(If)18 b(the)g(insertion)h(p)q(oin)o(t)f(is)g(at)f(the)h(end)h(of)e (the)315 1482 y(line,)c(then)e(this)h(transp)q(oses)e(the)h(last)g(t)o (w)o(o)f(c)o(haracters)g(of)h(the)g(line.)20 b(Negativ)o(e)11 b(argumen)o(ts)315 1537 y(ha)o(v)o(e)k(no)g(e\013ect.)75 1626 y Ft(transpose-words)e(\(M-t\))315 1681 y Fu(Drag)i(the)h(w)o(ord) g(b)q(efore)g(p)q(oin)o(t)h(past)f(the)g(w)o(ord)f(after)h(p)q(oin)o (t,)g(mo)o(ving)g(p)q(oin)o(t)h(past)f(that)315 1736 y(w)o(ord)d(as)h(w)o(ell.)21 b(If)14 b(the)g(insertion)i(p)q(oin)o(t)e (is)h(at)f(the)g(end)h(of)e(the)i(line,)g(this)g(transp)q(oses)f(the) 315 1791 y(last)h(t)o(w)o(o)f(w)o(ords)g(on)i(the)f(line.)75 1880 y Ft(upcase-word)f(\(M-u\))315 1935 y Fu(Upp)q(ercase)j(the)f (curren)o(t)g(\(or)f(follo)o(wing\))h(w)o(ord.)22 b(With)16 b(a)g(negativ)o(e)g(argumen)o(t,)f(upp)q(er-)315 1989 y(case)g(the)g(previous)h(w)o(ord,)f(but)g(do)g(not)g(mo)o(v)o(e)f(the) i(cursor.)75 2079 y Ft(downcase-word)d(\(M-l\))315 2134 y Fu(Lo)o(w)o(ercase)d(the)h(curren)o(t)g(\(or)f(follo)o(wing\))h(w)o (ord.)17 b(With)11 b(a)g(negativ)o(e)g(argumen)o(t,)f(lo)o(w)o(ercase) 315 2188 y(the)15 b(previous)h(w)o(ord,)e(but)i(do)f(not)g(mo)o(v)o(e)f (the)h(cursor.)75 2278 y Ft(capitalize-word)e(\(M-c\))315 2333 y Fu(Capitalize)f(the)f(curren)o(t)f(\(or)g(follo)o(wing\))h(w)o (ord.)18 b(With)11 b(a)f(negativ)o(e)h(argumen)o(t,)f(capitalize)315 2387 y(the)15 b(previous)h(w)o(ord,)e(but)i(do)f(not)g(mo)o(v)o(e)f (the)h(cursor.)75 2497 y Fm(8.4.4)30 b(Killing)20 b(And)h(Y)-5 b(anking)75 2615 y Ft(kill-line)14 b(\(C-k\))315 2670 y Fu(Kill)j(the)f(text)e(from)h(p)q(oin)o(t)h(to)e(the)h(end)h(of)f (the)g(line.)p eop %%Page: 93 95 93 94 bop 75 -58 a Fu(Chapter)15 b(8:)k(Command)c(Line)i(Editing)1055 b(93)75 149 y Ft(backward-kill-line)13 b(\(C-x)h(Rubout\))315 204 y Fu(Kill)j(bac)o(kw)o(ard)e(to)f(the)i(b)q(eginning)h(of)e(the)g (line.)75 295 y Ft(unix-line-discard)e(\(C-u\))315 349 y Fu(Kill)k(bac)o(kw)o(ard)e(from)f(the)i(cursor)e(to)h(the)g(b)q (eginning)j(of)c(the)i(curren)o(t)f(line.)75 440 y Ft(kill-whole-line)e (\(\))315 495 y Fu(Kill)20 b(all)g(c)o(haracters)d(on)h(the)h(curren)o (t)f(line,)i(no)e(matter)g(where)g(p)q(oin)o(t)h(is.)29 b(By)19 b(default,)315 549 y(this)d(is)f(un)o(b)q(ound.)75 640 y Ft(kill-word)f(\(M-d\))315 695 y Fu(Kill)j(from)d(p)q(oin)o(t)h (to)f(the)h(end)g(of)f(the)h(curren)o(t)g(w)o(ord,)e(or)i(if)g(b)q(et)o (w)o(een)g(w)o(ords,)e(to)i(the)f(end)315 750 y(of)h(the)g(next)g(w)o (ord.)20 b(W)l(ord)14 b(b)q(oundaries)j(are)e(the)g(same)g(as)g Ft(forward-word)p Fu(.)75 840 y Ft(backward-kill-word)e(\(M-)592 838 y Fi(h)p 603 812 73 2 v 603 840 a Fh(DEL)p 603 848 V 674 838 a Fi(i)689 840 y Ft(\))315 895 y Fu(Kill)k(the)d(w)o(ord)g(b) q(ehind)i(p)q(oin)o(t.)21 b(W)l(ord)14 b(b)q(oundaries)h(are)f(the)h (same)f(as)g Ft(backward-word)p Fu(.)75 985 y Ft(unix-word-rubout)f (\(C-w\))315 1040 y Fu(Kill)18 b(the)e(w)o(ord)f(b)q(ehind)j(p)q(oin)o (t,)e(using)h(white)f(space)g(as)g(a)f(w)o(ord)g(b)q(oundary)l(.)23 b(The)16 b(killed)315 1095 y(text)f(is)g(sa)o(v)o(ed)g(on)g(the)h (kill-ring.)75 1185 y Ft(delete-horizontal-space)c(\(\))315 1240 y Fu(Delete)k(all)g(spaces)f(and)h(tabs)e(around)i(p)q(oin)o(t.)k (By)15 b(default,)h(this)f(is)h(un)o(b)q(ound.)75 1330 y Ft(kill-region)e(\(\))315 1385 y Fu(Kill)j(the)f(text)e(in)i(the)g (curren)o(t)f(region.)20 b(By)15 b(default,)h(this)f(command)g(is)h(un) o(b)q(ound.)75 1476 y Ft(copy-region-as-kill)d(\(\))315 1530 y Fu(Cop)o(y)j(the)i(text)e(in)i(the)f(region)g(to)g(the)g(kill)h (bu\013er,)f(so)g(it)g(can)g(b)q(e)h(y)o(ank)o(ed)f(righ)o(t)g(a)o(w)o (a)o(y)l(.)315 1585 y(By)e(default,)h(this)f(command)g(is)h(un)o(b)q (ound.)75 1676 y Ft(copy-backward-word)d(\(\))315 1730 y Fu(Cop)o(y)19 b(the)g(w)o(ord)g(b)q(efore)g(p)q(oin)o(t)h(to)e(the)i (kill)h(bu\013er.)32 b(The)19 b(w)o(ord)g(b)q(oundaries)h(are)f(the)315 1785 y(same)c(as)g Ft(backward-word)p Fu(.)j(By)d(default,)g(this)h (command)f(is)h(un)o(b)q(ound.)75 1876 y Ft(copy-forward-word)d(\(\)) 315 1930 y Fu(Cop)o(y)i(the)h(w)o(ord)e(follo)o(wing)j(p)q(oin)o(t)f (to)f(the)g(kill)j(bu\013er.)i(The)c(w)o(ord)f(b)q(oundaries)i(are)e (the)315 1985 y(same)g(as)g Ft(forward-word)p Fu(.)j(By)d(default,)h (this)f(command)g(is)h(un)o(b)q(ound.)75 2076 y Ft(yank)f(\(C-y\))315 2131 y Fu(Y)l(ank)g(the)h(top)f(of)f(the)i(kill)h(ring)e(in)o(to)g(the) h(bu\013er)f(at)f(p)q(oin)o(t.)75 2221 y Ft(yank-pop)g(\(M-y\))315 2276 y Fu(Rotate)i(the)h(kill-ring,)j(and)d(y)o(ank)g(the)h(new)f(top.) 26 b(Y)l(ou)17 b(can)h(only)g(do)f(this)h(if)f(the)h(prior)315 2331 y(command)d(is)h Ft(yank)e Fu(or)h Ft(yank-pop)p Fu(.)75 2441 y Fm(8.4.5)30 b(Sp)r(ecifying)20 b(Numeric)h(Argumen)n(ts) 75 2560 y Ft(digit-argument)13 b(\()p Fj(M-0)p Ft(,)i Fj(M-1)p Ft(,)f(...)h Fj(M--)p Ft(\))315 2615 y Fu(Add)f(this)g(digit)g (to)f(the)h(argumen)o(t)e(already)i(accum)o(ulating,)g(or)f(start)f(a)h (new)h(argumen)o(t.)315 2670 y Fj(M--)h Fu(starts)f(a)h(negativ)o(e)g (argumen)o(t.)p eop %%Page: 94 96 94 95 bop 75 -58 a Fu(94)1285 b(Bash)15 b(Reference)h(Man)o(ual)75 149 y Ft(universal-argument)d(\(\))315 204 y Fu(This)g(is)h(another)e (w)o(a)o(y)g(to)g(sp)q(ecify)i(an)f(argumen)o(t.)18 b(If)13 b(this)g(command)g(is)g(follo)o(w)o(ed)g(b)o(y)g(one)315 259 y(or)h(more)h(digits,)g(optionally)h(with)f(a)g(leading)h(min)o(us) f(sign,)g(those)g(digits)g(de\014ne)h(the)f(ar-)315 314 y(gumen)o(t.)k(If)c(the)g(command)f(is)h(follo)o(w)o(ed)g(b)o(y)g (digits,)g(executing)g Ft(universal-argument)315 369 y Fu(again)h(ends)g(the)g(n)o(umeric)h(argumen)o(t,)e(but)h(is)h (otherwise)f(ignored.)22 b(As)16 b(a)g(sp)q(ecial)h(case,)315 423 y(if)g(this)g(command)f(is)h(immediately)h(follo)o(w)o(ed)f(b)o(y)f (a)g(c)o(haracter)g(that)g(is)h(neither)g(a)f(digit)315 478 y(or)d(min)o(us)i(sign,)f(the)g(argumen)o(t)g(coun)o(t)f(for)h(the) g(next)g(command)g(is)g(m)o(ultiplied)j(b)o(y)d(four.)315 533 y(The)19 b(argumen)o(t)f(coun)o(t)g(is)h(initially)j(one,)d(so)f (executing)i(this)f(function)h(the)e(\014rst)h(time)315 588 y(mak)o(es)c(the)h(argumen)o(t)f(coun)o(t)h(four,)f(a)h(second)g (time)g(mak)o(es)g(the)g(argumen)o(t)f(coun)o(t)g(six-)315 643 y(teen,)g(and)g(so)g(on.)20 b(By)15 b(default,)h(this)f(is)h(not)f (b)q(ound)h(to)f(a)g(k)o(ey)l(.)75 760 y Fm(8.4.6)30 b(Letting)20 b(Readline)g(T)n(yp)r(e)h(F)-5 b(or)19 b(Y)-5 b(ou)75 888 y Ft(complete)14 b(\()305 886 y Fi(h)p 317 860 74 2 v 317 888 a Fh(T)m(AB)p 317 895 V 389 886 a Fi(i)404 888 y Ft(\))315 943 y Fu(A)o(ttempt)c(to)h(p)q(erform)g (completion)i(on)e(the)g(text)g(b)q(efore)h(p)q(oin)o(t.)19 b(The)11 b(actual)h(completion)315 997 y(p)q(erformed)17 b(is)h(application-sp)q(eci\014c)q(.)28 b(Bash)17 b(attempts)f (completion)j(treating)d(the)h(text)315 1052 y(as)i(a)g(v)m(ariable)i (\(if)f(the)f(text)g(b)q(egins)i(with)f(`)p Ft($)p Fu('\),)f(username)h (\(if)f(the)h(text)f(b)q(egins)i(with)315 1107 y(`)p Ft(~)p Fu('\),)13 b(hostname)i(\(if)g(the)g(text)g(b)q(egins)h(with)f (`)p Ft(@)p Fu('\),)e(or)i(command)g(\(including)i(aliases)f(and)315 1162 y(functions\))i(in)g(turn.)26 b(If)18 b(none)g(of)f(these)g(pro)q (duces)h(a)g(matc)o(h,)e(\014lename)j(completion)f(is)315 1217 y(attempted.)75 1313 y Ft(possible-completions)12 b(\(M-?\))315 1367 y Fu(List)k(the)f(p)q(ossible)i(completions)f(of)f (the)g(text)g(b)q(efore)h(p)q(oin)o(t.)75 1464 y Ft(insert-completions) d(\(M-*\))315 1518 y Fu(Insert)j(all)g(completions)g(of)f(the)g(text)g (b)q(efore)h(p)q(oin)o(t)f(that)g(w)o(ould)h(ha)o(v)o(e)f(b)q(een)h (generated)315 1573 y(b)o(y)f Ft(possible-completions)p Fu(.)75 1669 y Ft(menu-complete)e(\(\))315 1724 y Fu(Similar)g(to)f Ft(complete)p Fu(,)f(but)h(replaces)h(the)f(w)o(ord)f(to)g(b)q(e)i (completed)f(with)h(a)e(single)j(matc)o(h)315 1779 y(from)k(the)h(list) h(of)e(p)q(ossible)j(completions.)32 b(Rep)q(eated)19 b(execution)h(of)f Ft(menu-complete)315 1834 y Fu(steps)h(through)g (the)g(list)h(of)f(p)q(ossible)i(completions,)g(inserting)f(eac)o(h)f (matc)o(h)f(in)i(turn.)315 1888 y(A)o(t)d(the)g(end)h(of)f(the)h(list)g (of)f(completions,)i(the)e(b)q(ell)j(is)d(rung)h(\(sub)s(ject)f(to)f (the)i(setting)315 1943 y(of)f Ft(bell-style)p Fu(\))e(and)i(the)g (original)h(text)f(is)g(restored.)28 b(An)19 b(argumen)o(t)e(of)g Fo(n)i Fu(mo)o(v)o(es)e Fo(n)315 1998 y Fu(p)q(ositions)h(forw)o(ard)e (in)j(the)e(list)h(of)f(matc)o(hes;)h(a)f(negativ)o(e)g(argumen)o(t)g (ma)o(y)g(b)q(e)h(used)g(to)315 2053 y(mo)o(v)o(e)g(bac)o(kw)o(ard)h (through)g(the)g(list.)32 b(This)20 b(command)f(is)h(in)o(tended)g(to)f (b)q(e)h(b)q(ound)g(to)315 2106 y Fi(h)p 327 2080 V 327 2108 a Fh(T)m(AB)p 327 2115 V 399 2106 a Fi(i)414 2108 y Fu(,)15 b(but)g(is)h(un)o(b)q(ound)g(b)o(y)f(default.)75 2204 y Ft(delete-char-or-list)e(\(\))315 2259 y Fu(Deletes)h(the)f(c)o (haracter)g(under)h(the)g(cursor)f(if)h(not)f(at)g(the)g(b)q(eginning)j (or)d(end)h(of)f(the)g(line)315 2313 y(\(lik)o(e)i Ft(delete-char)p Fu(\).)j(If)d(at)f(the)h(end)g(of)f(the)g(line,)i(b)q(eha)o(v)o(es)f (iden)o(tically)i(to)d Ft(possible-)315 2368 y(completions)p Fu(.)k(This)e(command)f(is)h(un)o(b)q(ound)g(b)o(y)f(default.)75 2464 y Ft(complete-filename)e(\(M-/\))315 2519 y Fu(A)o(ttempt)h (\014lename)j(completion)f(on)f(the)g(text)g(b)q(efore)h(p)q(oin)o(t.) 75 2615 y Ft(possible-filename-completi)o(ons)c(\(C-x)j(/\))315 2670 y Fu(List)g(the)f(p)q(ossible)i(completions)g(of)e(the)g(text)g(b) q(efore)g(p)q(oin)o(t,)h(treating)f(it)g(as)g(a)g(\014lename.)p eop %%Page: 95 97 95 96 bop 75 -58 a Fu(Chapter)15 b(8:)k(Command)c(Line)i(Editing)1055 b(95)75 149 y Ft(complete-username)13 b(\(M-~\))315 204 y Fu(A)o(ttempt)h(completion)j(on)e(the)g(text)g(b)q(efore)g(p)q(oin)o (t,)h(treating)e(it)i(as)f(a)g(username.)75 297 y Ft (possible-username-completi)o(ons)d(\(C-x)j(~\))315 352 y Fu(List)e(the)g(p)q(ossible)h(completions)f(of)g(the)f(text)g(b)q (efore)h(p)q(oin)o(t,)g(treating)f(it)h(as)f(a)g(username.)75 444 y Ft(complete-variable)h(\(M-$\))315 499 y Fu(A)o(ttempt)h (completion)j(on)e(the)g(text)g(b)q(efore)g(p)q(oin)o(t,)h(treating)e (it)i(as)f(a)g(shell)h(v)m(ariable.)75 591 y Ft (possible-variable-completi)o(ons)c(\(C-x)j($\))315 646 y Fu(List)22 b(the)f(p)q(ossible)h(completions)g(of)f(the)g(text)f(b)q (efore)i(p)q(oin)o(t,)g(treating)f(it)g(as)g(a)f(shell)315 701 y(v)m(ariable.)75 793 y Ft(complete-hostname)13 b(\(M-@\))315 848 y Fu(A)o(ttempt)h(completion)j(on)e(the)g(text)g(b)q(efore)g(p)q (oin)o(t,)h(treating)e(it)i(as)f(a)g(hostname.)75 941 y Ft(possible-hostname-completi)o(ons)d(\(C-x)j(@\))315 995 y Fu(List)e(the)f(p)q(ossible)i(completions)g(of)e(the)g(text)g(b)q (efore)g(p)q(oin)o(t,)h(treating)f(it)h(as)f(a)g(hostname.)75 1088 y Ft(complete-command)h(\(M-!\))315 1143 y Fu(A)o(ttempt)i (completion)h(on)f(the)h(text)f(b)q(efore)h(p)q(oin)o(t,)f(treating)g (it)h(as)f(a)g(command)g(name.)315 1197 y(Command)23 b(completion)h(attempts)f(to)g(matc)o(h)g(the)g(text)g(against)g (aliases,)j(reserv)o(ed)315 1252 y(w)o(ords,)17 b(shell)j(functions,)e (shell)i(builtins,)g(and)e(\014nally)h(executable)g(\014lenames,)g(in)g (that)315 1307 y(order.)75 1399 y Ft(possible-command-completio)o(ns)12 b(\(C-x)j(!\))315 1454 y Fu(List)f(the)f(p)q(ossible)i(completions)f (of)f(the)g(text)f(b)q(efore)i(p)q(oin)o(t,)f(treating)g(it)h(as)e(a)h (command)315 1509 y(name.)75 1602 y Ft(dynamic-complete-history)f(\(M-) 735 1600 y Fi(h)p 747 1574 74 2 v 747 1602 a Fh(T)m(AB)p 747 1609 V 818 1600 a Fi(i)833 1602 y Ft(\))315 1656 y Fu(A)o(ttempt)i(completion)i(on)f(the)h(text)e(b)q(efore)i(p)q(oin)o (t,)f(comparing)g(the)g(text)g(against)f(lines)315 1711 y(from)g(the)i(history)f(list)h(for)e(p)q(ossible)j(completion)g(matc)o (hes.)75 1804 y Ft(complete-into-braces)12 b(\(M-{\))315 1858 y Fu(P)o(erform)f(\014lename)i(completion)g(and)f(insert)g(the)g (list)h(of)e(p)q(ossible)j(completions)f(enclosed)315 1913 y(within)19 b(braces)e(so)g(the)g(list)h(is)g(a)o(v)m(ailable)h (to)e(the)g(shell)i(\(see)e(Section)h(3.5.1)e([Brace)h(Ex-)315 1968 y(pansion],)e(page)g(15\).)75 2080 y Fm(8.4.7)30 b(Keyb)r(oard)20 b(Macros)75 2202 y Ft(start-kbd-macro)13 b(\(C-x)i(\(\))315 2257 y Fu(Begin)h(sa)o(ving)f(the)h(c)o(haracters)e (t)o(yp)q(ed)i(in)o(to)f(the)g(curren)o(t)g(k)o(eyb)q(oard)g(macro.)75 2349 y Ft(end-kbd-macro)e(\(C-x)i(\)\))315 2404 y Fu(Stop)f(sa)o(ving)f (the)h(c)o(haracters)f(t)o(yp)q(ed)h(in)o(to)f(the)h(curren)o(t)g(k)o (eyb)q(oard)f(macro)g(and)h(sa)o(v)o(e)f(the)315 2459 y(de\014nition.)75 2552 y Ft(call-last-kbd-macro)g(\(C-x)h(e\))315 2606 y Fu(Re-execute)k(the)g(last)f(k)o(eyb)q(oard)h(macro)f (de\014ned,)i(b)o(y)e(making)h(the)g(c)o(haracters)e(in)j(the)315 2661 y(macro)14 b(app)q(ear)i(as)f(if)g(t)o(yp)q(ed)h(at)e(the)i(k)o (eyb)q(oard.)p eop %%Page: 96 98 96 97 bop 75 -58 a Fu(96)1285 b(Bash)15 b(Reference)h(Man)o(ual)75 149 y Fm(8.4.8)30 b(Some)20 b(Miscellaneous)h(Commands)75 280 y Ft(re-read-init-file)13 b(\(C-x)h(C-r\))315 335 y Fu(Read)d(in)g(the)g(con)o(ten)o(ts)g(of)f(the)h Fo(inputrc)k Fu(\014le,)d(and)g(incorp)q(orate)f(an)o(y)f(bindings)j(or)e(v)m (ariable)315 390 y(assignmen)o(ts)k(found)h(there.)75 487 y Ft(abort)e(\(C-g\))315 542 y Fu(Ab)q(ort)f(the)g(curren)o(t)h (editing)g(command)f(and)h(ring)f(the)h(terminal's)f(b)q(ell)i(\(sub)s (ject)e(to)g(the)315 597 y(setting)i(of)g Ft(bell-style)p Fu(\).)75 695 y Ft(do-uppercase-version)d(\(M-a,)j(M-b,)f(M-)p Fo(x)p Ft(,)h(...\))315 749 y Fu(If)f(the)g(meta\014ed)g(c)o(haracter)f Fo(x)k Fu(is)d(lo)o(w)o(ercase,)g(run)g(the)g(command)f(that)h(is)g(b)q (ound)h(to)e(the)315 804 y(corresp)q(onding)j(upp)q(ercase)g(c)o (haracter.)75 902 y Ft(prefix-meta)e(\()377 900 y Fi(h)p 389 874 70 2 v 389 902 a Fh(ESC)p 389 910 V 456 900 a Fi(i)471 902 y Ft(\))315 957 y Fu(Metafy)k(the)h(next)g(c)o(haracter)f (t)o(yp)q(ed.)30 b(This)20 b(is)f(for)f(k)o(eyb)q(oards)h(without)g(a)f (meta)g(k)o(ey)l(.)315 1011 y(T)o(yping)e(`)485 1009 y Fi(h)p 496 983 V 496 1011 a Fh(ESC)p 496 1019 V 563 1009 a Fi(i)593 1011 y Ft(f)p Fu(')f(is)h(equiv)m(alen)o(t)h(to)d(t)o (yping)i Fj(M-f)p Fu(.)75 1109 y Ft(undo)f(\(C-_)f(or)h(C-x)g(C-u\))315 1164 y Fu(Incremen)o(tal)h(undo,)f(separately)h(remem)o(b)q(ered)g(for) e(eac)o(h)h(line.)75 1262 y Ft(revert-line)f(\(M-r\))315 1317 y Fu(Undo)j(all)g(c)o(hanges)g(made)f(to)g(this)h(line.)26 b(This)17 b(is)g(lik)o(e)h(executing)f(the)g Ft(undo)f Fu(command)315 1371 y(enough)g(times)f(to)g(get)f(bac)o(k)h(to)g(the)g (b)q(eginning.)75 1469 y Ft(tilde-expand)f(\(M-&\))315 1524 y Fu(P)o(erform)g(tilde)j(expansion)f(on)f(the)g(curren)o(t)g(w)o (ord.)75 1622 y Ft(set-mark)f(\(C-@\))315 1676 y Fu(Set)i(the)h(mark)f (to)f(the)i(p)q(oin)o(t.)24 b(If)17 b(a)f(n)o(umeric)h(argumen)o(t)f (is)g(supplied,)j(the)e(mark)e(is)i(set)315 1731 y(to)e(that)f(p)q (osition.)75 1829 y Ft(exchange-point-and-mark)e(\(C-x)j(C-x\))315 1884 y Fu(Sw)o(ap)g(the)h(p)q(oin)o(t)g(with)g(the)g(mark.)k(The)c (curren)o(t)f(cursor)h(p)q(osition)g(is)g(set)g(to)f(the)g(sa)o(v)o(ed) 315 1938 y(p)q(osition,)h(and)f(the)h(old)f(cursor)g(p)q(osition)h(is)g (sa)o(v)o(ed)f(as)g(the)g(mark.)75 2036 y Ft(character-search)e (\(C-]\))315 2091 y Fu(A)f(c)o(haracter)g(is)h(read)g(and)f(p)q(oin)o (t)h(is)g(mo)o(v)o(ed)f(to)g(the)g(next)h(o)q(ccurrence)g(of)f(that)g (c)o(haracter.)315 2146 y(A)j(negativ)o(e)h(coun)o(t)f(searc)o(hes)g (for)f(previous)i(o)q(ccurrences.)75 2243 y Ft (character-search-backward)c(\(M-C-]\))315 2298 y Fu(A)22 b(c)o(haracter)g(is)h(read)f(and)h(p)q(oin)o(t)g(is)g(mo)o(v)o(ed)f(to) g(the)g(previous)h(o)q(ccurrence)h(of)e(that)315 2353 y(c)o(haracter.)d(A)c(negativ)o(e)h(coun)o(t)f(searc)o(hes)g(for)f (subsequen)o(t)i(o)q(ccurrences.)75 2451 y Ft(insert-comment)d(\(M-#\)) 315 2506 y Fu(The)19 b(v)m(alue)i(of)e(the)g Ft(comment-begin)e Fu(v)m(ariable)k(is)f(inserted)g(at)e(the)i(b)q(eginning)h(of)e(the)315 2560 y(curren)o(t)i(line,)j(and)e(the)f(line)i(is)f(accepted)g(as)f(if) h(a)f(newline)i(had)f(b)q(een)g(t)o(yp)q(ed.)39 b(The)315 2615 y(default)15 b(v)m(alue)i(of)d Ft(comment-begin)f Fu(causes)i(this)g(command)g(to)f(mak)o(e)h(the)g(curren)o(t)f(line)315 2670 y(a)h(shell)i(commen)o(t.)p eop %%Page: 97 99 97 98 bop 75 -58 a Fu(Chapter)15 b(8:)k(Command)c(Line)i(Editing)1055 b(97)75 149 y Ft(dump-functions)13 b(\(\))315 204 y Fu(Prin)o(t)g(all)h (of)f(the)g(functions)h(and)g(their)g(k)o(ey)f(bindings)i(to)d(the)i (Readline)g(output)f(stream.)315 259 y(If)j(a)g(n)o(umeric)g(argumen)o (t)f(is)i(supplied,)h(the)e(output)f(is)i(formatted)d(in)j(suc)o(h)f(a) g(w)o(a)o(y)f(that)315 314 y(it)g(can)h(b)q(e)g(made)f(part)f(of)h(an)g Fo(inputrc)k Fu(\014le.)i(This)16 b(command)f(is)h(un)o(b)q(ound)g(b)o (y)f(default.)75 405 y Ft(dump-variables)e(\(\))315 460 y Fu(Prin)o(t)e(all)g(of)f(the)h(settable)g(v)m(ariables)h(and)f(their) g(v)m(alues)h(to)e(the)h(Readline)h(output)e(stream.)315 515 y(If)16 b(a)g(n)o(umeric)g(argumen)o(t)f(is)i(supplied,)h(the)e (output)f(is)i(formatted)d(in)j(suc)o(h)f(a)g(w)o(a)o(y)f(that)315 570 y(it)g(can)h(b)q(e)g(made)f(part)f(of)h(an)g Fo(inputrc)k Fu(\014le.)i(This)16 b(command)f(is)h(un)o(b)q(ound)g(b)o(y)f(default.) 75 661 y Ft(dump-macros)f(\(\))315 716 y Fu(Prin)o(t)j(all)h(of)e(the)h (Readline)h(k)o(ey)f(sequences)h(b)q(ound)g(to)e(macros)g(and)h(the)g (strings)g(they)315 770 y(output.)26 b(If)18 b(a)f(n)o(umeric)h (argumen)o(t)f(is)h(supplied,)i(the)d(output)g(is)h(formatted)e(in)j (suc)o(h)e(a)315 825 y(w)o(a)o(y)d(that)g(it)i(can)f(b)q(e)g(made)g (part)g(of)f(an)h Fo(inputrc)k Fu(\014le.)i(This)15 b(command)g(is)h (un)o(b)q(ound)g(b)o(y)315 880 y(default.)75 971 y Ft(glob-expand-word) d(\(C-x)i(*\))315 1026 y Fu(The)f(w)o(ord)f(b)q(efore)i(p)q(oin)o(t)f (is)h(treated)e(as)h(a)f(pattern)h(for)f(pathname)h(expansion,)h(and)f (the)315 1081 y(list)i(of)f(matc)o(hing)g(\014le)h(names)f(is)h (inserted,)g(replacing)g(the)g(w)o(ord.)75 1172 y Ft (glob-list-expansions)c(\(C-x)j(g\))315 1227 y Fu(The)i(list)g(of)g (expansions)g(that)f(w)o(ould)h(ha)o(v)o(e)f(b)q(een)i(generated)f(b)o (y)f Ft(glob-expand-word)315 1282 y Fu(is)g(displa)o(y)o(ed,)g(and)f (the)g(line)i(is)f(redra)o(wn.)75 1373 y Ft(display-shell-version)c (\(C-x)j(C-v\))315 1428 y Fu(Displa)o(y)h(v)o(ersion)f(information)h (ab)q(out)f(the)g(curren)o(t)g(instance)h(of)f(Bash.)75 1519 y Ft(shell-expand-line)e(\(M-C-e\))315 1574 y Fu(Expand)18 b(the)g(line)h(as)e(the)h(shell)h(do)q(es.)28 b(This)18 b(p)q(erforms)f(alias)i(and)e(history)h(expansion)315 1629 y(as)e(w)o(ell)i(as)f(all)g(of)g(the)f(shell)j(w)o(ord)d (expansions)i(\(see)e(Section)i(3.5)e([Shell)i(Expansions],)315 1684 y(page)d(15\).)75 1775 y Ft(history-expand-line)e(\(M-^\))315 1830 y Fu(P)o(erform)h(history)h(expansion)h(on)g(the)f(curren)o(t)g (line.)75 1921 y Ft(magic-space)f(\(\))315 1976 y Fu(P)o(erform)c (history)i(expansion)g(on)g(the)g(curren)o(t)f(line)i(and)f(insert)g(a) f(space)h(\(see)f(Section)i(9.3)315 2031 y([History)i(In)o(teraction],) f(page)h(105\).)75 2122 y Ft(alias-expand-line)e(\(\))315 2177 y Fu(P)o(erform)g(alias)i(expansion)g(on)f(the)g(curren)o(t)g (line)i(\(see)f(Section)g(6.6)e([Aliases],)h(page)g(67\).)75 2268 y Ft(history-and-alias-expand-l)o(ine)e(\(\))315 2323 y Fu(P)o(erform)i(history)h(and)h(alias)f(expansion)i(on)e(the)g (curren)o(t)g(line.)75 2414 y Ft(insert-last-argument)d(\(M-.)j(or)g (M-_\))315 2469 y Fu(A)g(synon)o(ym)g(for)g Ft(yank-last-arg)p Fu(.)75 2560 y Ft(operate-and-get-next)d(\(C-o\))315 2615 y Fu(Accept)21 b(the)f(curren)o(t)g(line)i(for)e(execution)h(and)g (fetc)o(h)f(the)g(next)h(line)g(relativ)o(e)g(to)f(the)315 2670 y(curren)o(t)15 b(line)i(from)d(the)i(history)f(for)f(editing.)22 b(An)o(y)15 b(argumen)o(t)f(is)i(ignored.)p eop %%Page: 98 100 98 99 bop 75 -58 a Fu(98)1285 b(Bash)15 b(Reference)h(Man)o(ual)75 149 y Ft(emacs-editing-mode)d(\(C-e\))315 204 y Fu(When)i(in)h Ft(vi)e Fu(editing)j(mo)q(de,)d(this)i(causes)f(a)f(switc)o(h)h(bac)o (k)g(to)f Ft(emacs)g Fu(editing)j(mo)q(de,)d(as)315 259 y(if)i(the)f(command)g(`)p Ft(set)f(-o)h(emacs)p Fu(')f(had)i(b)q(een)g (executed.)75 390 y Fs(8.5)33 b(Readline)23 b(vi)h(Mo)r(de)137 487 y Fu(While)13 b(the)f(Readline)i(library)e(do)q(es)g(not)g(ha)o(v)o (e)f(a)h(full)h(set)f(of)f Ft(vi)g Fu(editing)j(functions,)f(it)f(do)q (es)g(con)o(tain)75 542 y(enough)17 b(to)g(allo)o(w)g(simple)h(editing) h(of)d(the)i(line.)27 b(The)17 b(Readline)h Ft(vi)f Fu(mo)q(de)g(b)q (eha)o(v)o(es)g(as)g(sp)q(eci\014ed)i(in)75 596 y(the)c Fp(posix)g Fu(1003.2)f(standard.)137 664 y(In)19 b(order)e(to)h(switc)o (h)g(in)o(teractiv)o(ely)h(b)q(et)o(w)o(een)f Ft(emacs)f Fu(and)h Ft(vi)g Fu(editing)h(mo)q(des,)g(use)f(the)g(`)p Ft(set)c(-o)75 719 y(emacs)p Fu(')c(and)h(`)p Ft(set)j(-o)h(vi)p Fu(')10 b(commands)h(\(see)g(Section)h(4.3)d([The)i(Set)g(Builtin],)i (page)e(46\).)18 b(The)11 b(Readline)75 774 y(default)16 b(is)f Ft(emacs)g Fu(mo)q(de.)137 842 y(When)h(y)o(ou)e(en)o(ter)h(a)g (line)i(in)e Ft(vi)g Fu(mo)q(de,)g(y)o(ou)g(are)f(already)i(placed)g (in)g(`insertion')f(mo)q(de,)g(as)g(if)g(y)o(ou)75 897 y(had)e(t)o(yp)q(ed)h(an)f(`)p Ft(i)p Fu('.)18 b(Pressing)608 895 y Fi(h)p 620 869 70 2 v 620 897 a Fh(ESC)p 620 904 V 687 895 a Fi(i)715 897 y Fu(switc)o(hes)13 b(y)o(ou)g(in)o(to)g (`command')f(mo)q(de,)i(where)f(y)o(ou)g(can)g(edit)h(the)75 952 y(text)i(of)h(the)g(line)h(with)g(the)f(standard)f Ft(vi)h Fu(mo)o(v)o(emen)o(t)f(k)o(eys,)g(mo)o(v)o(e)g(to)h(previous)g (history)g(lines)i(with)75 1006 y(`)p Ft(k)p Fu(')14 b(and)i(subsequen)o(t)f(lines)i(with)f(`)p Ft(j)p Fu(',)e(and)h(so)g (forth.)75 1137 y Fs(8.6)33 b(Programmable)22 b(Completion)137 1234 y Fu(When)13 b(w)o(ord)g(completion)h(is)f(attempted)f(for)g(an)h (argumen)o(t)f(to)g(a)h(command)g(for)f(whic)o(h)h(a)g(comple-)75 1289 y(tion)g(sp)q(eci\014cation)h(\(a)d Fo(compsp)q(ec)s Fu(\))i(has)f(b)q(een)i(de\014ned)f(using)g(the)g Ft(complete)e Fu(builtin)j(\(see)f(Section)g(8.7)75 1344 y([Programmable)g (Completion)i(Builtins],)h(page)e(99\),)f(the)i(programmable)f (completion)h(facilities)h(are)75 1398 y(in)o(v)o(ok)o(ed.)137 1466 y(First,)11 b(the)g(command)f(name)h(is)g(iden)o(ti\014ed.)20 b(If)11 b(a)f(compsp)q(ec)i(has)e(b)q(een)i(de\014ned)g(for)e(that)f (command,)75 1521 y(the)22 b(compsp)q(ec)h(is)f(used)h(to)e(generate)h (the)g(list)h(of)e(p)q(ossible)j(completions)f(for)e(the)h(w)o(ord.)40 b(If)22 b(the)75 1576 y(command)16 b(w)o(ord)g(is)h(a)f(full)i (pathname,)e(a)g(compsp)q(ec)i(for)e(the)g(full)i(pathname)e(is)h (searc)o(hed)g(for)f(\014rst.)75 1631 y(If)g(no)g(compsp)q(ec)h(is)f (found)g(for)f(the)h(full)h(pathname,)f(an)g(attempt)e(is)j(made)f(to)f (\014nd)h(a)g(compsp)q(ec)h(for)75 1686 y(the)e(p)q(ortion)h(follo)o (wing)g(the)f(\014nal)h(slash.)137 1754 y(Once)i(a)f(compsp)q(ec)h(has) f(b)q(een)h(found,)g(it)f(is)g(used)h(to)e(generate)h(the)g(list)h(of)f (matc)o(hing)g(w)o(ords.)25 b(If)75 1808 y(a)18 b(compsp)q(ec)h(is)g (not)e(found,)i(the)f(default)h(Bash)f(completion)i(describ)q(ed)g(ab)q (o)o(v)o(e)d(\(see)i(Section)g(8.4.6)75 1863 y([Commands)14 b(F)l(or)h(Completion],)g(page)g(94\))f(is)i(p)q(erformed.)137 1931 y(First,)f(the)g(actions)h(sp)q(eci\014ed)h(b)o(y)e(the)h(compsp)q (ec)g(are)f(used.)21 b(Only)16 b(matc)o(hes)f(whic)o(h)h(are)f (pre\014xed)75 1986 y(b)o(y)e(the)f(w)o(ord)g(b)q(eing)i(completed)g (are)e(returned.)20 b(When)13 b(the)f(`)p Ft(-f)p Fu(')g(or)g(`)p Ft(-d)p Fu(')g(option)g(is)i(used)f(for)f(\014lename)75 2041 y(or)j(directory)g(name)g(completion,)h(the)f(shell)i(v)m(ariable) f Ft(FIGNORE)e Fu(is)i(used)g(to)e(\014lter)i(the)f(matc)o(hes.)k(See) 75 2096 y(Section)d(5.2)e([Bash)h(V)l(ariables],)h(page)f(51,)f(for)h (a)g(description)h(of)f Ft(FIGNORE)p Fu(.)137 2164 y(An)o(y)g (completions)h(sp)q(eci\014ed)g(b)o(y)f(a)f(\014lename)i(expansion)g (pattern)e(to)g(the)h(`)p Ft(-G)p Fu(')e(option)i(are)g(gener-)75 2218 y(ated)f(next.)20 b(The)15 b(w)o(ords)f(generated)h(b)o(y)f(the)h (pattern)f(need)i(not)e(matc)o(h)g(the)h(w)o(ord)e(b)q(eing)j (completed.)75 2273 y(The)21 b Ft(GLOBIGNORE)f Fu(shell)j(v)m(ariable)f (is)g(not)f(used)h(to)e(\014lter)i(the)f(matc)o(hes,)h(but)f(the)g Ft(FIGNORE)f Fu(shell)75 2328 y(v)m(ariable)d(is)e(used.)137 2396 y(Next,)i(the)g(string)g(sp)q(eci\014ed)i(as)e(the)g(argumen)o(t)f (to)h(the)g(`)p Ft(-W)p Fu(')e(option)j(is)f(considered.)27 b(The)17 b(string)75 2451 y(is)g(\014rst)f(split)h(using)g(the)f(c)o (haracters)g(in)h(the)f Ft(IFS)g Fu(sp)q(ecial)i(v)m(ariable)g(as)e (delimiters.)25 b(Shell)18 b(quoting)e(is)75 2506 y(honored.)i(Eac)o(h) 11 b(w)o(ord)e(is)i(then)g(expanded)h(using)f(brace)f(expansion,)i (tilde)g(expansion,)g(parameter)e(and)75 2560 y(v)m(ariable)k (expansion,)g(command)e(substitution,)h(arithmetic)h(expansion,)f(and)g (pathname)f(expansion,)75 2615 y(as)h(describ)q(ed)j(ab)q(o)o(v)o(e)d (\(see)h(Section)h(3.5)e([Shell)i(Expansions],)f(page)f(15\).)19 b(The)14 b(results)g(are)f(split)i(using)75 2670 y(the)i(rules)g (describ)q(ed)h(ab)q(o)o(v)o(e)e(\(see)h(Section)g(3.5.7)e([W)l(ord)h (Splitting],)h(page)g(20\).)22 b(The)17 b(results)g(of)f(the)p eop %%Page: 99 101 99 100 bop 75 -58 a Fu(Chapter)15 b(8:)k(Command)c(Line)i(Editing)1055 b(99)75 149 y(expansion)18 b(are)f(pre\014x-matc)o(hed)h(against)e(the) i(w)o(ord)e(b)q(eing)j(completed,)f(and)f(the)h(matc)o(hing)f(w)o(ords) 75 204 y(b)q(ecome)f(the)f(p)q(ossible)i(completions.)137 269 y(After)d(these)h(matc)o(hes)f(ha)o(v)o(e)h(b)q(een)g(generated,)g (an)o(y)f(shell)i(function)f(or)f(command)h(sp)q(eci\014ed)i(with)75 324 y(the)e(`)p Ft(-F)p Fu(')f(and)h(`)p Ft(-C)p Fu(')f(options)h(is)g (in)o(v)o(ok)o(ed.)20 b(When)c(the)f(command)f(or)h(function)g(is)h(in) o(v)o(ok)o(ed,)f(the)g Ft(COMP_)75 379 y(LINE)c Fu(and)g Ft(COMP_POINT)f Fu(v)m(ariables)i(are)f(assigned)h(v)m(alues)g(as)f (describ)q(ed)i(ab)q(o)o(v)o(e)e(\(see)g(Section)h(5.2)e([Bash)75 434 y(V)l(ariables],)16 b(page)f(51\).)20 b(If)c(a)f(shell)i(function)g (is)f(b)q(eing)h(in)o(v)o(ok)o(ed,)e(the)h Ft(COMP_WORDS)e Fu(and)h Ft(COMP_CWORD)75 489 y Fu(v)m(ariables)21 b(are)f(also)f(set.) 34 b(When)20 b(the)g(function)g(or)g(command)f(is)h(in)o(v)o(ok)o(ed,)h (the)f(\014rst)f(argumen)o(t)g(is)75 543 y(the)e(name)g(of)f(the)h (command)f(whose)h(argumen)o(ts)f(are)h(b)q(eing)h(completed,)f(the)g (second)g(argumen)o(t)f(is)75 598 y(the)i(w)o(ord)f(b)q(eing)h (completed,)h(and)f(the)g(third)g(argumen)o(t)e(is)j(the)e(w)o(ord)g (preceding)i(the)f(w)o(ord)f(b)q(eing)75 653 y(completed)f(on)g(the)f (curren)o(t)g(command)h(line.)22 b(No)15 b(\014ltering)h(of)f(the)h (generated)f(completions)h(against)75 708 y(the)f(w)o(ord)e(b)q(eing)j (completed)g(is)e(p)q(erformed;)h(the)g(function)g(or)f(command)g(has)h (complete)g(freedom)f(in)75 763 y(generating)h(the)h(matc)o(hes.)137 828 y(An)o(y)g(function)h(sp)q(eci\014ed)h(with)e(`)p Ft(-F)p Fu(')f(is)h(in)o(v)o(ok)o(ed)h(\014rst.)k(The)16 b(function)h(ma)o(y)e(use)h(an)o(y)g(of)f(the)h(shell)75 883 y(facilities,)23 b(including)f(the)e Ft(compgen)f Fu(builtin)j(describ)q(ed)g(b)q(elo)o(w)f(\(see)e(Section)i(8.7)e ([Programmable)75 937 y(Completion)d(Builtins],)h(page)e(99\),)g(to)f (generate)i(the)f(matc)o(hes.)20 b(It)c(m)o(ust)f(put)g(the)h(p)q (ossible)h(comple-)75 992 y(tions)e(in)h(the)g Ft(COMPREPLY)e Fu(arra)o(y)g(v)m(ariable.)137 1057 y(Next,)d(an)o(y)f(command)g(sp)q (eci\014ed)j(with)d(the)g(`)p Ft(-C)p Fu(')g(option)g(is)h(in)o(v)o(ok) o(ed)f(in)h(an)g(en)o(vironmen)o(t)f(equiv)m(alen)o(t)75 1112 y(to)i(command)g(substitution.)20 b(It)13 b(should)g(prin)o(t)g(a) f(list)h(of)f(completions,)i(one)f(p)q(er)g(line,)h(to)e(the)g (standard)75 1167 y(output.)20 b(Bac)o(kslash)15 b(ma)o(y)g(b)q(e)g (used)h(to)f(escap)q(e)h(a)f(newline,)h(if)g(necessary)l(.)137 1232 y(After)21 b(all)h(of)e(the)h(p)q(ossible)i(completions)f(are)f (generated,)h(an)o(y)e(\014lter)i(sp)q(eci\014ed)h(with)e(the)g(`)p Ft(-X)p Fu(')75 1287 y(option)c(is)g(applied)h(to)e(the)h(list.)25 b(The)17 b(\014lter)g(is)g(a)f(pattern)g(as)g(used)h(for)f(pathname)h (expansion;)h(a)e(`)p Ft(&)p Fu(')75 1342 y(in)k(the)g(pattern)f(is)h (replaced)h(with)e(the)h(text)f(of)g(the)h(w)o(ord)e(b)q(eing)j (completed.)34 b(A)19 b(literal)i(`)p Ft(&)p Fu(')e(ma)o(y)75 1397 y(b)q(e)h(escap)q(ed)g(with)f(a)g(bac)o(kslash;)i(the)e(bac)o (kslash)g(is)h(remo)o(v)o(ed)e(b)q(efore)i(attempting)e(a)h(matc)o(h.) 31 b(An)o(y)75 1451 y(completion)18 b(that)e(matc)o(hes)h(the)g (pattern)g(will)h(b)q(e)g(remo)o(v)o(ed)e(from)h(the)g(list.)26 b(A)17 b(leading)h(`)p Ft(!)p Fu(')e(negates)75 1506 y(the)f(pattern;)g(in)h(this)f(case)h(an)o(y)e(completion)j(not)e(matc) o(hing)g(the)g(pattern)g(will)i(b)q(e)f(remo)o(v)o(ed.)137 1571 y(Finally)l(,)i(an)o(y)d(pre\014x)i(and)f(su\016x)g(sp)q (eci\014ed)i(with)e(the)g(`)p Ft(-P)p Fu(')f(and)h(`)p Ft(-S)p Fu(')e(options)j(are)e(added)i(to)e(eac)o(h)75 1626 y(mem)o(b)q(er)h(of)f(the)h(completion)h(list,)f(and)g(the)g (result)g(is)g(returned)h(to)e(the)g(Readline)i(completion)g(co)q(de)75 1681 y(as)e(the)g(list)h(of)f(p)q(ossible)i(completions.)137 1746 y(If)12 b(the)g(previously-applied)j(actions)d(do)g(not)f (generate)g(an)o(y)h(matc)o(hes,)f(and)h(the)g(`)p Ft(-o)j(dirnames)p Fu(')10 b(op-)75 1801 y(tion)k(w)o(as)g(supplied)i(to)d Ft(complete)g Fu(when)i(the)f(compsp)q(ec)h(w)o(as)e(de\014ned,)i (directory)g(name)f(completion)75 1856 y(is)i(attempted.)137 1921 y(By)g(default,)g(if)h(a)e(compsp)q(ec)i(is)f(found,)g(whatev)o (er)f(it)h(generates)f(is)i(returned)f(to)f(the)h(completion)75 1976 y(co)q(de)11 b(as)f(the)h(full)g(set)g(of)f(p)q(ossible)i (completions.)19 b(The)11 b(default)g(Bash)f(completions)i(are)e(not)g (attempted,)75 2031 y(and)k(the)g(Readline)h(default)f(of)f(\014lename) i(completion)g(is)f(disabled.)21 b(If)14 b(the)g(`)p Ft(-o)h(default)p Fu(')d(option)i(w)o(as)75 2085 y(supplied)20 b(to)d Ft(complete)f Fu(when)i(the)f(compsp)q(ec)i(w)o(as)d(de\014ned,) j(Readline's)g(default)f(completion)g(will)75 2140 y(b)q(e)e(p)q (erformed)f(if)h(the)f(compsp)q(ec)h(generates)f(no)g(matc)o(hes.)75 2263 y Fs(8.7)33 b(Programmable)22 b(Completion)h(Builtins)137 2357 y Fu(Tw)o(o)15 b(builtin)i(commands)e(are)g(a)o(v)m(ailable)i(to)d (manipulate)i(the)g(programmable)e(completion)j(facil-)75 2412 y(ities.)75 2488 y Ft(compgen)435 2550 y(compgen)23 b([)p Fo(option)p Ft(])h([)p Fo(w)o(ord)r Ft(])315 2615 y Fu(Generate)13 b(p)q(ossible)h(completion)g(matc)o(hes)e(for)h Fo(w)o(ord)h Fu(according)f(to)f(the)h Fo(option)p Fu(s,)g(whic)o(h)315 2670 y(ma)o(y)g(b)q(e)i(an)o(y)e(option)h(accepted)g(b)o(y)g(the)g Ft(complete)f Fu(builtin)j(with)e(the)g(exception)h(of)e(`)p Ft(-p)p Fu(')p eop %%Page: 100 102 100 101 bop 75 -58 a Fu(100)1262 b(Bash)15 b(Reference)h(Man)o(ual)315 149 y(and)h(`)p Ft(-r)p Fu(',)e(and)i(write)f(the)h(matc)o(hes)f(to)f (the)i(standard)f(output.)23 b(When)17 b(using)g(the)g(`)p Ft(-F)p Fu(')315 204 y(or)d(`)p Ft(-C)p Fu(')f(options,)h(the)g(v)m (arious)g(shell)i(v)m(ariables)f(set)f(b)o(y)g(the)g(programmable)g (completion)315 259 y(facilities,)j(while)g(a)o(v)m(ailable,)f(will)h (not)e(ha)o(v)o(e)g(useful)h(v)m(alues.)315 327 y(The)h(matc)o(hes)g (will)i(b)q(e)f(generated)f(in)h(the)f(same)g(w)o(a)o(y)g(as)f(if)i (the)f(programmable)g(com-)315 382 y(pletion)g(co)q(de)f(had)f (generated)g(them)h(directly)g(from)f(a)g(completion)h(sp)q (eci\014cation)i(with)315 436 y(the)d(same)f(\015ags.)19 b(If)c Fo(w)o(ord)h Fu(is)f(sp)q(eci\014ed,)h(only)f(those)f (completions)i(matc)o(hing)f Fo(w)o(ord)g Fu(will)315 491 y(b)q(e)h(displa)o(y)o(ed.)315 559 y(The)d(return)f(v)m(alue)h(is)g (true)g(unless)g(an)f(in)o(v)m(alid)j(option)d(is)h(supplied,)i(or)d (no)g(matc)o(hes)g(w)o(ere)315 614 y(generated.)75 695 y Ft(complete)435 759 y(complete)23 b([-abcdefgjkvu])f([-o)h Fo(comp-option)p Ft(])h([-A)g Fo(action)p Ft(])g([-G)f Fo(globpat)q Ft(])h([-)435 811 y(W)g Fo(w)o(ordlist)q Ft(])435 863 y([-P)f Fo(pre\014x)s Ft(])i([-S)e Fo(su\016x)s Ft(])h([-X)g Fo(\014lterpat)q Ft(])g([-F)f Fo(function)p Ft(])435 915 y([-C)g Fo(command)r Ft(])h Fo(name)i Ft([)p Fo(name)h Ft(...)o(])435 967 y(complete)c(-pr)g([)p Fo(name)k Ft(...)o(])315 1035 y Fu(Sp)q(ecify)19 b(ho)o(w)d(argumen)o(ts)g(to)h (eac)o(h)g Fo(name)i Fu(should)f(b)q(e)g(completed.)26 b(If)18 b(the)f(`)p Ft(-p)p Fu(')f(option)315 1090 y(is)f(supplied,)i (or)e(if)g(no)g(options)g(are)f(supplied,)j(existing)f(completion)g(sp) q(eci\014cations)g(are)315 1144 y(prin)o(ted)23 b(in)f(a)g(w)o(a)o(y)f (that)g(allo)o(ws)h(them)g(to)f(b)q(e)i(reused)f(as)g(input.)41 b(The)22 b(`)p Ft(-r)p Fu(')f(option)315 1199 y(remo)o(v)o(es)13 b(a)g(completion)i(sp)q(eci\014cation)h(for)d(eac)o(h)h Fo(name)p Fu(,)g(or,)f(if)h(no)g Fo(name)s Fu(s)f(are)h(supplied,)315 1254 y(all)i(completion)g(sp)q(eci\014cations.)315 1322 y(The)f(pro)q(cess)g(of)g(applying)h(these)f(completion)h(sp)q (eci\014cations)g(when)g(w)o(ord)e(completion)315 1376 y(is)k(attempted)f(is)h(describ)q(ed)i(ab)q(o)o(v)o(e)d(\(see)g (Section)i(8.6)e([Programmable)f(Completion],)315 1431 y(page)f(98\).)315 1499 y(Other)21 b(options,)h(if)g(sp)q(eci\014ed,)i (ha)o(v)o(e)c(the)h(follo)o(wing)h(meanings.)37 b(The)22 b(argumen)o(ts)e(to)315 1554 y(the)g(`)p Ft(-G)p Fu(',)g(`)p Ft(-W)p Fu(',)g(and)g(`)p Ft(-X)p Fu(')f(options)i(\(and,)g(if)f (necessary)l(,)h(the)g(`)p Ft(-P)p Fu(')e(and)h(`)p Ft(-S)p Fu(')f(options\))315 1609 y(should)e(b)q(e)f(quoted)g(to)f(protect)g (them)g(from)g(expansion)i(b)q(efore)f(the)f Ft(complete)g Fu(builtin)315 1663 y(is)h(in)o(v)o(ok)o(ed.)315 1744 y Ft(-o)f Fo(comp-option)555 1799 y Fu(The)f Fo(comp-option)g Fu(con)o(trols)f(sev)o(eral)g(asp)q(ects)h(of)f(the)h(compsp)q(ec's)f (b)q(eha)o(v-)555 1854 y(ior)g(b)q(ey)o(ond)h(the)g(simple)g (generation)g(of)f(completions.)20 b Fo(comp-option)14 b Fu(ma)o(y)555 1909 y(b)q(e)i(one)f(of:)555 1989 y Ft(default)72 b Fu(Use)15 b(readline's)h(default)f(completion)g(if)h(the)e(compsp)q (ec)i(gen-)795 2044 y(erates)f(no)g(matc)o(hes.)555 2125 y Ft(dirnames)48 b Fu(P)o(erform)22 b(directory)h(name)g(completion)h (if)g(the)f(compsp)q(ec)795 2180 y(generates)15 b(no)g(matc)o(hes.)555 2260 y Ft(filenames)795 2315 y Fu(T)l(ell)21 b(Readline)g(that)d(the)i (compsp)q(ec)g(generates)f(\014lenames,)795 2370 y(so)11 b(it)g(can)g(p)q(erform)g(an)o(y)g(\014lename)p Ft(\\)p Fu(-sp)q(eci\014c)j(pro)q(cessing)e(\(lik)o(e)795 2425 y(adding)j(a)g(slash)g(to)f(directory)h(names)f(or)h(suppressing)g (trail-)795 2480 y(ing)20 b(spaces\).)31 b(This)20 b(option)f(is)h(in)o (tended)h(to)d(b)q(e)i(used)g(with)795 2534 y(shell)d(functions)f(sp)q (eci\014ed)h(with)f(`)p Ft(-F)p Fu('.)315 2615 y Ft(-A)f Fo(action)56 b Fu(The)13 b Fo(action)g Fu(ma)o(y)e(b)q(e)j(one)e(of)g (the)h(follo)o(wing)g(to)f(generate)g(a)h(list)g(of)f(p)q(ossible)555 2670 y(completions:)p eop %%Page: 101 103 101 102 bop 75 -58 a Fu(Chapter)15 b(8:)k(Command)c(Line)i(Editing)1032 b(101)555 149 y Ft(alias)120 b Fu(Alias)16 b(names.)k(Ma)o(y)14 b(also)h(b)q(e)h(sp)q(eci\014ed)i(as)c(`)p Ft(-a)p Fu('.)555 226 y Ft(arrayvar)48 b Fu(Arra)o(y)14 b(v)m(ariable)j(names.)555 302 y Ft(binding)72 b Fu(Readline)16 b(k)o(ey)e(binding)j(names)d (\(see)g(Section)i(8.4)d([Bindable)795 357 y(Readline)k(Commands],)c (page)i(90\).)555 433 y Ft(builtin)72 b Fu(Names)10 b(of)g(shell)i (builtin)g(commands.)18 b(Ma)o(y)10 b(also)g(b)q(e)h(sp)q(eci\014ed)795 488 y(as)k(`)p Ft(-b)p Fu('.)555 564 y Ft(command)72 b Fu(Command)15 b(names.)20 b(Ma)o(y)14 b(also)h(b)q(e)h(sp)q (eci\014ed)h(as)e(`)p Ft(-c)p Fu('.)555 640 y Ft(directory)795 695 y Fu(Directory)g(names.)20 b(Ma)o(y)14 b(also)h(b)q(e)h(sp)q (eci\014ed)h(as)e(`)p Ft(-d)p Fu('.)555 771 y Ft(disabled)48 b Fu(Names)15 b(of)g(disabled)i(shell)g(builtins.)555 847 y Ft(enabled)72 b Fu(Names)15 b(of)g(enabled)h(shell)h(builtins.) 555 924 y Ft(export)96 b Fu(Names)16 b(of)g(exp)q(orted)h(shell)h(v)m (ariables.)25 b(Ma)o(y)16 b(also)g(b)q(e)h(sp)q(eci-)795 979 y(\014ed)f(as)f(`)p Ft(-e)p Fu('.)555 1055 y Ft(file)144 b Fu(File)16 b(names.)k(Ma)o(y)14 b(also)i(b)q(e)f(sp)q(eci\014ed)j(as) d(`)p Ft(-f)p Fu('.)555 1131 y Ft(function)48 b Fu(Names)15 b(of)g(shell)i(functions.)555 1207 y Ft(group)120 b Fu(Group)15 b(names.)20 b(Ma)o(y)14 b(also)h(b)q(e)h(sp)q(eci\014ed)h(as)e(`)p Ft(-g)p Fu('.)555 1283 y Ft(helptopic)795 1338 y Fu(Help)k(topics)g(as) f(accepted)h(b)o(y)f(the)h Ft(help)e Fu(builtin)k(\(see)d(Sec-)795 1393 y(tion)d(4.2)g([Bash)g(Builtins],)h(page)f(36\).)555 1469 y Ft(hostname)48 b Fu(Hostnames,)43 b(as)38 b(tak)o(en)f(from)g (the)i(\014le)g(sp)q(eci\014ed)h(b)o(y)795 1524 y(the)28 b Ft(HOSTFILE)e Fu(shell)j(v)m(ariable)g(\(see)f(Section)h(5.2)d([Bash) 795 1579 y(V)l(ariables],)16 b(page)f(51\).)555 1655 y Ft(job)168 b Fu(Job)16 b(names,)g(if)g(job)g(con)o(trol)f(is)h(activ) o(e.)22 b(Ma)o(y)15 b(also)h(b)q(e)g(sp)q(eci-)795 1710 y(\014ed)g(as)f(`)p Ft(-j)p Fu('.)555 1786 y Ft(keyword)72 b Fu(Shell)17 b(reserv)o(ed)e(w)o(ords.)k(Ma)o(y)c(also)g(b)q(e)h(sp)q (eci\014ed)h(as)e(`)p Ft(-k)p Fu('.)555 1862 y Ft(running)72 b Fu(Names)15 b(of)g(running)h(jobs,)f(if)g(job)g(con)o(trol)g(is)h (activ)o(e.)555 1939 y Ft(setopt)96 b Fu(V)l(alid)18 b(argumen)o(ts)d(for)h(the)h(`)p Ft(-o)p Fu(')e(option)i(to)e(the)i Ft(set)f Fu(builtin)795 1993 y(\(see)f(Section)h(4.3)e([The)i(Set)f (Builtin],)h(page)g(46\).)555 2070 y Ft(shopt)120 b Fu(Shell)22 b(option)e(names)g(as)g(accepted)g(b)o(y)g(the)g Ft(shopt)g Fu(builtin)795 2124 y(\(see)15 b(Section)h(4.2)e([Bash)h(Builtins],)i (page)e(36\).)555 2201 y Ft(signal)96 b Fu(Signal)16 b(names.)555 2277 y Ft(stopped)72 b Fu(Names)15 b(of)g(stopp)q(ed)g (jobs,)g(if)h(job)f(con)o(trol)g(is)g(activ)o(e.)555 2353 y Ft(user)144 b Fu(User)15 b(names.)20 b(Ma)o(y)14 b(also)h(b)q(e)h(sp)q(eci\014ed)i(as)c(`)p Ft(-u)p Fu('.)555 2429 y Ft(variable)48 b Fu(Names)18 b(of)f(all)h(shell)i(v)m(ariables.) 29 b(Ma)o(y)16 b(also)i(b)q(e)g(sp)q(eci\014ed)i(as)795 2484 y(`)p Ft(-v)p Fu('.)315 2560 y Ft(-G)15 b Fo(globpat)555 2615 y Fu(The)20 b(\014lename)h(expansion)g(pattern)f Fo(globpat)g Fu(is)h(expanded)g(to)e(generate)555 2670 y(the)c(p)q(ossible)i(completions.)p eop %%Page: 102 104 102 103 bop 75 -58 a Fu(102)1262 b(Bash)15 b(Reference)h(Man)o(ual)315 149 y Ft(-W)f Fo(w)o(ordlist)555 204 y Fu(The)e Fo(w)o(ordlist)g Fu(is)g(split)h(using)f(the)g(c)o(haracters)e(in)j(the)e Ft(IFS)g Fu(sp)q(ecial)j(v)m(ariable)555 259 y(as)j(delimiters,)i(and)e (eac)o(h)g(resultan)o(t)g(w)o(ord)f(is)i(expanded.)29 b(The)18 b(p)q(ossible)555 314 y(completions)e(are)e(the)h(mem)o(b)q (ers)g(of)f(the)h(resultan)o(t)g(list)g(whic)o(h)h(matc)o(h)e(the)555 369 y(w)o(ord)h(b)q(eing)h(completed.)315 448 y Ft(-C)f Fo(command)555 503 y(command)j Fu(is)e(executed)h(in)g(a)f(subshell)i (en)o(vironmen)o(t,)e(and)g(its)h(output)e(is)555 558 y(used)h(as)f(the)g(p)q(ossible)i(completions.)315 638 y Ft(-F)e Fo(function)555 692 y Fu(The)e(shell)i(function)f Fo(function)f Fu(is)h(executed)g(in)g(the)f(curren)o(t)g(shell)h(en)o (viron-)555 747 y(men)o(t.)19 b(When)13 b(it)g(\014nishes,)h(the)f(p)q (ossible)h(completions)g(are)f(retriev)o(ed)g(from)555 802 y(the)i(v)m(alue)i(of)d(the)i Ft(COMPREPLY)e Fu(arra)o(y)g(v)m (ariable.)315 882 y Ft(-X)h Fo(\014lterpat)555 936 y(\014lterpat)f Fu(is)e(a)g(pattern)g(as)g(used)h(for)f(\014lename)h(expansion.)20 b(It)13 b(is)f(applied)j(to)555 991 y(the)g(list)g(of)f(p)q(ossible)j (completions)f(generated)e(b)o(y)h(the)g(preceding)h(options)555 1046 y(and)e(argumen)o(ts,)f(and)h(eac)o(h)g(completion)h(matc)o(hing)f Fo(\014lterpat)h Fu(is)f(remo)o(v)o(ed)555 1101 y(from)h(the)g(list.)21 b(A)15 b(leading)i(`)p Ft(!)p Fu(')d(in)i Fo(\014lterpat)h Fu(negates)e(the)g(pattern;)f(in)j(this)555 1156 y(case,)e(an)o(y)g (completion)h(not)f(matc)o(hing)g Fo(\014lterpat)h Fu(is)g(remo)o(v)o (ed.)315 1235 y Ft(-P)f Fo(pre\014x)65 b(pre\014x)21 b Fu(is)c(added)h(at)e(the)h(b)q(eginning)i(of)e(eac)o(h)g(p)q(ossible) i(completion)f(after)555 1290 y(all)e(other)f(options)g(ha)o(v)o(e)g(b) q(een)h(applied.)315 1370 y Ft(-S)f Fo(su\016x)72 b(su\016x)13 b Fu(is)e(app)q(ended)h(to)e(eac)o(h)g(p)q(ossible)i(completion)f (after)f(all)h(other)f(options)555 1425 y(ha)o(v)o(e)15 b(b)q(een)h(applied.)315 1504 y(The)i(return)g(v)m(alue)h(is)g(true)f (unless)h(an)f(in)o(v)m(alid)i(option)e(is)h(supplied,)h(an)e(option)g (other)315 1559 y(than)d(`)p Ft(-p)p Fu(')g(or)g(`)p Ft(-r)p Fu(')f(is)j(supplied)g(without)f(a)f Fo(name)j Fu(argumen)o(t,)d(an)g(attempt)g(is)h(made)g(to)315 1614 y(remo)o(v)o(e)e(a)h(completion)h(sp)q(eci\014cation)h(for)e(a)g Fo(name)i Fu(for)e(whic)o(h)h(no)f(sp)q(eci\014cation)i(exists,)315 1669 y(or)e(an)g(error)f(o)q(ccurs)i(adding)g(a)f(completion)h(sp)q (eci\014cation.)p eop %%Page: 103 105 103 104 bop 75 -58 a Fu(Chapter)15 b(9:)k(Using)d(History)f(In)o (teractiv)o(ely)962 b(103)75 149 y Fq(9)41 b(Using)26 b(History)h(In)n(teractiv)n(ely)137 268 y Fu(This)17 b(c)o(hapter)g(describ)q(es)h(ho)o(w)e(to)g(use)h(the)g Fp(gnu)f Fu(History)g(Library)h(in)o(teractiv)o(ely)l(,)h(from)e(a)g (user's)75 323 y(standp)q(oin)o(t.)38 b(It)21 b(should)h(b)q(e)g (considered)g(a)f(user's)g(guide.)38 b(F)l(or)21 b(information)g(on)g (using)h(the)f Fp(gnu)75 378 y Fu(History)15 b(Library)h(in)g(other)f (programs,)e(see)j(the)f Fp(gnu)g Fu(Readline)i(Library)e(Man)o(ual.)75 508 y Fs(9.1)33 b(Bash)21 b(History)i(F)-6 b(acilities)137 605 y Fu(When)19 b(the)f(`)p Ft(-o)d(history)p Fu(')i(option)h(to)g (the)g Ft(set)g Fu(builtin)j(is)d(enabled)i(\(see)e(Section)h(4.3)f ([The)g(Set)75 660 y(Builtin],)f(page)f(46\),)e(the)i(shell)h(pro)o (vides)f(access)g(to)f(the)g Fo(command)h(history)p Fu(,)f(the)h(list)g (of)f(commands)75 714 y(previously)j(t)o(yp)q(ed.)23 b(The)17 b(v)m(alue)g(of)f(the)h Ft(HISTSIZE)e Fu(shell)j(v)m(ariable)f (is)g(used)g(as)f(the)g(n)o(um)o(b)q(er)h(of)f(com-)75 769 y(mands)i(to)g(sa)o(v)o(e)f(in)i(a)f(history)g(list.)29 b(The)19 b(text)e(of)h(the)g(last)g Ft($HISTSIZE)f Fu(commands)h (\(default)g(500\))75 824 y(is)h(sa)o(v)o(ed.)29 b(The)19 b(shell)h(stores)d(eac)o(h)i(command)f(in)h(the)g(history)f(list)i (prior)e(to)g(parameter)g(and)g(v)m(ari-)75 879 y(able)f(expansion)g (but)g(after)e(history)i(expansion)g(is)g(p)q(erformed,)f(sub)s(ject)g (to)g(the)h(v)m(alues)g(of)f(the)g(shell)75 934 y(v)m(ariables)h Ft(HISTIGNORE)c Fu(and)j Ft(HISTCONTROL)p Fu(.)137 1002 y(When)f(the)g(shell)i(starts)c(up,)i(the)g(history)g(is)g(initialized) j(from)c(the)h(\014le)h(named)f(b)o(y)f(the)h Ft(HISTFILE)75 1056 y Fu(v)m(ariable)d(\(default)e(`)p Ft(~/.bash_history)p Fu('\).)15 b(The)c(\014le)g(named)g(b)o(y)f(the)h(v)m(alue)g(of)f Ft(HISTFILE)f Fu(is)i(truncated,)75 1111 y(if)21 b(necessary)l(,)i(to)d (con)o(tain)h(no)g(more)f(than)h(the)g(n)o(um)o(b)q(er)g(of)g(lines)h (sp)q(eci\014ed)h(b)o(y)e(the)g(v)m(alue)h(of)f(the)75 1166 y Ft(HISTFILESIZE)11 b Fu(v)m(ariable.)20 b(When)12 b(an)g(in)o(teractiv)o(e)h(shell)h(exits,)f(the)f(last)g Ft($HISTSIZE)f Fu(lines)j(are)e(copied)75 1221 y(from)i(the)h(history)g (list)h(to)e(the)h(\014le)h(named)g(b)o(y)f Ft($HISTFILE)p Fu(.)j(If)d(the)g Ft(histappend)f Fu(shell)j(option)e(is)g(set)75 1275 y(\(see)c(Section)g(4.2)f([Bash)g(Builtins],)j(page)d(36\),)g(the) h(lines)h(are)e(app)q(ended)j(to)c(the)i(history)g(\014le,)h(otherwise) 75 1330 y(the)k(history)f(\014le)i(is)f(o)o(v)o(erwritten.)21 b(If)16 b Ft(HISTFILE)f Fu(is)h(unset,)g(or)f(if)h(the)g(history)f (\014le)i(is)f(un)o(writable,)h(the)75 1385 y(history)i(is)g(not)f(sa)o (v)o(ed.)30 b(After)18 b(sa)o(ving)h(the)g(history)l(,)g(the)g(history) g(\014le)g(is)g(truncated)g(to)f(con)o(tain)h(no)75 1440 y(more)c(than)g Ft($HISTFILESIZE)e Fu(lines.)22 b(If)15 b Ft(HISTFILESIZE)f Fu(is)h(not)g(set,)g(no)g(truncation)g(is)h(p)q (erformed.)137 1508 y(The)11 b(builtin)h(command)e Ft(fc)g Fu(ma)o(y)g(b)q(e)g(used)h(to)f(list)h(or)e(edit)i(and)g(re-execute)g (a)f(p)q(ortion)g(of)g(the)g(history)75 1563 y(list.)20 b(The)15 b Ft(history)e Fu(builtin)j(ma)o(y)d(b)q(e)i(used)g(to)e (displa)o(y)i(or)f(mo)q(dify)g(the)h(history)f(list)h(and)f(manipulate) 75 1617 y(the)i(history)f(\014le.)21 b(When)16 b(using)g(command-line)i (editing,)e(searc)o(h)f(commands)g(are)h(a)o(v)m(ailable)h(in)f(eac)o (h)75 1672 y(editing)24 b(mo)q(de)e(that)g(pro)o(vide)h(access)f(to)g (the)g(history)h(list)g(\(see)f(Section)h(8.4.2)e([Commands)h(F)l(or)75 1727 y(History],)14 b(page)h(90\).)137 1795 y(The)25 b(shell)g(allo)o(ws)g(con)o(trol)f(o)o(v)o(er)f(whic)o(h)i(commands)f (are)g(sa)o(v)o(ed)g(on)g(the)g(history)g(list.)48 b(The)75 1850 y Ft(HISTCONTROL)13 b Fu(and)h Ft(HISTIGNORE)f Fu(v)m(ariables)j (ma)o(y)d(b)q(e)i(set)f(to)g(cause)g(the)h(shell)h(to)d(sa)o(v)o(e)h (only)h(a)f(subset)75 1904 y(of)f(the)g(commands)h(en)o(tered.)19 b(The)14 b Ft(cmdhist)e Fu(shell)j(option,)f(if)f(enabled,)i(causes)f (the)f(shell)i(to)e(attempt)75 1959 y(to)d(sa)o(v)o(e)h(eac)o(h)g(line) i(of)e(a)f(m)o(ulti-line)k(command)d(in)h(the)f(same)g(history)g(en)o (try)l(,)h(adding)g(semicolons)g(where)75 2014 y(necessary)18 b(to)g(preserv)o(e)g(syn)o(tactic)g(correctness.)28 b(The)19 b Ft(lithist)e Fu(shell)i(option)g(causes)f(the)g(shell)i(to)75 2069 y(sa)o(v)o(e)11 b(the)h(command)f(with)h(em)o(b)q(edded)h (newlines)h(instead)e(of)g(semicolons.)19 b(The)12 b Ft(shopt)f Fu(builtin)j(is)e(used)75 2123 y(to)j(set)g(these)g (options.)20 b(See)c(Section)g(4.2)e([Bash)h(Builtins],)i(page)e(36,)f (for)g(a)h(description)i(of)e Ft(shopt)p Fu(.)75 2254 y Fs(9.2)33 b(Bash)21 b(History)i(Builtins)137 2351 y Fu(Bash)16 b(pro)o(vides)f(t)o(w)o(o)f(builtin)k(commands)d(whic)o(h)h (manipulate)g(the)f(history)g(list)h(and)g(history)f(\014le.)75 2431 y Ft(fc)435 2496 y(fc)24 b([-e)f Fo(ename)s Ft(])h([-nlr])f([)p Fo(\014rst)q Ft(])g([)p Fo(last)q Ft(])435 2548 y(fc)h(-s)f([)p Fo(pat)q Ft(=)p Fo(rep)q Ft(])h([)p Fo(command)r Ft(])315 2615 y Fu(Fix)c(Command.)34 b(In)21 b(the)f(\014rst)f(form,)i(a)e (range)h(of)f(commands)h(from)g Fo(\014rst)g Fu(to)g Fo(last)g Fu(is)315 2670 y(selected)e(from)e(the)h(history)f(list.)25 b(Both)17 b Fo(\014rst)g Fu(and)g Fo(last)g Fu(ma)o(y)f(b)q(e)i(sp)q (eci\014ed)g(as)f(a)f(string)p eop %%Page: 104 106 104 105 bop 75 -58 a Fu(104)1262 b(Bash)15 b(Reference)h(Man)o(ual)315 149 y(\(to)c(lo)q(cate)g(the)h(most)f(recen)o(t)g(command)h(b)q (eginning)h(with)f(that)f(string\))g(or)g(as)g(a)h(n)o(um)o(b)q(er)315 204 y(\(an)e(index)i(in)o(to)f(the)g(history)g(list,)h(where)f(a)f (negativ)o(e)h(n)o(um)o(b)q(er)g(is)g(used)h(as)e(an)h(o\013set)f(from) 315 259 y(the)i(curren)o(t)h(command)f(n)o(um)o(b)q(er\).)19 b(If)14 b Fo(last)g Fu(is)g(not)f(sp)q(eci\014ed)j(it)d(is)h(set)f(to)g Fo(\014rst)p Fu(.)19 b(If)13 b Fo(\014rst)h Fu(is)315 314 y(not)h(sp)q(eci\014ed)j(it)d(is)h(set)f(to)g(the)h(previous)g (command)f(for)g(editing)h(and)g Fr(\000)p Fu(16)f(for)g(listing.)315 369 y(If)g(the)h(`)p Ft(-l)p Fu(')e(\015ag)g(is)i(giv)o(en,)f(the)g (commands)g(are)g(listed)h(on)f(standard)g(output.)20 b(The)15 b(`)p Ft(-n)p Fu(')315 423 y(\015ag)h(suppresses)g(the)h (command)e(n)o(um)o(b)q(ers)i(when)f(listing.)24 b(The)16 b(`)p Ft(-r)p Fu(')f(\015ag)h(rev)o(erses)g(the)315 478 y(order)g(of)h(the)f(listing.)26 b(Otherwise,)17 b(the)g(editor)g(giv)o (en)g(b)o(y)g Fo(ename)i Fu(is)e(in)o(v)o(ok)o(ed)g(on)g(a)f(\014le)315 533 y(con)o(taining)i(those)f(commands.)25 b(If)18 b Fo(ename)i Fu(is)d(not)g(giv)o(en,)h(the)f(v)m(alue)h(of)f(the)g(follo) o(wing)315 588 y(v)m(ariable)g(expansion)g(is)f(used:)22 b Ft(${FCEDIT:-${EDITOR:-vi}})p Fu(.)d(This)d(sa)o(ys)f(to)h(use)g(the) 315 643 y(v)m(alue)i(of)e(the)h Ft(FCEDIT)f Fu(v)m(ariable)i(if)f(set,) g(or)f(the)h(v)m(alue)g(of)g(the)g Ft(EDITOR)e Fu(v)m(ariable)j(if)g (that)315 697 y(is)f(set,)f(or)h Ft(vi)f Fu(if)h(neither)g(is)h(set.)23 b(When)17 b(editing)h(is)f(complete,)h(the)e(edited)i(commands)315 752 y(are)d(ec)o(ho)q(ed)h(and)f(executed.)315 823 y(In)j(the)f(second) h(form,)e Fo(command)j Fu(is)f(re-executed)g(after)e(eac)o(h)h (instance)h(of)f Fo(pat)h Fu(in)g(the)315 877 y(selected)e(command)g (is)f(replaced)i(b)o(y)e Fo(rep)p Fu(.)315 948 y(A)g(useful)i(alias)f (to)f(use)h(with)f(the)h Ft(fc)f Fu(command)g(is)h Ft(r='fc)f(-s')p Fu(,)g(so)g(that)f(t)o(yping)i(`)p Ft(r)f(cc)p Fu(')315 1003 y(runs)j(the)h(last)f(command)g(b)q(eginning)i(with)e Ft(cc)g Fu(and)g(t)o(yping)h(`)p Ft(r)p Fu(')e(re-executes)i(the)f (last)315 1057 y(command)d(\(see)g(Section)h(6.6)f([Aliases],)g(page)g (67\).)75 1143 y Ft(history)435 1211 y(history)23 b([)p Fo(n)p Ft(])435 1263 y(history)g(-c)435 1315 y(history)g(-d)g Fo(o\013set)435 1367 y Ft(history)g([-anrw])g([)p Fo(\014lename)s Ft(])435 1418 y(history)g(-ps)g Fo(arg)315 1489 y Fu(With)13 b(no)g(options,)g(displa)o(y)h(the)f(history)g(list)g(with)h(line)g(n)o (um)o(b)q(ers.)20 b(Lines)14 b(pre\014xed)g(with)315 1544 y(a)g(`)p Ft(*)p Fu(')f(ha)o(v)o(e)g(b)q(een)i(mo)q(di\014ed.)21 b(An)14 b(argumen)o(t)g(of)f Fo(n)h Fu(lists)h(only)f(the)g(last)g Fo(n)h Fu(lines.)21 b(Options,)315 1598 y(if)16 b(supplied,)h(ha)o(v)o (e)e(the)g(follo)o(wing)h(meanings:)315 1684 y Ft(-c)192 b Fu(Clear)12 b(the)f(history)h(list.)19 b(This)12 b(ma)o(y)f(b)q(e)h (com)o(bined)g(with)g(the)g(other)f(options)555 1739 y(to)k(replace)h(the)f(history)g(list)h(completely)l(.)315 1825 y Ft(-d)f Fo(o\013set)71 b Fu(Delete)12 b(the)g(history)g(en)o (try)f(at)g(p)q(osition)i Fo(o\013set)p Fu(.)k Fo(o\013set)12 b Fu(should)g(b)q(e)h(sp)q(eci\014ed)555 1880 y(as)i(it)g(app)q(ears)h (when)f(the)h(history)f(is)g(displa)o(y)o(ed.)315 1966 y Ft(-a)192 b Fu(App)q(end)20 b(the)f(new)f(history)h(lines)h (\(history)e(lines)i(en)o(tered)f(since)h(the)e(b)q(e-)555 2021 y(ginning)f(of)d(the)i(curren)o(t)f(Bash)g(session\))g(to)g(the)g (history)g(\014le.)315 2107 y Ft(-n)192 b Fu(App)q(end)18 b(the)f(history)g(lines)i(not)d(already)h(read)g(from)f(the)h(history)g (\014le)h(to)555 2162 y(the)13 b(curren)o(t)f(history)h(list.)20 b(These)13 b(are)g(lines)h(app)q(ended)g(to)e(the)h(history)g(\014le) 555 2216 y(since)j(the)g(b)q(eginning)h(of)e(the)g(curren)o(t)g(Bash)g (session.)315 2302 y Ft(-r)192 b Fu(Read)13 b(the)g(curren)o(t)g (history)g(\014le)h(and)f(app)q(end)i(its)e(con)o(ten)o(ts)f(to)h(the)g (history)555 2357 y(list.)315 2443 y Ft(-w)192 b Fu(W)l(rite)15 b(out)g(the)g(curren)o(t)h(history)f(to)f(the)i(history)f(\014le.)315 2529 y Ft(-p)192 b Fu(P)o(erform)14 b(history)i(substitution)g(on)f (the)g Fo(arg)t Fu(s)g(and)g(displa)o(y)i(the)e(result)h(on)555 2584 y(the)e(standard)g(output,)f(without)h(storing)g(the)g(results)h (in)f(the)h(history)f(list.)315 2670 y Ft(-s)192 b Fu(The)15 b Fo(arg)t Fu(s)g(are)g(added)g(to)g(the)g(end)h(of)f(the)g(history)g (list)h(as)f(a)g(single)i(en)o(try)l(.)p eop %%Page: 105 107 105 106 bop 75 -58 a Fu(Chapter)15 b(9:)k(Using)d(History)f(In)o (teractiv)o(ely)962 b(105)315 149 y(When)13 b(an)o(y)e(of)h(the)h(`)p Ft(-w)p Fu(',)e(`)p Ft(-r)p Fu(',)g(`)p Ft(-a)p Fu(',)h(or)f(`)p Ft(-n)p Fu(')g(options)i(is)f(used,)h(if)g Fo(\014lename)j Fu(is)d(giv)o(en,)g(then)315 204 y(it)j(is)g(used)h(as)e(the)h(history) g(\014le.)23 b(If)16 b(not,)f(then)h(the)g(v)m(alue)h(of)f(the)g Ft(HISTFILE)e Fu(v)m(ariable)j(is)315 259 y(used.)75 395 y Fs(9.3)33 b(History)22 b(Expansion)137 495 y Fu(The)c(History)g (library)h(pro)o(vides)f(a)f(history)h(expansion)h(feature)e(that)h(is) g(similar)h(to)e(the)h(history)75 550 y(expansion)12 b(pro)o(vided)g(b)o(y)f Ft(csh)p Fu(.)18 b(This)11 b(section)h(describ) q(es)g(the)g(syn)o(tax)e(used)h(to)g(manipulate)h(the)f(history)75 605 y(information.)137 675 y(History)k(expansions)h(in)o(tro)q(duce)h (w)o(ords)d(from)g(the)i(history)f(list)h(in)o(to)f(the)h(input)g (stream,)e(making)75 730 y(it)h(easy)g(to)g(rep)q(eat)g(commands,)g (insert)h(the)f(argumen)o(ts)f(to)h(a)g(previous)h(command)f(in)o(to)g (the)g(curren)o(t)75 784 y(input)h(line,)h(or)d(\014x)i(errors)e(in)i (previous)g(commands)f(quic)o(kly)l(.)137 855 y(History)e(expansion)h (tak)o(es)f(place)h(in)g(t)o(w)o(o)e(parts.)19 b(The)13 b(\014rst)g(is)h(to)e(determine)i(whic)o(h)h(line)f(from)f(the)75 910 y(history)h(list)h(should)f(b)q(e)h(used)g(during)f(substitution.) 21 b(The)14 b(second)g(is)h(to)e(select)i(p)q(ortions)f(of)f(that)g (line)75 964 y(for)f(inclusion)k(in)o(to)c(the)h(curren)o(t)g(one.)19 b(The)14 b(line)g(selected)g(from)e(the)h(history)g(is)h(called)g(the)f Fo(ev)o(en)o(t)p Fu(,)g(and)75 1019 y(the)e(p)q(ortions)f(of)h(that)e (line)k(that)d(are)g(acted)g(up)q(on)i(are)e(called)i Fo(w)o(ords)p Fu(.)18 b(V)l(arious)11 b Fo(mo)q(di\014ers)i Fu(are)d(a)o(v)m(ailable)75 1074 y(to)16 b(manipulate)j(the)e(selected) h(w)o(ords.)24 b(The)18 b(line)g(is)g(brok)o(en)f(in)o(to)g(w)o(ords)f (in)i(the)f(same)f(fashion)i(that)75 1129 y(Bash)g(do)q(es,)g(so)f (that)f(sev)o(eral)i(w)o(ords)f(surrounded)h(b)o(y)f(quotes)h(are)f (considered)i(one)e(w)o(ord.)26 b(History)75 1184 y(expansions)18 b(are)e(in)o(tro)q(duced)j(b)o(y)d(the)h(app)q(earance)h(of)f(the)g (history)f(expansion)i(c)o(haracter,)f(whic)o(h)g(is)75 1238 y(`)p Ft(!)p Fu(')d(b)o(y)h(default.)21 b(Only)16 b(`)p Ft(\\)p Fu(')e(and)i(`)p Ft(')p Fu(')e(ma)o(y)h(b)q(e)g(used)h (to)f(escap)q(e)h(the)f(history)g(expansion)h(c)o(haracter.)137 1309 y(Sev)o(eral)21 b(shell)g(options)f(settable)g(with)g(the)g Ft(shopt)f Fu(builtin)j(\(see)e(Section)g(4.2)f([Bash)h(Builtins],)75 1364 y(page)c(36\))f(ma)o(y)g(b)q(e)h(used)h(to)e(tailor)h(the)g(b)q (eha)o(vior)g(of)f(history)h(expansion.)23 b(If)16 b(the)g Ft(histverify)e Fu(shell)75 1418 y(option)19 b(is)h(enabled,)h(and)e (Readline)i(is)e(b)q(eing)i(used,)f(history)f(substitutions)h(are)f (not)f(immediately)75 1473 y(passed)d(to)g(the)g(shell)i(parser.)j (Instead,)15 b(the)h(expanded)g(line)h(is)f(reloaded)g(in)o(to)f(the)g (Readline)i(editing)75 1528 y(bu\013er)e(for)g(further)g(mo)q (di\014cation.)21 b(If)15 b(Readline)i(is)f(b)q(eing)g(used,)f(and)h (the)f Ft(histreedit)f Fu(shell)j(option)75 1583 y(is)h(enabled,)g(a)f (failed)h(history)f(expansion)h(will)h(b)q(e)f(reloaded)g(in)o(to)f (the)g(Readline)h(editing)h(bu\013er)e(for)75 1638 y(correction.)36 b(The)21 b(`)p Ft(-p)p Fu(')e(option)i(to)f(the)h Ft(history)e Fu(builtin)k(command)e(ma)o(y)e(b)q(e)j(used)f(to)f(see)h(what)75 1692 y(a)d(history)h(expansion)h(will)g(do)f(b)q(efore)g(using)h(it.)31 b(The)19 b(`)p Ft(-s)p Fu(')f(option)h(to)f(the)h Ft(history)f Fu(builtin)j(ma)o(y)75 1747 y(b)q(e)d(used)f(to)g(add)g(commands)g(to)f (the)h(end)h(of)e(the)i(history)f(list)g(without)g(actually)h (executing)g(them,)75 1802 y(so)h(that)f(they)h(are)g(a)o(v)m(ailable)h (for)f(subsequen)o(t)g(recall.)33 b(This)19 b(is)h(most)e(useful)i(in)g (conjunction)g(with)75 1857 y(Readline.)137 1927 y(The)c(shell)h(allo)o (ws)e(con)o(trol)g(of)g(the)g(v)m(arious)h(c)o(haracters)e(used)i(b)o (y)f(the)h(history)f(expansion)h(mec)o(ha-)75 1982 y(nism)g(with)f(the) h Ft(histchars)e Fu(v)m(ariable.)75 2100 y Fm(9.3.1)30 b(Ev)n(en)n(t)21 b(Designators)137 2200 y Fu(An)16 b(ev)o(en)o(t)f (designator)g(is)g(a)g(reference)h(to)f(a)g(command)g(line)i(en)o(try)d (in)i(the)g(history)f(list.)75 2284 y Ft(!)216 b Fu(Start)16 b(a)g(history)h(substitution,)g(except)h(when)f(follo)o(w)o(ed)g(b)o(y) f(a)h(space,)g(tab,)f(the)h(end)g(of)315 2339 y(the)e(line,)i(`)p Ft(=)p Fu(')d(or)h(`)p Ft(\()p Fu('.)75 2422 y Ft(!)p Fo(n)191 b Fu(Refer)15 b(to)f(command)h(line)i Fo(n)p Fu(.)75 2504 y Ft(!-)p Fo(n)167 b Fu(Refer)15 b(to)f(the)i(command)f Fo(n)g Fu(lines)i(bac)o(k.)75 2587 y Ft(!!)192 b Fu(Refer)15 b(to)f(the)i(previous)f(command.)20 b(This)c(is)g(a)f(synon)o(ym)g(for) f(`)p Ft(!-1)p Fu('.)75 2670 y Ft(!)p Fo(string)102 b Fu(Refer)15 b(to)f(the)i(most)e(recen)o(t)h(command)g(starting)g(with)g Fo(string)p Fu(.)p eop %%Page: 106 108 106 107 bop 75 -58 a Fu(106)1262 b(Bash)15 b(Reference)h(Man)o(ual)75 149 y Ft(!?)p Fo(string)t Ft([?])315 204 y Fu(Refer)g(to)g(the)h(most)f (recen)o(t)h(command)g(con)o(taining)g Fo(string)p Fu(.)25 b(The)17 b(trailing)g(`)p Ft(?)p Fu(')f(ma)o(y)g(b)q(e)315 259 y(omitted)f(if)h(the)f Fo(string)k Fu(is)d(follo)o(w)o(ed)f (immediately)i(b)o(y)e(a)g(newline.)75 348 y Ft(^)p Fo(string1)t Ft(^)p Fo(string2)t Ft(^)315 403 y Fu(Quic)o(k)i(Substitution.)23 b(Rep)q(eat)16 b(the)g(last)f(command,)h(replacing)h Fo(string1)i Fu(with)e Fo(string2)p Fu(.)315 458 y(Equiv)m(alen)o(t)g (to)d Ft(!!:s/)p Fo(string1)t Ft(/)p Fo(string2)t Ft(/)p Fu(.)75 546 y Ft(!#)192 b Fu(The)15 b(en)o(tire)h(command)f(line)i(t)o (yp)q(ed)f(so)e(far.)75 677 y Fm(9.3.2)30 b(W)-5 b(ord)20 b(Designators)137 782 y Fu(W)l(ord)d(designators)g(are)g(used)h(to)f (select)h(desired)h(w)o(ords)d(from)h(the)g(ev)o(en)o(t.)26 b(A)18 b(`)p Ft(:)p Fu(')e(separates)h(the)75 837 y(ev)o(en)o(t)j(sp)q (eci\014cation)h(from)e(the)h(w)o(ord)f(designator.)34 b(It)20 b(ma)o(y)f(b)q(e)h(omitted)g(if)g(the)g(w)o(ord)f(designator)75 892 y(b)q(egins)f(with)g(a)e(`)p Ft(^)p Fu(',)h(`)p Ft($)p Fu(',)f(`)p Ft(*)p Fu(',)g(`)p Ft(-)p Fu(',)g(or)h(`)p Ft(\045)p Fu('.)24 b(W)l(ords)17 b(are)g(n)o(um)o(b)q(ered)g(from)g (the)g(b)q(eginning)i(of)e(the)g(line,)75 947 y(with)j(the)g(\014rst)f (w)o(ord)h(b)q(eing)h(denoted)f(b)o(y)g(0)f(\(zero\).)33 b(W)l(ords)20 b(are)f(inserted)i(in)o(to)f(the)g(curren)o(t)f(line)75 1002 y(separated)c(b)o(y)g(single)i(spaces.)137 1078 y(F)l(or)e(example,)75 1172 y Ft(!!)192 b Fu(designates)18 b(the)g(preceding)i(command.)28 b(When)18 b(y)o(ou)g(t)o(yp)q(e)g (this,)h(the)f(preceding)h(com-)315 1226 y(mand)c(is)h(rep)q(eated)g (in)g(toto.)75 1315 y Ft(!!:$)144 b Fu(designates)12 b(the)f(last)g(argumen)o(t)f(of)h(the)g(preceding)i(command.)19 b(This)11 b(ma)o(y)g(b)q(e)h(shortened)315 1370 y(to)j Ft(!$)p Fu(.)75 1459 y Ft(!fi:2)120 b Fu(designates)15 b(the)g(second)g(argumen)o(t)f(of)g(the)h(most)f(recen)o(t)g(command)h (starting)f(with)h(the)315 1514 y(letters)g Ft(fi)p Fu(.)137 1607 y(Here)h(are)f(the)g(w)o(ord)f(designators:)75 1701 y Ft(0)h(\(zero\))57 b Fu(The)15 b Ft(0)p Fu(th)g(w)o(ord.)20 b(F)l(or)14 b(man)o(y)h(applications,)h(this)g(is)g(the)f(command)g(w)o (ord.)75 1790 y Fo(n)215 b Fu(The)15 b Fo(n)p Fu(th)h(w)o(ord.)75 1879 y Ft(^)216 b Fu(The)15 b(\014rst)g(argumen)o(t;)f(that)h(is,)g(w)o (ord)g(1.)75 1968 y Ft($)216 b Fu(The)15 b(last)h(argumen)o(t.)75 2056 y Ft(\045)216 b Fu(The)15 b(w)o(ord)g(matc)o(hed)g(b)o(y)g(the)g (most)g(recen)o(t)g(`)p Ft(?)p Fo(string)t Ft(?)p Fu(')f(searc)o(h.)75 2145 y Fo(x)p Ft(-)p Fo(y)168 b Fu(A)15 b(range)g(of)g(w)o(ords;)f(`)p Ft(-)p Fo(y)t Fu(')g(abbreviates)i(`)p Ft(0-)p Fo(y)t Fu('.)75 2234 y Ft(*)216 b Fu(All)15 b(of)f(the)f(w)o(ords,)g(except)i (the)f Ft(0)p Fu(th.)19 b(This)14 b(is)h(a)e(synon)o(ym)h(for)f(`)p Ft(1-$)p Fu('.)18 b(It)c(is)g(not)g(an)g(error)315 2289 y(to)g(use)h(`)p Ft(*)p Fu(')f(if)i(there)e(is)i(just)e(one)h(w)o(ord)f (in)i(the)f(ev)o(en)o(t;)f(the)h(empt)o(y)g(string)g(is)g(returned)g (in)315 2344 y(that)f(case.)75 2433 y Fo(x)s Ft(*)189 b Fu(Abbreviates)16 b(`)p Fo(x)p Ft(-$)p Fu(')75 2522 y Fo(x)p Ft(-)192 b Fu(Abbreviates)16 b(`)p Fo(x)p Ft(-$)p Fu(')e(lik)o(e)i(`)p Fo(x)s Ft(*)p Fu(',)e(but)i(omits)f(the)g(last)g (w)o(ord.)137 2615 y(If)i(a)g(w)o(ord)f(designator)h(is)h(supplied)h (without)e(an)g(ev)o(en)o(t)f(sp)q(eci\014cation,)j(the)e(previous)h (command)75 2670 y(is)e(used)f(as)g(the)h(ev)o(en)o(t.)p eop %%Page: 107 109 107 108 bop 75 -58 a Fu(Chapter)15 b(9:)k(Using)d(History)f(In)o (teractiv)o(ely)962 b(107)75 149 y Fm(9.3.3)30 b(Mo)r(di\014ers)137 246 y Fu(After)10 b(the)h(optional)g(w)o(ord)e(designator,)i(y)o(ou)f (can)h(add)f(a)g(sequence)i(of)e(one)g(or)g(more)g(of)g(the)g(follo)o (wing)75 301 y(mo)q(di\014ers,)16 b(eac)o(h)f(preceded)i(b)o(y)e(a)g(`) p Ft(:)p Fu('.)75 380 y Ft(h)216 b Fu(Remo)o(v)o(e)14 b(a)h(trailing)h(pathname)f(comp)q(onen)o(t,)g(lea)o(ving)h(only)g(the) f(head.)75 460 y Ft(t)216 b Fu(Remo)o(v)o(e)14 b(all)i(leading)h (pathname)e(comp)q(onen)o(ts,)g(lea)o(ving)h(the)f(tail.)75 540 y Ft(r)216 b Fu(Remo)o(v)o(e)14 b(a)h(trailing)h(su\016x)f(of)g (the)g(form)g(`)p Ft(.)p Fo(su\016x)s Fu(',)f(lea)o(ving)i(the)f (basename.)75 619 y Ft(e)216 b Fu(Remo)o(v)o(e)14 b(all)i(but)g(the)f (trailing)h(su\016x.)75 699 y Ft(p)216 b Fu(Prin)o(t)15 b(the)g(new)h(command)f(but)g(do)g(not)g(execute)h(it.)75 779 y Ft(q)216 b Fu(Quote)15 b(the)h(substituted)g(w)o(ords,)e (escaping)i(further)f(substitutions.)75 858 y Ft(x)216 b Fu(Quote)16 b(the)g(substituted)g(w)o(ords)f(as)g(with)h(`)p Ft(q)p Fu(',)e(but)i(break)g(in)o(to)f(w)o(ords)g(at)g(spaces,)h(tabs,) 315 913 y(and)f(newlines.)75 993 y Ft(s/)p Fo(old)r Ft(/)p Fo(new)t Ft(/)315 1048 y Fu(Substitute)i Fo(new)j Fu(for)c(the)h (\014rst)e(o)q(ccurrence)j(of)e Fo(old)i Fu(in)f(the)g(ev)o(en)o(t)f (line.)25 b(An)o(y)16 b(delimiter)315 1103 y(ma)o(y)c(b)q(e)h(used)g (in)g(place)g(of)f(`)p Ft(/)p Fu('.)18 b(The)13 b(delimiter)h(ma)o(y)e (b)q(e)h(quoted)f(in)i Fo(old)g Fu(and)f Fo(new)k Fu(with)12 b(a)315 1157 y(single)j(bac)o(kslash.)20 b(If)15 b(`)p Ft(&)p Fu(')e(app)q(ears)h(in)h Fo(new)p Fu(,)f(it)g(is)h(replaced)g(b) o(y)f Fo(old)p Fu(.)20 b(A)14 b(single)i(bac)o(kslash)315 1212 y(will)j(quote)e(the)h(`)p Ft(&)p Fu('.)25 b(The)17 b(\014nal)i(delimiter)g(is)f(optional)g(if)f(it)h(is)g(the)f(last)g(c)o (haracter)g(on)315 1267 y(the)e(input)h(line.)75 1347 y Ft(&)216 b Fu(Rep)q(eat)15 b(the)g(previous)h(substitution.)75 1426 y Ft(g)216 b Fu(Cause)19 b(c)o(hanges)h(to)e(b)q(e)i(applied)h(o)o (v)o(er)e(the)g(en)o(tire)h(ev)o(en)o(t)f(line.)34 b(Used)20 b(in)g(conjunction)315 1481 y(with)c(`)p Ft(s)p Fu(',)d(as)i(in)h Ft(gs/)p Fo(old)r Ft(/)p Fo(new)t Ft(/)p Fu(,)f(or)g(with)g(`)p Ft(&)p Fu('.)p eop %%Page: 108 110 108 109 bop 75 -58 a Fu(108)1262 b(Bash)15 b(Reference)h(Man)o(ual)p eop %%Page: 109 111 109 110 bop 75 -58 a Fu(Chapter)15 b(10:)k(Installing)e(Bash)1178 b(109)75 149 y Fq(10)41 b(Installing)26 b(Bash)137 272 y Fu(This)21 b(c)o(hapter)f(pro)o(vides)g(basic)h(instructions)g(for)e (installing)k(Bash)d(on)g(the)g(v)m(arious)g(supp)q(orted)75 327 y(platforms.)28 b(The)19 b(distribution)g(supp)q(orts)g(the)f Fp(gnu)g Fu(op)q(erating)g(systems,)g(nearly)h(ev)o(ery)f(v)o(ersion)g (of)75 382 y(Unix,)h(and)f(sev)o(eral)g(non-Unix)h(systems)f(suc)o(h)g (as)f(BeOS)i(and)f(In)o(terix.)29 b(Other)18 b(indep)q(enden)o(t)i(p)q (orts)75 437 y(exist)c(for)e Fp(ms-dos)p Fu(,)h Fp(os/2)p Fu(,)g(Windo)o(ws)g Fp(95/98)p Fu(,)g(and)h(Windo)o(ws)f Fp(nt)p Fu(.)75 570 y Fs(10.1)32 b(Basic)22 b(Installation)137 668 y Fu(These)16 b(are)f(installation)h(instructions)g(for)f(Bash.)137 737 y(The)h(simplest)g(w)o(a)o(y)e(to)h(compile)h(Bash)g(is:)100 807 y(1.)29 b Ft(cd)19 b Fu(to)f(the)i(directory)f(con)o(taining)h(the) f(source)h(co)q(de)f(and)h(t)o(yp)q(e)f(`)p Ft(./configure)p Fu(')e(to)i(con\014gure)165 861 y(Bash)e(for)g(y)o(our)g(system.)26 b(If)17 b(y)o(ou're)g(using)h Ft(csh)f Fu(on)g(an)h(old)f(v)o(ersion)h (of)f(System)g(V,)g(y)o(ou)g(migh)o(t)165 916 y(need)11 b(to)f(t)o(yp)q(e)g(`)p Ft(sh)15 b(./configure)p Fu(')8 b(instead)j(to)f(prev)o(en)o(t)g Ft(csh)g Fu(from)g(trying)g(to)g (execute)h Ft(configure)165 971 y Fu(itself.)165 1039 y(Running)16 b Ft(configure)f Fu(tak)o(es)g(some)g(time.)22 b(While)17 b(running,)g(it)f(prin)o(ts)g(messages)f(telling)i(whic)o(h) 165 1094 y(features)e(it)g(is)h(c)o(hec)o(king)g(for.)100 1162 y(2.)29 b(T)o(yp)q(e)15 b(`)p Ft(make)p Fu(')f(to)h(compile)i (Bash)e(and)g(build)i(the)f Ft(bashbug)e Fu(bug)h(rep)q(orting)h (script.)100 1230 y(3.)29 b(Optionally)l(,)17 b(t)o(yp)q(e)e(`)p Ft(make)f(tests)p Fu(')g(to)h(run)g(the)h(Bash)f(test)g(suite.)100 1299 y(4.)29 b(T)o(yp)q(e)18 b(`)p Ft(make)d(install)p Fu(')i(to)g(install)j Ft(bash)d Fu(and)i Ft(bashbug)p Fu(.)28 b(This)19 b(will)h(also)e(install)h(the)g(man)o(ual)165 1353 y(pages)c(and)g(Info)h(\014le.)137 1436 y(The)11 b Ft(configure)e Fu(shell)k(script)e(attempts)e(to)h(guess)h(correct)f (v)m(alues)i(for)e(v)m(arious)h(system-dep)q(enden)o(t)75 1491 y(v)m(ariables)23 b(used)g(during)f(compilation.)41 b(It)22 b(uses)g(those)g(v)m(alues)h(to)e(create)h(a)f(`)p Ft(Makefile)p Fu(')f(in)j(eac)o(h)75 1546 y(directory)13 b(of)f(the)g(pac)o(k)m(age)g(\(the)h(top)f(directory)l(,)h(the)f(`)p Ft(builtins)p Fu(',)f(`)p Ft(doc)p Fu(',)g(and)i(`)p Ft(support)p Fu(')d(directories,)75 1600 y(eac)o(h)15 b(directory)h(under)g(`)p Ft(lib)p Fu(',)d(and)j(sev)o(eral)f (others\).)k(It)d(also)f(creates)g(a)g(`)p Ft(config.h)p Fu(')e(\014le)j(con)o(taining)75 1655 y(system-dep)q(enden)o(t)h (de\014nitions.)24 b(Finally)l(,)17 b(it)f(creates)f(a)h(shell)h (script)g(named)f Ft(config.status)e Fu(that)75 1710 y(y)o(ou)h(can)h(run)g(in)h(the)f(future)f(to)h(recreate)f(the)h (curren)o(t)f(con\014guration,)h(a)g(\014le)g(`)p Ft(config.cache)p Fu(')e(that)75 1765 y(sa)o(v)o(es)i(the)h(results)g(of)g(its)g(tests)f (to)g(sp)q(eed)i(up)f(recon\014guring,)h(and)f(a)g(\014le)g(`)p Ft(config.log)p Fu(')e(con)o(taining)75 1820 y(compiler)f(output)e (\(useful)h(mainly)h(for)d(debugging)j Ft(configure)p Fu(\).)j(If)c(at)e(some)h(p)q(oin)o(t)h(`)p Ft(config.cache)p Fu(')75 1874 y(con)o(tains)i(results)h(y)o(ou)f(don't)f(w)o(an)o(t)h (to)f(k)o(eep,)h(y)o(ou)g(ma)o(y)g(remo)o(v)o(e)f(or)h(edit)h(it.)137 1944 y(T)l(o)j(\014nd)g(out)f(more)h(ab)q(out)f(the)h(options)g(and)g (argumen)o(ts)f(that)g(the)g Ft(configure)g Fu(script)h(under-)75 1998 y(stands,)c(t)o(yp)q(e)195 2065 y Ft(bash-2.04$)22 b(./configure)h(--help)75 2134 y Fu(at)15 b(the)g(Bash)g(prompt)g(in)h (y)o(our)f(Bash)g(source)g(directory)l(.)137 2203 y(If)27 b(y)o(ou)g(need)h(to)e(do)h(un)o(usual)g(things)h(to)e(compile)i(Bash,) i(please)d(try)g(to)f(\014gure)h(out)f(ho)o(w)75 2258 y Ft(configure)e Fu(could)h(c)o(hec)o(k)g(whether)g(or)g(not)f(to)g(do) h(them,)i(and)e(mail)g(di\013s)h(or)e(instructions)i(to)75 2312 y Ft(bash-maintainers@gnu.org)12 b Fu(so)j(they)g(can)g(b)q(e)h (considered)h(for)d(the)i(next)f(release.)137 2382 y(The)e(\014le)h(`)p Ft(configure.in)p Fu(')c(is)j(used)h(to)e(create)g Ft(configure)g Fu(b)o(y)g(a)h(program)e(called)k(Auto)q(conf.)k(Y)l(ou)75 2436 y(only)d(need)g(`)p Ft(configure.in)p Fu(')d(if)i(y)o(ou)g(w)o(an) o(t)f(to)h(c)o(hange)g(it)h(or)e(regenerate)h Ft(configure)f Fu(using)i(a)f(new)o(er)75 2491 y(v)o(ersion)d(of)g(Auto)q(conf.)19 b(If)13 b(y)o(ou)e(do)i(this,)f(mak)o(e)g(sure)g(y)o(ou)g(are)g(using)h (Auto)q(conf)f(v)o(ersion)h(2.50)e(or)g(new)o(er.)137 2560 y(Y)l(ou)k(can)f(remo)o(v)o(e)g(the)g(program)f(binaries)j(and)e (ob)s(ject)g(\014les)h(from)f(the)g(source)h(co)q(de)f(directory)h(b)o (y)75 2615 y(t)o(yping)h(`)p Ft(make)e(clean)p Fu('.)20 b(T)l(o)15 b(also)h(remo)o(v)o(e)f(the)g(\014les)i(that)e Ft(configure)f Fu(created)i(\(so)f(y)o(ou)g(can)g(compile)75 2670 y(Bash)g(for)g(a)g(di\013eren)o(t)g(kind)h(of)f(computer\),)g(t)o (yp)q(e)g(`)p Ft(make)f(distclean)p Fu('.)p eop %%Page: 110 112 110 111 bop 75 -58 a Fu(110)1262 b(Bash)15 b(Reference)h(Man)o(ual)75 149 y Fs(10.2)32 b(Compilers)23 b(and)g(Options)137 259 y Fu(Some)d(systems)g(require)h(un)o(usual)g(options)f(for)f (compilation)i(or)f(linking)i(that)d(the)h Ft(configure)75 314 y Fu(script)c(do)q(es)f(not)g(kno)o(w)g(ab)q(out.)20 b(Y)l(ou)c(can)f(giv)o(e)h Ft(configure)e Fu(initial)j(v)m(alues)f(for) f(v)m(ariables)i(b)o(y)e(setting)75 369 y(them)10 b(in)h(the)g(en)o (vironmen)o(t.)18 b(Using)11 b(a)f(Bourne-compatible)i(shell,)h(y)o(ou) d(can)g(do)h(that)e(on)i(the)f(command)75 423 y(line)17 b(lik)o(e)f(this:)195 501 y Ft(CC=c89)23 b(CFLAGS=-O2)g(LIBS=-lposix)f (./configure)137 582 y Fu(On)16 b(systems)f(that)f(ha)o(v)o(e)h(the)g Ft(env)g Fu(program,)f(y)o(ou)h(can)g(do)g(it)g(lik)o(e)i(this:)195 659 y Ft(env)23 b(CPPFLAGS=-I/usr/local/include)d(LDFLAGS=-s)j (./configure)137 740 y Fu(The)16 b(con\014guration)f(pro)q(cess)h(uses) f(GCC)f(to)h(build)i(Bash)e(if)h(it)g(is)f(a)o(v)m(ailable.)75 902 y Fs(10.3)32 b(Compiling)24 b(F)-6 b(or)23 b(Multiple)i(Arc)n (hitectures)137 1012 y Fu(Y)l(ou)15 b(can)f(compile)i(Bash)e(for)f (more)h(than)g(one)g(kind)i(of)d(computer)i(at)e(the)h(same)g(time,)g (b)o(y)h(placing)75 1067 y(the)k(ob)s(ject)g(\014les)h(for)f(eac)o(h)g (arc)o(hitecture)h(in)g(their)g(o)o(wn)f(directory)l(.)32 b(T)l(o)19 b(do)h(this,)g(y)o(ou)f(m)o(ust)g(use)g(a)75 1121 y(v)o(ersion)e(of)f Ft(make)g Fu(that)f(supp)q(orts)i(the)f Ft(VPATH)g Fu(v)m(ariable,)i(suc)o(h)f(as)f(GNU)g Ft(make)p Fu(.)23 b Ft(cd)16 b Fu(to)g(the)h(directory)75 1176 y(where)12 b(y)o(ou)f(w)o(an)o(t)f(the)i(ob)s(ject)f(\014les)h(and)g (executables)h(to)e(go)g(and)g(run)h(the)g Ft(configure)e Fu(script)i(from)f(the)75 1231 y(source)i(directory)l(.)19 b(Y)l(ou)14 b(ma)o(y)e(need)h(to)g(supply)h(the)f(`)p Ft(--srcdir=PATH)p Fu(')d(argumen)o(t)i(to)g(tell)i Ft(configure)75 1286 y Fu(where)22 b(the)g(source)g(\014les)h(are.)40 b Ft(configure)21 b Fu(automatically)h(c)o(hec)o(ks)g(for)f(the)i (source)f(co)q(de)g(in)h(the)75 1341 y(directory)15 b(that)g Ft(configure)f Fu(is)i(in)g(and)f(in)h(`..'.)137 1421 y(If)11 b(y)o(ou)f(ha)o(v)o(e)g(to)g(use)h(a)f Ft(make)g Fu(that)g(do)q(es)h(not)f(supp)q(orts)g(the)h Ft(VPATH)f Fu(v)m(ariable,)i(y)o(ou)e(can)h(compile)h(Bash)75 1476 y(for)k(one)h(arc)o(hitecture)g(at)f(a)h(time)g(in)g(the)g(source)g(co) q(de)g(directory)l(.)25 b(After)17 b(y)o(ou)f(ha)o(v)o(e)g(installed)j (Bash)75 1531 y(for)c(one)g(arc)o(hitecture,)g(use)h(`)p Ft(make)e(distclean)p Fu(')f(b)q(efore)j(recon\014guring)g(for)e (another)h(arc)o(hitecture.)137 1611 y(Alternativ)o(ely)l(,)e(if)e(y)o (our)g(system)f(supp)q(orts)h(sym)o(b)q(olic)h(links,)g(y)o(ou)f(can)g (use)g(the)g(`)p Ft(support/mkclone)p Fu(')75 1666 y(script)h(to)f (create)g(a)g(build)j(tree)d(whic)o(h)h(has)g(sym)o(b)q(olic)g(links)h (bac)o(k)f(to)e(eac)o(h)i(\014le)g(in)h(the)e(source)h(directory)l(.)75 1721 y(Here's)20 b(an)g(example)h(that)f(creates)g(a)g(build)i (directory)e(in)i(the)e(curren)o(t)g(directory)g(from)g(a)g(source)75 1776 y(directory)15 b(`)p Ft(/usr/gnu/src/bash-2.0)p Fu(':)195 1853 y Ft(bash)23 b(/usr/gnu/src/bash-2.0/suppor)o(t/mkclon)o (e)e(-s)j(/usr/gnu/src/bash-2.0)d(.)75 1934 y Fu(The)e Ft(mkclone)f Fu(script)i(requires)g(Bash,)g(so)e(y)o(ou)h(m)o(ust)g(ha) o(v)o(e)g(already)g(built)h(Bash)g(for)e(at)h(least)g(one)75 1989 y(arc)o(hitecture)d(b)q(efore)f(y)o(ou)g(can)g(create)g(build)i (directories)g(for)d(other)h(arc)o(hitectures.)75 2151 y Fs(10.4)32 b(Installation)24 b(Names)137 2261 y Fu(By)18 b(default,)h(`)p Ft(make)14 b(install)p Fu(')j(will)i(install)h(in)o (to)d(`)p Ft(/usr/local/bin)p Fu(',)f(`)p Ft(/usr/local/man)p Fu(',)f(etc.)75 2315 y(Y)l(ou)20 b(can)f(sp)q(ecify)i(an)e (installation)h(pre\014x)g(other)f(than)g(`)p Ft(/usr/local)p Fu(')e(b)o(y)j(giving)g Ft(configure)e Fu(the)75 2370 y(option)g(`)p Ft(--prefix=)p Fo(P)l(A)l(TH)5 b Fu(',)17 b(or)h(b)o(y)g(sp)q(ecifying)i(a)e(v)m(alue)h(for)f(the)g Ft(DESTDIR)f Fu(`)p Ft(make)p Fu(')g(v)m(ariable)i(when)75 2425 y(running)d(`)p Ft(make)f(install)p Fu('.)137 2506 y(Y)l(ou)36 b(can)g(sp)q(ecify)h(separate)e(installation)i(pre\014xes)f (for)f(arc)o(hitecture-sp)q(eci\014c)j(\014les)f(and)75 2560 y(arc)o(hitecture-indep)q(endent)18 b(\014les.)23 b(If)16 b(y)o(ou)f(giv)o(e)h Ft(configure)f Fu(the)h(option)g(`)p Ft(--exec-prefix=)p Fo(P)l(A)l(TH)5 b Fu(',)75 2615 y(`)p Ft(make)14 b(install)p Fu(')31 b(will)i(use)g Fo(P)l(A)l(TH)k Fu(as)31 b(the)h(pre\014x)h(for)e(installing)j(programs)d(and)h (libraries.)75 2670 y(Do)q(cumen)o(tation)15 b(and)g(other)g(data)g (\014les)h(will)h(still)f(use)g(the)f(regular)h(pre\014x.)p eop %%Page: 111 113 111 112 bop 75 -58 a Fu(Chapter)15 b(10:)k(Installing)e(Bash)1178 b(111)75 149 y Fs(10.5)32 b(Sp)r(ecifying)24 b(the)f(System)f(T)n(yp)r (e)137 243 y Fu(There)c(ma)o(y)f(b)q(e)i(some)e(features)h Ft(configure)e Fu(can)i(not)g(\014gure)g(out)f(automatically)l(,)i(but) f(need)h(to)75 298 y(determine)g(b)o(y)f(the)g(t)o(yp)q(e)h(of)e(host)h (Bash)g(will)i(run)e(on.)29 b(Usually)19 b Ft(configure)e Fu(can)h(\014gure)g(that)g(out,)75 353 y(but)f(if)g(it)f(prin)o(ts)h(a) f(message)g(sa)o(ying)g(it)h(can)g(not)f(guess)g(the)h(host)f(t)o(yp)q (e,)g(giv)o(e)h(it)g(the)f(`)p Ft(--host=TYPE)p Fu(')75 408 y(option.)j(`)p Ft(TYPE)p Fu(')11 b(can)i(either)g(b)q(e)g(a)g (short)e(name)i(for)f(the)g(system)g(t)o(yp)q(e,)h(suc)o(h)g(as)f(`)p Ft(sun4)p Fu(',)f(or)h(a)h(canonical)75 462 y(name)i(with)h(three)f (\014elds:)21 b(`)p Ft(CPU-COMPANY-SYSTEM)p Fu(')12 b(\(e.g.,)i(`)p Ft(i386-unknown-freebsd4)o(.2)p Fu('\))o(.)137 527 y(See)i(the)f (\014le)i(`)p Ft(support/config.sub)p Fu(')12 b(for)i(the)h(p)q (ossible)i(v)m(alues)g(of)d(eac)o(h)i(\014eld.)75 648 y Fs(10.6)32 b(Sharing)24 b(Defaults)137 742 y Fu(If)18 b(y)o(ou)f(w)o(an)o(t)g(to)g(set)g(default)i(v)m(alues)g(for)e Ft(configure)f Fu(scripts)i(to)f(share,)h(y)o(ou)f(can)h(create)f(a)h (site)75 797 y(shell)25 b(script)g(called)g Ft(config.site)d Fu(that)h(giv)o(es)h(default)h(v)m(alues)f(for)g(v)m(ariables)h(lik)o (e)g Ft(CC)p Fu(,)g Ft(cache_)75 851 y(file)p Fu(,)c(and)g Ft(prefix)p Fu(.)36 b Ft(configure)19 b Fu(lo)q(oks)i(for)g(`)p Ft(PREFIX/share/config.)o(site)p Fu(')c(if)k(it)h(exists,)g(then)75 906 y(`)p Ft(PREFIX/etc/config.site)p Fu(')9 b(if)k(it)g(exists.)20 b(Or,)13 b(y)o(ou)f(can)h(set)g(the)g Ft(CONFIG_SITE)e Fu(en)o(vironmen)o(t)i(v)m(ari-)75 961 y(able)20 b(to)g(the)f(lo)q (cation)i(of)e(the)h(site)g(script.)34 b(A)19 b(w)o(arning:)29 b(the)20 b(Bash)g Ft(configure)e Fu(lo)q(oks)i(for)f(a)h(site)75 1016 y(script,)15 b(but)h(not)e(all)j Ft(configure)c Fu(scripts)j(do.)75 1137 y Fs(10.7)32 b(Op)r(eration)23 b(Con)n(trols)137 1231 y Ft(configure)14 b Fu(recognizes)i(the)f(follo) o(wing)h(options)g(to)e(con)o(trol)h(ho)o(w)g(it)g(op)q(erates.)75 1305 y Ft(--cache-file=)p Fo(\014le)315 1360 y Fu(Use)j(and)f(sa)o(v)o (e)g(the)h(results)g(of)f(the)g(tests)g(in)h Fo(\014le)k Fu(instead)c(of)f(`)p Ft(./config.cache)p Fu('.)24 b(Set)315 1415 y Fo(\014le)19 b Fu(to)14 b(`)p Ft(/dev/null)p Fu(')g(to)g (disable)j(cac)o(hing,)e(for)g(debugging)h Ft(configure)p Fu(.)75 1489 y Ft(--help)96 b Fu(Prin)o(t)15 b(a)g(summary)g(of)f(the)i (options)f(to)g Ft(configure)p Fu(,)e(and)j(exit.)75 1564 y Ft(--quiet)75 1619 y(--silent)75 1674 y(-q)192 b Fu(Do)15 b(not)f(prin)o(t)i(messages)f(sa)o(ying)g(whic)o(h)h(c)o (hec)o(ks)f(are)g(b)q(eing)i(made.)75 1748 y Ft(--srcdir=)p Fo(dir)315 1803 y Fu(Lo)q(ok)f(for)g(the)g(Bash)g(source)g(co)q(de)g (in)h(directory)g Fo(dir)p Fu(.)23 b(Usually)17 b Ft(configure)e Fu(can)h(deter-)315 1858 y(mine)g(that)f(directory)g(automatically)l(.) 75 1932 y Ft(--version)315 1987 y Fu(Prin)o(t)g(the)g(v)o(ersion)g(of)f (Auto)q(conf)h(used)g(to)f(generate)h(the)g Ft(configure)e Fu(script,)i(and)g(exit.)137 2062 y Ft(configure)j Fu(also)g(accepts)h (some)f(other,)g(not)h(widely)h(used,)f(b)q(oilerplate)i(options.)30 b(`)p Ft(configure)75 2117 y(--help)p Fu(')14 b(prin)o(ts)h(the)h (complete)g(list.)75 2238 y Fs(10.8)32 b(Optional)24 b(F)-6 b(eatures)137 2331 y Fu(The)17 b(Bash)g Ft(configure)f Fu(has)h(a)g(n)o(um)o(b)q(er)g(of)f(`)p Ft(--enable-)p Fo(feature)s Fu(')f(options,)i(where)g Fo(feature)i Fu(indi-)75 2386 y(cates)g(an)h(optional)g(part)g(of)f(Bash.)33 b(There)20 b(are)g(also)g(sev)o(eral)f(`)p Ft(--with-)p Fo(pac)o(k)m(age)s Fu(')f(options,)j(where)75 2441 y Fo(pac)o(k)m(age)c Fu(is)d(something)h(lik)o(e)g(`)p Ft(bash-malloc)p Fu(')d(or)h(`)p Ft(purify)p Fu('.)18 b(T)l(o)c(turn)g(o\013)f(the)h(default)h(use)f(of) g(a)g(pac)o(k-)75 2496 y(age,)22 b(use)f(`)p Ft(--without-)p Fo(pac)o(k)m(age)s Fu('.)34 b(T)l(o)21 b(con\014gure)g(Bash)g(without)g (a)f(feature)h(that)f(is)i(enabled)g(b)o(y)75 2550 y(default,)15 b(use)h(`)p Ft(--disable-)p Fo(feature)s Fu('.)137 2615 y(Here)11 b(is)g(a)f(complete)h(list)h(of)e(the)g(`)p Ft(--enable-)p Fu(')e(and)j(`)p Ft(--with-)p Fu(')e(options)h(that)g (the)h(Bash)f Ft(configure)75 2670 y Fu(recognizes.)p eop %%Page: 112 114 112 113 bop 75 -58 a Fu(112)1262 b(Bash)15 b(Reference)h(Man)o(ual)75 149 y Ft(--with-afs)315 204 y Fu(De\014ne)g(if)f(y)o(ou)g(are)g(using)h (the)f(Andrew)h(File)g(System)f(from)g(T)l(ransarc.)75 291 y Ft(--with-bash-malloc)315 346 y Fu(Use)20 b(the)g(Bash)f(v)o (ersion)h(of)g Ft(malloc)e Fu(in)j(`)p Ft(lib/malloc/malloc.c)p Fu('.)30 b(This)20 b(is)h(not)e(the)315 401 y(same)e Ft(malloc)f Fu(that)g(app)q(ears)h(in)h Fp(gnu)f Fu(lib)q(c,)i(but)e (an)g(older)g(v)o(ersion)h(deriv)o(ed)g(from)e(the)315 456 y(4.2)21 b Fp(bsd)h Ft(malloc)p Fu(.)39 b(This)22 b Ft(malloc)f Fu(is)h(v)o(ery)g(fast,)g(but)g(w)o(astes)f(some)g(space) h(on)g(eac)o(h)315 510 y(allo)q(cation.)f(This)14 b(option)h(is)f (enabled)i(b)o(y)e(default.)20 b(The)15 b(`)p Ft(NOTES)p Fu(')d(\014le)j(con)o(tains)g(a)e(list)i(of)315 565 y(systems)d(for)g (whic)o(h)i(this)f(should)h(b)q(e)f(turned)g(o\013,)f(and)h Ft(configure)e Fu(disables)k(this)e(option)315 620 y(automatically)j (for)e(a)h(n)o(um)o(b)q(er)h(of)e(systems.)75 707 y Ft(--with-curses) 315 762 y Fu(Use)i(the)g(curses)h(library)g(instead)f(of)g(the)g (termcap)g(library)l(.)23 b(This)17 b(should)g(b)q(e)g(supplied)315 816 y(if)f(y)o(our)e(system)h(has)g(an)g(inadequate)h(or)f(incomplete)i (termcap)e(database.)75 903 y Ft(--with-gnu-malloc)315 958 y Fu(A)g(synon)o(ym)g(for)g Ft(--with-bash-malloc)p Fu(.)75 1045 y Ft(--with-installed-readline[)o(=)p Fo(PREF)o(IX)5 b Ft(])315 1100 y Fu(De\014ne)13 b(this)h(to)e(mak)o(e)g(Bash)h(link)h (with)f(a)g(lo)q(cally-installed)j(v)o(ersion)d(of)f(Readline)j(rather) 315 1155 y(than)k(the)h(v)o(ersion)f(in)h(`)p Ft(lib/readline)p Fu('.)30 b(This)20 b(w)o(orks)e(only)i(with)g(Readline)g(4.2)f(and)315 1210 y(later)14 b(v)o(ersions.)20 b(If)14 b Fo(PREFIX)k Fu(is)c Ft(yes)g Fu(or)f(not)h(supplied,)i Ft(configure)d Fu(uses)h(the)g(v)m(alues)h(of)315 1264 y(the)d(mak)o(e)g(v)m(ariables) h Ft(includedir)e Fu(and)i Ft(libdir)p Fu(,)e(whic)o(h)i(are)f(sub)q (directories)i(of)e Ft(prefix)315 1319 y Fu(b)o(y)k(default,)g(to)g (\014nd)g(the)g(installed)i(v)o(ersion)e(of)g(Readline)h(if)f(it)h(is)f (not)g(in)g(the)g(standard)315 1374 y(system)h(include)i(and)f(library) g(directories.)27 b(If)17 b Fo(PREFIX)22 b Fu(is)17 b Ft(no)p Fu(,)g(Bash)h(links)g(with)g(the)315 1429 y(v)o(ersion)h(in)g (`)p Ft(lib/readline)p Fu('.)28 b(If)19 b Fo(PREFIX)k Fu(is)c(set)f(to)g(an)o(y)h(other)f(v)m(alue,)i Ft(configure)315 1484 y Fu(treats)12 b(it)h(as)g(a)g(directory)g(pathname)g(and)h(lo)q (oks)f(for)f(the)i(installed)h(v)o(ersion)e(of)g(Readline)315 1538 y(in)18 b(sub)q(directories)h(of)d(that)h(directory)g(\(include)i (\014les)f(in)g Fo(PREFIX)5 b Fu(/)p Ft(include)15 b Fu(and)i(the)315 1593 y(library)f(in)g Fo(PREFIX)5 b Fu(/)p Ft(lib)p Fu(\).)75 1680 y Ft(--with-purify)315 1735 y Fu(De\014ne)12 b(this)g(to)f(use)h(the)f(Purify)h(memory)f(allo) q(cation)i(c)o(hec)o(k)o(er)f(from)e(Rational)i(Soft)o(w)o(are.)75 1822 y Ft(--enable-minimal-config)315 1877 y Fu(This)g(pro)q(duces)h(a) f(shell)h(with)f(minimal)h(features,)f(close)h(to)e(the)h(historical)h (Bourne)f(shell.)137 1967 y(There)h(are)e(sev)o(eral)i(`)p Ft(--enable-)p Fu(')d(options)i(that)f(alter)h(ho)o(w)g(Bash)g(is)h (compiled)g(and)g(link)o(ed,)h(rather)75 2022 y(than)h(c)o(hanging)h (run-time)g(features.)75 2113 y Ft(--enable-largefile)315 2167 y Fu(Enable)39 b(supp)q(ort)f(for)g(large)g(\014les)h(\()p Ft(http://www.sas.com/standa)o(rds/lar)o(ge_)315 2222 y(file/x_open.20Mar96.html)p Fu(\))10 b(if)15 b(the)f(op)q(erating)g (system)g(requires)h(sp)q(ecial)h(compiler)315 2277 y(options)f(to)g (build)i(programs)d(whic)o(h)i(can)f(access)h(large)f(\014les.)75 2364 y Ft(--enable-profiling)315 2419 y Fu(This)h(builds)i(a)e(Bash)f (binary)i(that)e(pro)q(duces)i(pro\014ling)g(information)f(to)f(b)q(e)h (pro)q(cessed)315 2473 y(b)o(y)f Ft(gprof)g Fu(eac)o(h)g(time)g(it)h (is)g(executed.)75 2560 y Ft(--enable-static-link)315 2615 y Fu(This)j(causes)g(Bash)g(to)f(b)q(e)i(link)o(ed)g(statically)l (,)g(if)f Ft(gcc)g Fu(is)g(b)q(eing)h(used.)31 b(This)20 b(could)f(b)q(e)315 2670 y(used)d(to)e(build)k(a)c(v)o(ersion)i(to)e (use)i(as)f(ro)q(ot's)f(shell.)p eop %%Page: 113 115 113 114 bop 75 -58 a Fu(Chapter)15 b(10:)k(Installing)e(Bash)1178 b(113)137 149 y(The)16 b(`)p Ft(minimal-config)p Fu(')c(option)k(can)f (b)q(e)h(used)g(to)f(disable)i(all)f(of)f(the)g(follo)o(wing)h (options,)f(but)h(it)75 204 y(is)g(pro)q(cessed)g(\014rst,)e(so)h (individual)j(options)e(ma)o(y)e(b)q(e)i(enabled)h(using)f(`)p Ft(enable-)p Fo(feature)s Fu('.)137 270 y(All)k(of)e(the)g(follo)o (wing)h(options)g(except)g(for)e(`)p Ft(disabled-builtins)p Fu(')e(and)k(`)p Ft(xpg-echo-default)p Fu(')75 325 y(are)13 b(enabled)h(b)o(y)f(default,)h(unless)g(the)f(op)q(erating)g(system)g (do)q(es)g(not)f(pro)o(vide)i(the)f(necessary)g(supp)q(ort.)75 401 y Ft(--enable-alias)315 456 y Fu(Allo)o(w)20 b(alias)h(expansion)g (and)f(include)i(the)e Ft(alias)f Fu(and)h Ft(unalias)f Fu(builtins)j(\(see)e(Sec-)315 511 y(tion)15 b(6.6)g([Aliases],)g(page) g(67\).)75 588 y Ft(--enable-arith-for-command)315 643 y Fu(Include)k(supp)q(ort)f(for)e(the)i(alternate)f(form)f(of)h(the)g Ft(for)g Fu(command)g(that)f(b)q(eha)o(v)o(es)i(lik)o(e)315 697 y(the)c(C)f(language)h Ft(for)g Fu(statemen)o(t)e(\(see)i(Section)g (3.2.4)f([Lo)q(oping)h(Constructs],)e(page)i(9\).)75 774 y Ft(--enable-array-variables)315 829 y Fu(Include)19 b(supp)q(ort)d(for)g(one-dimensional)j(arra)o(y)d(shell)i(v)m(ariables) g(\(see)e(Section)i(6.7)d([Ar-)315 884 y(ra)o(ys],)f(page)h(68\).)75 960 y Ft(--enable-bang-history)315 1015 y Fu(Include)20 b(supp)q(ort)f(for)e Ft(csh)p Fu(-lik)o(e)j(history)e(substitution)h (\(see)f(Section)h(9.3)f([History)f(In-)315 1070 y(teraction],)d(page)h (105\).)75 1147 y Ft(--enable-brace-expansion)315 1201 y Fu(Include)22 b Ft(csh)p Fu(-lik)o(e)f(brace)g(expansion)g(\()e Ft(b{a,b}c)1223 1199 y Fr(7!)1288 1201 y Ft(bac)c(bbc)k Fu(\).)35 b(See)21 b(Section)g(3.5.1)315 1256 y([Brace)15 b(Expansion],)g(page)g(15,)f(for)h(a)g(complete)h(description.)75 1333 y Ft(--enable-command-timing)315 1388 y Fu(Include)24 b(supp)q(ort)e(for)f(recognizing)i Ft(time)e Fu(as)h(a)f(reserv)o(ed)h (w)o(ord)f(and)h(for)f(displa)o(ying)315 1443 y(timing)e(statistics)f (for)f(the)i(pip)q(eline)i(follo)o(wing)e Ft(time)f Fu(\(see)g(Section) h(3.2.2)d([Pip)q(elines],)315 1497 y(page)c(8\).)18 b(This)12 b(allo)o(ws)g(pip)q(elines)j(as)c(w)o(ell)i(as)e(shell)i(builtins)h (and)e(functions)g(to)f(b)q(e)i(timed.)75 1574 y Ft (--enable-cond-command)315 1629 y Fu(Include)i(supp)q(ort)e(for)f(the)g Ft([[)h Fu(conditional)h(command)f(\(see)f(Section)i(3.2.5)d ([Conditional)315 1684 y(Constructs],)j(page)h(10\).)75 1760 y Ft(--enable-directory-stack)315 1815 y Fu(Include)k(supp)q(ort)e (for)g(a)g Ft(csh)p Fu(-lik)o(e)g(directory)h(stac)o(k)e(and)h(the)g Ft(pushd)p Fu(,)g Ft(popd)p Fu(,)f(and)i Ft(dirs)315 1870 y Fu(builtins)f(\(see)f(Section)g(6.8)e([The)h(Directory)g(Stac)o (k],)f(page)h(69\).)75 1947 y Ft(--enable-disabled-builtins)315 2001 y Fu(Allo)o(w)20 b(builtin)h(commands)e(to)g(b)q(e)h(in)o(v)o(ok)o (ed)f(via)h(`)p Ft(builtin)14 b(xxx)p Fu(')k(ev)o(en)i(after)e Ft(xxx)h Fu(has)315 2056 y(b)q(een)e(disabled)g(using)g(`)p Ft(enable)d(-n)h(xxx)p Fu('.)20 b(See)c(Section)h(4.2)e([Bash)g (Builtins],)i(page)f(36,)315 2111 y(for)f(details)h(of)f(the)g Ft(builtin)f Fu(and)h Ft(enable)g Fu(builtin)i(commands.)75 2188 y Ft(--enable-dparen-arithmetic)315 2243 y Fu(Include)e(supp)q (ort)f(for)e(the)h Ft(\(\(...\)\))f Fu(command)h(\(see)g(Section)h (3.2.5)e([Conditional)i(Con-)315 2297 y(structs],)g(page)h(10\).)75 2374 y Ft(--enable-extended-glob)315 2429 y Fu(Include)22 b(supp)q(ort)f(for)e(the)h(extended)i(pattern)d(matc)o(hing)h(features) g(describ)q(ed)i(ab)q(o)o(v)o(e)315 2484 y(under)16 b(Section)g (3.5.8.1)d([P)o(attern)h(Matc)o(hing],)g(page)h(21.)75 2560 y Ft(--enable-help-builtin)315 2615 y Fu(Include)g(the)d Ft(help)g Fu(builtin,)j(whic)o(h)e(displa)o(ys)g(help)h(on)e(shell)i (builtins)h(and)d(v)m(ariables)i(\(see)315 2670 y(Section)i(4.2)e ([Bash)h(Builtins],)i(page)e(36\).)p eop %%Page: 114 116 114 115 bop 75 -58 a Fu(114)1262 b(Bash)15 b(Reference)h(Man)o(ual)75 149 y Ft(--enable-history)315 204 y Fu(Include)h(command)e(history)f (and)h(the)g Ft(fc)g Fu(and)g Ft(history)f Fu(builtin)j(commands)d (\(see)h(Sec-)315 259 y(tion)g(9.1)g([Bash)g(History)g(F)l(acilities],) h(page)f(103\).)75 339 y Ft(--enable-job-control)315 394 y Fu(This)h(enables)g(the)f(job)g(con)o(trol)g(features)f(\(see)i (Chapter)e(7)h([Job)g(Con)o(trol],)f(page)h(75\),)e(if)315 448 y(the)i(op)q(erating)h(system)e(supp)q(orts)i(them.)75 528 y Ft(--enable-net-redirections)315 583 y Fu(This)f(enables)g(the)f (sp)q(ecial)i(handling)f(of)f(\014lenames)h(of)f(the)g(form)f Ft(/dev/tcp/)p Fo(host)q Ft(/)p Fo(p)q(ort)315 638 y Fu(and)18 b Ft(/dev/udp/)p Fo(host)q Ft(/)p Fo(p)q(ort)f Fu(when)i(used)f(in)h(redirections)g(\(see)f(Section)h(3.6)e([Redirec-) 315 692 y(tions],)e(page)g(22\).)75 772 y Ft (--enable-process-substitut)o(ion)315 827 y Fu(This)26 b(enables)g(pro)q(cess)f(substitution)h(\(see)f(Section)h(3.5.6)e([Pro) q(cess)h(Substitution],)315 882 y(page)15 b(20\))f(if)i(the)f(op)q (erating)h(system)e(pro)o(vides)i(the)f(necessary)h(supp)q(ort.)75 961 y Ft(--enable-prompt-string-dec)o(oding)315 1016 y Fu(T)l(urn)24 b(on)g(the)f(in)o(terpretation)h(of)f(a)h(n)o(um)o(b)q (er)g(of)f(bac)o(kslash-escap)q(ed)i(c)o(haracters)e(in)315 1071 y(the)c Ft($PS1)p Fu(,)h Ft($PS2)p Fu(,)f Ft($PS3)p Fu(,)g(and)g Ft($PS4)g Fu(prompt)g(strings.)32 b(See)19 b(Section)i(6.9)d([Prin)o(ting)h(a)315 1126 y(Prompt],)14 b(page)h(70,)f(for)h(a)f(complete)i(list)g(of)f(prompt)g(string)g (escap)q(e)h(sequences.)75 1205 y Ft(--enable-progcomp)315 1260 y Fu(Enable)f(the)f(programmable)g(completion)h(facilities)h (\(see)e(Section)h(8.6)e([Programmable)315 1315 y(Completion],)i(page)g (98\).)k(If)d(Readline)g(is)g(not)f(enabled,)h(this)g(option)f(has)g (no)g(e\013ect.)75 1395 y Ft(--enable-readline)315 1450 y Fu(Include)h(supp)q(ort)f(for)e(command-line)j(editing)g(and)e (history)h(with)f(the)h(Bash)f(v)o(ersion)g(of)315 1504 y(the)h(Readline)i(library)f(\(see)f(Chapter)g(8)g([Command)f(Line)j (Editing],)e(page)g(79\).)75 1584 y Ft(--enable-restricted)315 1639 y Fu(Include)23 b(supp)q(ort)e(for)f(a)h Fo(restricted)g(shell)p Fu(.)39 b(If)21 b(this)g(is)h(enabled,)h(Bash,)f(when)f(called)315 1694 y(as)f Ft(rbash)p Fu(,)f(en)o(ters)h(a)g(restricted)g(mo)q(de.)34 b(See)21 b(Section)f(6.10)f([The)h(Restricted)g(Shell],)315 1748 y(page)15 b(71,)f(for)h(a)g(description)h(of)f(restricted)h(mo)q (de.)75 1828 y Ft(--enable-select)315 1883 y Fu(Include)k(the)e Ft(select)e Fu(builtin,)21 b(whic)o(h)d(allo)o(ws)g(the)g(generation)g (of)f(simple)i(men)o(us)f(\(see)315 1938 y(Section)e(3.2.5)e ([Conditional)i(Constructs],)d(page)j(10\).)75 2017 y Ft(--enable-usg-echo-default)315 2072 y Fu(A)f(synon)o(ym)g(for)g Ft(--enable-xpg-echo-defaul)o(t)p Fu(.)75 2152 y Ft (--enable-xpg-echo-default)315 2207 y Fu(Mak)o(e)d(the)g Ft(echo)g Fu(builtin)i(expand)f(bac)o(kslash-escap)q(ed)h(c)o (haracters)e(b)o(y)g(default,)h(without)315 2262 y(requiring)22 b(the)e(`)p Ft(-e)p Fu(')g(option.)36 b(This)21 b(sets)g(the)f(default) h(v)m(alue)h(of)e(the)h Ft(xpg_echo)e Fu(shell)315 2316 y(option)13 b(to)f Ft(on)p Fu(,)h(whic)o(h)g(mak)o(es)g(the)f(Bash)h Ft(echo)g Fu(b)q(eha)o(v)o(e)g(more)f(lik)o(e)i(the)f(v)o(ersion)g(sp)q (eci\014ed)315 2371 y(in)22 b(the)f(Single)h(Unix)g(Sp)q (eci\014cation,)i(v)o(ersion)d(2.)36 b(See)22 b(Section)f(4.2)f([Bash)h (Builtins],)315 2426 y(page)15 b(36,)f(for)h(a)g(description)h(of)f (the)g(escap)q(e)h(sequences)h(that)d Ft(echo)h Fu(recognizes.)137 2506 y(The)e(\014le)g(`)p Ft(config-top.h)p Fu(')d(con)o(tains)i(C)g (Prepro)q(cessor)g(`)p Ft(#define)p Fu(')e(statemen)o(ts)h(for)h (options)g(whic)o(h)75 2560 y(are)17 b(not)g(settable)h(from)e Ft(configure)p Fu(.)26 b(Some)17 b(of)g(these)h(are)f(not)g(mean)o(t)g (to)f(b)q(e)j(c)o(hanged;)f(b)q(ew)o(are)f(of)75 2615 y(the)h(consequences)h(if)f(y)o(ou)f(do.)28 b(Read)17 b(the)h(commen)o(ts)f(asso)q(ciated)h(with)g(eac)o(h)g(de\014nition)h (for)e(more)75 2670 y(information)e(ab)q(out)g(its)h(e\013ect.)p eop %%Page: 115 117 115 116 bop 75 -58 a Fu(App)q(endix)17 b(A:)e(Rep)q(orting)g(Bugs)1150 b(115)75 149 y Fq(App)r(endix)25 b(A)41 b(Rep)r(orting)27 b(Bugs)137 267 y Fu(Please)15 b(rep)q(ort)f(all)i(bugs)f(y)o(ou)f (\014nd)h(in)g(Bash.)20 b(But)14 b(\014rst,)g(y)o(ou)g(should)i(mak)o (e)e(sure)h(that)e(it)i(really)g(is)75 321 y(a)g(bug,)g(and)g(that)g (it)g(app)q(ears)h(in)g(the)f(latest)g(v)o(ersion)g(of)g(Bash)g(that)g (y)o(ou)g(ha)o(v)o(e.)137 389 y(Once)22 b(y)o(ou)e(ha)o(v)o(e)g (determined)i(that)e(a)g(bug)h(actually)g(exists,)h(use)f(the)g Ft(bashbug)e Fu(command)i(to)75 443 y(submit)14 b(a)e(bug)h(rep)q(ort.) 19 b(If)13 b(y)o(ou)g(ha)o(v)o(e)f(a)h(\014x,)g(y)o(ou)g(are)g (encouraged)g(to)f(mail)i(that)e(as)h(w)o(ell!)20 b(Suggestions)75 498 y(and)11 b(`philosophical')h(bug)f(rep)q(orts)f(ma)o(y)g(b)q(e)h (mailed)h(to)e Ft(bug-bash@gnu.org)e Fu(or)i(p)q(osted)h(to)f(the)h (Usenet)75 553 y(newsgroup)k Ft(gnu.bash.bug)p Fu(.)137 620 y(All)i(bug)e(rep)q(orts)g(should)h(include:)112 687 y Fr(\017)30 b Fu(The)15 b(v)o(ersion)h(n)o(um)o(b)q(er)f(of)g (Bash.)112 755 y Fr(\017)30 b Fu(The)15 b(hardw)o(are)g(and)g(op)q (erating)h(system.)112 822 y Fr(\017)30 b Fu(The)15 b(compiler)i(used)f (to)e(compile)j(Bash.)112 889 y Fr(\017)30 b Fu(A)15 b(description)i(of)e(the)g(bug)g(b)q(eha)o(viour.)112 956 y Fr(\017)30 b Fu(A)15 b(short)g(script)g(or)g(`recip)q(e')h(whic)o (h)g(exercises)g(the)g(bug)f(and)g(ma)o(y)g(b)q(e)h(used)g(to)e(repro)q (duce)i(it.)75 1036 y Ft(bashbug)d Fu(inserts)i(the)f(\014rst)g(three)g (items)h(automatically)f(in)o(to)g(the)h(template)f(it)g(pro)o(vides)h (for)f(\014ling)h(a)75 1091 y(bug)g(rep)q(ort.)137 1158 y(Please)h(send)g(all)g(rep)q(orts)f(concerning)h(this)g(man)o(ual)f (to)g Ft(chet@po.CWRU.Edu)p Fu(.)p eop %%Page: 116 118 116 117 bop 75 -58 a Fu(116)1262 b(Bash)15 b(Reference)h(Man)o(ual)p eop %%Page: 117 119 117 118 bop 75 -58 a Fu(App)q(endix)17 b(B:)e(Ma)s(jor)f(Di\013erences) i(F)l(rom)e(The)h(Bourne)h(Shell)631 b(117)75 71 y Fq(App)r(endix)28 b(B)41 b(Ma)t(jor)27 b(Di\013erences)e(F)-7 b(rom)28 b(The)e(Bourne)544 149 y(Shell)137 277 y Fu(Bash)13 b(implemen)o(ts)h (essen)o(tially)g(the)e(same)h(grammar,)e(parameter)h(and)g(v)m (ariable)i(expansion,)g(redi-)75 332 y(rection,)g(and)g(quoting)f(as)g (the)h(Bourne)g(Shell.)21 b(Bash)13 b(uses)h(the)g Fp(posix)f Fu(1003.2)e(standard)i(as)g(the)h(sp)q(ec-)75 387 y(i\014cation)j(of)e (ho)o(w)h(these)g(features)f(are)h(to)f(b)q(e)h(implemen)o(ted.)24 b(There)16 b(are)f(some)h(di\013erences)h(b)q(et)o(w)o(een)75 442 y(the)f(traditional)g(Bourne)g(shell)i(and)e(Bash;)f(this)i (section)f(quic)o(kly)h(details)g(the)f(di\013erences)g(of)g(signif-)75 496 y(icance.)26 b(A)17 b(n)o(um)o(b)q(er)g(of)g(these)g(di\013erences) h(are)e(explained)j(in)f(greater)e(depth)h(in)h(previous)g(sections.)75 551 y(This)e(section)g(uses)f(the)g(v)o(ersion)h(of)e Ft(sh)h Fu(included)j(in)e(SVR4.2)e(as)h(the)g(baseline)i(reference.) 112 622 y Fr(\017)30 b Fu(Bash)16 b(is)h Fp(posix)p Fu(-conforman)o(t,) e(ev)o(en)h(where)g(the)h Fp(posix)e Fu(sp)q(eci\014cation)j(di\013ers) f(from)e(traditional)165 677 y Ft(sh)g Fu(b)q(eha)o(vior)h(\(see)f (Section)h(6.11)e([Bash)h(POSIX)h(Mo)q(de],)e(page)h(72\).)112 746 y Fr(\017)30 b Fu(Bash)13 b(has)g(m)o(ulti-c)o(haracter)g(in)o(v)o (o)q(cation)h(options)f(\(see)g(Section)h(6.1)e([In)o(v)o(oking)h (Bash],)f(page)h(59\).)112 815 y Fr(\017)30 b Fu(Bash)14 b(has)g(command-line)i(editing)f(\(see)f(Chapter)g(8)g([Command)f(Line) i(Editing],)g(page)f(79\))f(and)165 870 y(the)i Ft(bind)g Fu(builtin.)112 939 y Fr(\017)30 b Fu(Bash)23 b(pro)o(vides)g(a)g (programmable)f(w)o(ord)h(completion)h(mec)o(hanism)f(\(see)g(Section)h (8.6)e([Pro-)165 993 y(grammable)12 b(Completion],)h(page)g(98\),)f (and)g(t)o(w)o(o)g(builtin)j(commands,)d Ft(complete)g Fu(and)g Ft(compgen)p Fu(,)165 1048 y(to)j(manipulate)h(it.)112 1117 y Fr(\017)30 b Fu(Bash)13 b(has)g(command)f(history)h(\(see)g (Section)h(9.1)e([Bash)g(History)h(F)l(acilities],)h(page)f(103\))f (and)h(the)165 1172 y Ft(history)h Fu(and)i Ft(fc)e Fu(builtins)k(to)c (manipulate)j(it.)112 1241 y Fr(\017)30 b Fu(Bash)24 b(implemen)o(ts)i Ft(csh)p Fu(-lik)o(e)f(history)f(expansion)h(\(see)f (Section)h(9.3)e([History)g(In)o(teraction],)165 1296 y(page)15 b(105\).)112 1365 y Fr(\017)30 b Fu(Bash)17 b(has)f(one-dimensional)j(arra)o(y)c(v)m(ariables)j(\(see)e(Section)i (6.7)d([Arra)o(ys],)g(page)i(68\),)e(and)i(the)165 1420 y(appropriate)j(v)m(ariable)h(expansions)f(and)g(assignmen)o(t)g(syn)o (tax)e(to)h(use)h(them.)34 b(Sev)o(eral)20 b(of)f(the)165 1474 y(Bash)d(builtins)i(tak)o(e)d(options)h(to)g(act)f(on)h(arra)o (ys.)21 b(Bash)16 b(pro)o(vides)g(a)g(n)o(um)o(b)q(er)g(of)g(built-in)i (arra)o(y)165 1529 y(v)m(ariables.)112 1598 y Fr(\017)30 b Fu(The)19 b Ft($'...)o(')f Fu(quoting)h(syn)o(tax,)f(whic)o(h)i (expands)f(ANSI-C)g(bac)o(kslash-escap)q(ed)h(c)o(haracters)e(in)165 1653 y(the)13 b(text)g(b)q(et)o(w)o(een)g(the)g(single)i(quotes,)e(is)g (supp)q(orted)h(\(see)f(Section)h(3.1.2.4)d([ANSI-C)i(Quoting],)165 1708 y(page)i(6\).)112 1777 y Fr(\017)30 b Fu(Bash)k(supp)q(orts)h(the) f Ft($"...")g Fu(quoting)g(syn)o(tax)g(to)g(do)g(lo)q(cale-sp)q (eci\014c)k(translation)c(of)165 1832 y(the)f(c)o(haracters)e(b)q(et)o (w)o(een)i(the)g(double)h(quotes.)72 b(The)32 b(`)p Ft(-D)p Fu(',)k(`)p Ft(--dump-strings)p Fu(',)e(and)165 1886 y(`)p Ft(--dump-po-strings)p Fu(')12 b(in)o(v)o(o)q(cation)k(options)g (list)g(the)g(translatable)g(strings)f(found)h(in)g(a)g(script)165 1941 y(\(see)f(Section)h(3.1.2.5)d([Lo)q(cale)j(T)l(ranslation],)f (page)g(7\).)112 2010 y Fr(\017)30 b Fu(Bash)22 b(implemen)o(ts)h(the)f Ft(!)f Fu(k)o(eyw)o(ord)g(to)g(negate)h(the)g(return)g(v)m(alue)h(of)e (a)g(pip)q(elin)q(e)j(\(see)e(Sec-)165 2065 y(tion)17 b(3.2.2)e([Pip)q(elines],)j(page)e(8\).)23 b(V)l(ery)17 b(useful)h(when)f(an)f Ft(if)g Fu(statemen)o(t)f(needs)j(to)d(act)h (only)h(if)165 2120 y(a)e(test)g(fails.)112 2189 y Fr(\017)30 b Fu(Bash)17 b(has)g(the)g Ft(time)g Fu(reserv)o(ed)g(w)o(ord)f(and)h (command)g(timing)h(\(see)f(Section)h(3.2.2)d([Pip)q(elines],)165 2244 y(page)i(8\).)25 b(The)17 b(displa)o(y)h(of)e(the)h(timing)h (statistics)f(ma)o(y)f(b)q(e)i(con)o(trolled)g(with)f(the)g Ft(TIMEFORMAT)165 2299 y Fu(v)m(ariable.)112 2368 y Fr(\017)30 b Fu(Bash)15 b(implemen)o(ts)g(the)g Ft(for)f(\(\()h Fo(expr1)k Ft(;)c Fo(expr2)k Ft(;)c Fo(expr3)k Ft(\)\))14 b Fu(arithmetic)h(for)f(command,)g(simi-)165 2422 y(lar)h(to)g(the)g(C) g(language)h(\(see)f(Section)h(3.2.4)d([Lo)q(oping)j(Constructs],)e (page)h(9\).)112 2491 y Fr(\017)30 b Fu(Bash)15 b(includes)j(the)d Ft(select)g Fu(comp)q(ound)h(command,)e(whic)o(h)i(allo)o(ws)g(the)f (generation)h(of)e(simple)165 2546 y(men)o(us)h(\(see)h(Section)g (3.2.5)d([Conditional)j(Constructs],)e(page)h(10\).)112 2615 y Fr(\017)30 b Fu(Bash)13 b(includes)j(the)d Ft([[)g Fu(comp)q(ound)h(command,)f(whic)o(h)h(mak)o(es)e(conditional)j (testing)f(part)e(of)h(the)165 2670 y(shell)k(grammar)c(\(see)j (Section)g(3.2.5)d([Conditional)j(Constructs],)e(page)h(10\).)p eop %%Page: 118 120 118 119 bop 75 -58 a Fu(118)1262 b(Bash)15 b(Reference)h(Man)o(ual)112 149 y Fr(\017)30 b Fu(Bash)14 b(includes)i(brace)d(expansion)i(\(see)f (Section)g(3.5.1)e([Brace)i(Expansion],)g(page)f(15\))g(and)h(tilde)165 204 y(expansion)i(\(see)f(Section)h(3.5.2)e([Tilde)i(Expansion],)f (page)g(16\).)112 269 y Fr(\017)30 b Fu(Bash)12 b(implemen)o(ts)h (command)f(aliases)h(and)f(the)g Ft(alias)g Fu(and)g Ft(unalias)f Fu(builtins)j(\(see)e(Section)h(6.6)165 323 y([Aliases],)i(page)g(67\).)112 388 y Fr(\017)30 b Fu(Bash)16 b(pro)o(vides)g(shell)h(arithmetic,)g(the)e Ft(\(\()h Fu(comp)q(ound)g(command)g(\(see)g(Section)g(3.2.5)f([Condi-) 165 443 y(tional)k(Constructs],)f(page)h(10\),)f(and)h(arithmetic)g (expansion)g(\(see)g(Section)h(6.5)d([Shell)j(Arith-)165 498 y(metic],)15 b(page)g(66\).)112 562 y Fr(\017)30 b Fu(V)l(ariables)16 b(presen)o(t)e(in)i(the)f(shell's)g(initial)i(en)o (vironmen)o(t)e(are)f(automatically)h(exp)q(orted)g(to)f(c)o(hild)165 617 y(pro)q(cesses.)19 b(The)12 b(Bourne)g(shell)h(do)q(es)f(not)f (normally)h(do)g(this)g(unless)g(the)g(v)m(ariables)h(are)e(explicitly) 165 672 y(mark)o(ed)k(using)h(the)f Ft(export)f Fu(command.)112 736 y Fr(\017)30 b Fu(Bash)18 b(includes)i(the)e Fp(posix)g Fu(pattern)g(remo)o(v)m(al)g(`)p Ft(\045)p Fu(',)f(`)p Ft(#)p Fu(',)g(`)p Ft(\045\045)p Fu(')g(and)i(`)p Ft(##)p Fu(')e(expansions)h(to)g(remo)o(v)o(e)165 791 y(leading)g(or)f (trailing)h(substrings)f(from)g(v)m(ariable)h(v)m(alues)g(\(see)f (Section)h(3.5.3)e([Shell)i(P)o(arameter)165 846 y(Expansion],)d(page)g (17\).)112 910 y Fr(\017)30 b Fu(The)23 b(expansion)i Ft(${#xx})p Fu(,)e(whic)o(h)i(returns)e(the)g(length)h(of)e Ft(${xx})p Fu(,)j(is)e(supp)q(orted)h(\(see)f(Sec-)165 965 y(tion)15 b(3.5.3)f([Shell)j(P)o(arameter)d(Expansion],)h(page)g (17\).)112 1029 y Fr(\017)30 b Fu(The)16 b(expansion)g Ft(${var:)p Fo(o\013set)q Ft([:)p Fo(length)p Ft(]})p Fu(,)d(whic)o(h)j(expands)g(to)f(the)g(substring)h(of)e Ft(var)p Fu('s)h(v)m(alue)165 1084 y(of)21 b(length)h Fo(length)p Fu(,)h(b)q(eginning)h(at)d Fo(o\013set)p Fu(,)g(is)h(presen)o(t)g(\(see)f(Section)i(3.5.3)c([Shell)k(P)o (arameter)165 1139 y(Expansion],)15 b(page)g(17\).)112 1203 y Fr(\017)30 b Fu(The)11 b(expansion)g Ft(${var/[/])p Fo(pattern)p Ft([/)p Fo(replacemen)o(t)q Ft(]})p Fu(,)f(whic)o(h)h (matc)o(hes)f Fo(pattern)g Fu(and)h(replaces)165 1258 y(it)j(with)h Fo(replacemen)o(t)h Fu(in)e(the)h(v)m(alue)g(of)e Ft(var)p Fu(,)h(is)h(a)o(v)m(ailable)g(\(see)f(Section)h(3.5.3)e ([Shell)i(P)o(arameter)165 1313 y(Expansion],)g(page)g(17\).)112 1377 y Fr(\017)30 b Fu(The)19 b(expansion)h Ft(${!)p Fo(pre\014x)p Ft(})p Fo(*)i Fu(expansion,)e(whic)o(h)g(expands)g(to)e (the)h(names)g(of)f(all)i(shell)g(v)m(ari-)165 1432 y(ables)f(whose)f (names)g(b)q(egin)h(with)f Fo(pre\014x)p Fu(,)h(is)g(a)o(v)m(ailable)g (\(see)f(Section)h(3.5.3)e([Shell)i(P)o(arameter)165 1487 y(Expansion],)c(page)g(17\).)112 1552 y Fr(\017)30 b Fu(Bash)11 b(has)g Fo(indirect)i Fu(v)m(ariable)f(expansion)g(using)g Ft(${!word})d Fu(\(see)i(Section)h(3.5.3)d([Shell)j(P)o(arameter)165 1606 y(Expansion],)j(page)g(17\).)112 1671 y Fr(\017)30 b Fu(Bash)15 b(can)h(expand)f(p)q(ositional)i(parameters)d(b)q(ey)o (ond)i Ft($9)f Fu(using)h Ft(${)p Fo(n)o(um)p Ft(})p Fu(.)112 1735 y Fr(\017)30 b Fu(The)14 b Fp(posix)g Ft($\(\))f Fu(form)g(of)h(command)f(substitution)i(is)f(implemen)o(ted)i(\(see)e (Section)h(3.5.4)d([Com-)165 1790 y(mand)20 b(Substitution],)h(page)e (19\),)h(and)g(preferred)g(to)f(the)g(Bourne)i(shell's)f Ft(``)g Fu(\(whic)o(h)g(is)g(also)165 1845 y(implemen)o(ted)d(for)e (bac)o(kw)o(ards)f(compatibilit)o(y\).)112 1909 y Fr(\017)30 b Fu(Bash)15 b(has)g(pro)q(cess)h(substitution)g(\(see)f(Section)h (3.5.6)e([Pro)q(cess)g(Substitution],)i(page)f(20\).)112 1974 y Fr(\017)30 b Fu(Bash)e(automatically)g(assigns)f(v)m(ariables)i (that)e(pro)o(vide)h(information)g(ab)q(out)f(the)h(curren)o(t)165 2029 y(user)20 b(\()p Ft(UID)p Fu(,)h Ft(EUID)p Fu(,)f(and)g Ft(GROUPS)p Fu(\),)g(the)g(curren)o(t)g(host)g(\()p Ft(HOSTTYPE)p Fu(,)g Ft(OSTYPE)p Fu(,)g Ft(MACHTYPE)p Fu(,)g(and)165 2083 y Ft(HOSTNAME)p Fu(\),)26 b(and)g(the)g(instance)h(of)e(Bash)h (that)f(is)h(running)h(\()p Ft(BASH)p Fu(,)g Ft(BASH_VERSION)p Fu(,)f(and)165 2138 y Ft(BASH_VERSINFO)p Fu(\).)18 b(See)e(Section)g (5.2)e([Bash)h(V)l(ariables],)g(page)g(51,)g(for)f(details.)112 2203 y Fr(\017)30 b Fu(The)22 b Ft(IFS)g Fu(v)m(ariable)h(is)g(used)f (to)g(split)h(only)g(the)f(results)g(of)g(expansion,)i(not)e(all)h(w)o (ords)e(\(see)165 2257 y(Section)15 b(3.5.7)e([W)l(ord)g(Splitting],)i (page)f(20\).)19 b(This)c(closes)g(a)e(longstanding)i(shell)h(securit)o (y)f(hole.)112 2322 y Fr(\017)30 b Fu(Bash)17 b(implemen)o(ts)g(the)g (full)h(set)e(of)g Fp(posix)h Fu(1003.2)d(\014lename)k(expansion)g(op)q (erators,)d(including)165 2377 y Fo(c)o(haracter)10 b(classes)p Fu(,)i Fo(equiv)m(alence)h(classes)p Fu(,)f(and)e Fo(collating)i(sym)o (b)q(ols)h Fu(\(see)e(Section)g(3.5.8)e([Filename)165 2431 y(Expansion],)15 b(page)g(20\).)112 2496 y Fr(\017)30 b Fu(Bash)17 b(implemen)o(ts)i(extended)f(pattern)f(matc)o(hing)h (features)f(when)h(the)f Ft(extglob)g Fu(shell)i(option)165 2551 y(is)d(enabled)g(\(see)g(Section)g(3.5.8.1)d([P)o(attern)g(Matc)o (hing],)i(page)g(21\).)112 2615 y Fr(\017)30 b Fu(It)11 b(is)h(p)q(ossible)g(to)f(ha)o(v)o(e)f(a)h(v)m(ariable)i(and)e(a)g (function)g(with)h(the)f(same)g(name;)h Ft(sh)e Fu(do)q(es)i(not)e (separate)165 2670 y(the)15 b(t)o(w)o(o)f(name)h(spaces.)p eop %%Page: 119 121 119 120 bop 75 -58 a Fu(App)q(endix)17 b(B:)e(Ma)s(jor)f(Di\013erences) i(F)l(rom)e(The)h(Bourne)h(Shell)631 b(119)112 149 y Fr(\017)30 b Fu(Bash)15 b(functions)g(are)g(p)q(ermitted)g(to)f(ha)o(v) o(e)g(lo)q(cal)i(v)m(ariables)g(using)g(the)f Ft(local)f Fu(builtin,)i(and)f(th)o(us)165 204 y(useful)h(recursiv)o(e)g (functions)g(ma)o(y)f(b)q(e)h(written)f(\(see)g(Section)h(4.2)e([Bash)h (Builtins],)i(page)e(36\).)112 269 y Fr(\017)30 b Fu(V)l(ariable)13 b(assignmen)o(ts)f(preceding)h(commands)f(a\013ect)f(only)h(that)f (command,)i(ev)o(en)f(builtins)i(and)165 323 y(functions)19 b(\(see)f(Section)h(3.7.4)e([En)o(vironmen)o(t],)h(page)g(27\).)27 b(In)19 b Ft(sh)p Fu(,)f(all)i(v)m(ariable)f(assignmen)o(ts)165 378 y(preceding)e(commands)e(are)g(global)g(unless)i(the)e(command)g (is)h(executed)g(from)e(the)i(\014le)g(system.)112 443 y Fr(\017)30 b Fu(Bash)22 b(p)q(erforms)f(\014lename)i(expansion)g(on)f (\014lenames)h(sp)q(eci\014ed)h(as)d(op)q(erands)i(to)e(input)i(and)165 498 y(output)15 b(redirection)i(op)q(erators)d(\(see)h(Section)h(3.6)e ([Redirections],)h(page)g(22\).)112 562 y Fr(\017)30 b Fu(Bash)14 b(con)o(tains)h(the)f(`)p Ft(<>)p Fu(')g(redirection)h(op) q(erator,)f(allo)o(wing)h(a)f(\014le)h(to)f(b)q(e)h(op)q(ened)h(for)d (b)q(oth)i(read-)165 617 y(ing)j(and)f(writing,)i(and)e(the)h(`)p Ft(&>)p Fu(')e(redirection)j(op)q(erator,)d(for)h(directing)i(standard) e(output)g(and)165 672 y(standard)e(error)f(to)h(the)g(same)g(\014le)h (\(see)f(Section)h(3.6)f([Redirections],)g(page)g(22\).)112 736 y Fr(\017)30 b Fu(Bash)12 b(treats)g(a)g(n)o(um)o(b)q(er)h(of)e (\014lenames)j(sp)q(ecially)h(when)e(they)f(are)g(used)h(in)g (redirection)h(op)q(erators)165 791 y(\(see)h(Section)h(3.6)e ([Redirections],)h(page)h(22\).)112 855 y Fr(\017)30 b Fu(Bash)16 b(can)h(op)q(en)g(net)o(w)o(ork)e(connections)i(to)f (arbitrary)f(mac)o(hines)i(and)g(services)g(with)g(the)f(redi-)165 910 y(rection)g(op)q(erators)e(\(see)h(Section)h(3.6)e([Redirections],) h(page)g(22\).)112 975 y Fr(\017)30 b Fu(The)15 b Ft(noclobber)f Fu(option)h(is)g(a)o(v)m(ailable)h(to)f(a)o(v)o(oid)f(o)o(v)o (erwriting)h(existing)g(\014les)h(with)f(output)g(redi-)165 1029 y(rection)g(\(see)g(Section)g(4.3)f([The)h(Set)g(Builtin],)h(page) e(46\).)19 b(The)c(`)p Ft(>|)p Fu(')f(redirection)i(op)q(erator)e(ma)o (y)165 1084 y(b)q(e)i(used)g(to)e(o)o(v)o(erride)h Ft(noclobber)p Fu(.)112 1149 y Fr(\017)30 b Fu(The)17 b(Bash)g Ft(cd)g Fu(and)h Ft(pwd)e Fu(builtins)j(\(see)f(Section)g(4.1)e([Bourne)h (Shell)i(Builtins],)g(page)e(31\))f(eac)o(h)165 1203 y(tak)o(e)e(`)p Ft(-L)p Fu(')h(and)g(`)p Ft(-P)p Fu(')f(options)h(to)g (switc)o(h)g(b)q(et)o(w)o(een)h(logical)g(and)g(ph)o(ysical)g(mo)q (des.)112 1268 y Fr(\017)30 b Fu(Bash)13 b(allo)o(ws)f(a)g(function)i (to)e(o)o(v)o(erride)g(a)g(builtin)j(with)e(the)f(same)h(name,)f(and)h (pro)o(vides)g(access)g(to)165 1323 y(that)j(builtin's)i(functionalit)o (y)g(within)g(the)f(function)g(via)g(the)g Ft(builtin)e Fu(and)i Ft(command)f Fu(builtins)165 1377 y(\(see)f(Section)h(4.2)e ([Bash)h(Builtins],)i(page)e(36\).)112 1442 y Fr(\017)30 b Fu(The)18 b Ft(command)f Fu(builtin)j(allo)o(ws)e(selectiv)o(e)h (disabling)g(of)f(functions)g(when)g(command)g(lo)q(okup)g(is)165 1497 y(p)q(erformed)d(\(see)h(Section)g(4.2)e([Bash)h(Builtins],)h (page)f(36\).)112 1561 y Fr(\017)30 b Fu(Individual)15 b(builtins)f(ma)o(y)d(b)q(e)i(enabled)h(or)d(disabled)j(using)f(the)f Ft(enable)f Fu(builtin)j(\(see)e(Section)h(4.2)165 1616 y([Bash)i(Builtins],)h(page)g(36\).)112 1680 y Fr(\017)30 b Fu(The)13 b(Bash)h Ft(exec)e Fu(builtin)k(tak)o(es)c(additional)j (options)e(that)g(allo)o(w)g(users)h(to)e(con)o(trol)h(the)h(con)o(ten) o(ts)165 1735 y(of)j(the)g(en)o(vironmen)o(t)h(passed)f(to)g(the)g (executed)h(command,)f(and)h(what)e(the)i(zeroth)f(argumen)o(t)165 1790 y(to)e(the)g(command)g(is)h(to)e(b)q(e)i(\(see)f(Section)h(4.1)f ([Bourne)g(Shell)i(Builtins],)f(page)g(31\).)112 1855 y Fr(\017)30 b Fu(Shell)17 b(functions)e(ma)o(y)f(b)q(e)h(exp)q(orted)g (to)f(c)o(hildren)j(via)e(the)g(en)o(vironmen)o(t)g(using)g Ft(export)g(-f)f Fu(\(see)165 1909 y(Section)i(3.3)e([Shell)j(F)l (unctions],)e(page)g(12\).)112 1974 y Fr(\017)30 b Fu(The)19 b(Bash)g Ft(export)p Fu(,)f Ft(readonly)p Fu(,)g(and)h Ft(declare)e Fu(builtins)k(can)e(tak)o(e)f(a)g(`)p Ft(-f)p Fu(')g(option)h(to)f(act)g(on)165 2029 y(shell)c(functions,)g(a)f(`)p Ft(-p)p Fu(')f(option)h(to)f(displa)o(y)i(v)m(ariables)g(with)f(v)m (arious)h(attributes)e(set)h(in)h(a)e(format)165 2083 y(that)g(can)i(b)q(e)f(used)h(as)f(shell)h(input,)g(a)f(`)p Ft(-n)p Fu(')f(option)h(to)g(remo)o(v)o(e)f(v)m(arious)h(v)m(ariable)i (attributes,)e(and)165 2138 y(`)p Ft(name=value)p Fu(')g(argumen)o(ts)h (to)h(set)g(v)m(ariable)h(attributes)f(and)h(v)m(alues)g(sim)o (ultaneously)l(.)112 2203 y Fr(\017)30 b Fu(The)22 b(Bash)f Ft(hash)g Fu(builtin)j(allo)o(ws)d(a)g(name)h(to)f(b)q(e)h(asso)q (ciated)f(with)h(an)f(arbitrary)g(\014lename,)165 2257 y(ev)o(en)15 b(when)g(that)f(\014lename)h(cannot)f(b)q(e)i(found)e(b)o (y)h(searc)o(hing)g(the)f Ft($PATH)p Fu(,)g(using)h(`)p Ft(hash)f(-p)p Fu(')g(\(see)165 2312 y(Section)i(4.1)e([Bourne)i(Shell) h(Builtins],)f(page)f(31\).)112 2377 y Fr(\017)30 b Fu(Bash)13 b(includes)j(a)d Ft(help)g Fu(builtin)j(for)d(quic)o(k)h(reference)g (to)f(shell)i(facilities)g(\(see)f(Section)g(4.2)e([Bash)165 2431 y(Builtins],)17 b(page)e(36\).)112 2496 y Fr(\017)30 b Fu(The)22 b Ft(printf)e Fu(builtin)k(is)e(a)o(v)m(ailable)h(to)e (displa)o(y)h(formatted)f(output)g(\(see)g(Section)i(4.2)d([Bash)165 2551 y(Builtins],)d(page)e(36\).)112 2615 y Fr(\017)30 b Fu(The)14 b(Bash)f Ft(read)g Fu(builtin)j(\(see)d(Section)h(4.2)f ([Bash)g(Builtins],)i(page)e(36\))g(will)i(read)e(a)h(line)h(ending)165 2670 y(in)f(`)p Ft(\\)p Fu(')e(with)i(the)f(`)p Ft(-r)p Fu(')f(option,)i(and)f(will)i(use)f(the)f Ft(REPLY)f Fu(v)m(ariable)j(as)e(a)g(default)h(if)f(no)g(non-option)p eop %%Page: 120 122 120 121 bop 75 -58 a Fu(120)1262 b(Bash)15 b(Reference)h(Man)o(ual)165 149 y(argumen)o(ts)f(are)g(supplied.)23 b(The)16 b(Bash)g Ft(read)f Fu(builtin)j(also)d(accepts)h(a)f(prompt)g(string)h(with)g (the)165 204 y(`)p Ft(-p)p Fu(')g(option)i(and)g(will)h(use)e(Readline) i(to)e(obtain)h(the)f(line)i(when)f(giv)o(en)g(the)g(`)p Ft(-e)p Fu(')e(option.)27 b(The)165 259 y Ft(read)16 b Fu(builtin)i(also)e(has)g(additional)i(options)e(to)g(con)o(trol)g (input:)23 b(the)16 b(`)p Ft(-s)p Fu(')f(option)i(will)h(turn)e(o\013) 165 314 y(ec)o(hoing)j(of)e(input)j(c)o(haracters)d(as)h(they)g(are)g (read,)g(the)g(`)p Ft(-t)p Fu(')f(option)i(will)g(allo)o(w)g Ft(read)e Fu(to)h(time)165 369 y(out)e(if)h(input)g(do)q(es)g(not)f (arriv)o(e)g(within)i(a)e(sp)q(eci\014ed)i(n)o(um)o(b)q(er)f(of)f (seconds,)h(the)f(`)p Ft(-n)p Fu(')g(option)g(will)165 423 y(allo)o(w)e(reading)g(only)g(a)g(sp)q(eci\014ed)i(n)o(um)o(b)q(er) e(of)f(c)o(haracters)g(rather)g(than)h(a)f(full)i(line,)g(and)f(the)g (`)p Ft(-d)p Fu(')165 478 y(option)h(will)i(read)e(un)o(til)i(a)e (particular)g(c)o(haracter)g(rather)g(than)g(newline.)112 544 y Fr(\017)30 b Fu(The)17 b Ft(return)e Fu(builtin)k(ma)o(y)d(b)q(e) h(used)h(to)d(ab)q(ort)h(execution)i(of)e(scripts)h(executed)h(with)e (the)h Ft(.)f Fu(or)165 599 y Ft(source)e Fu(builtins)k(\(see)d (Section)h(4.1)e([Bourne)h(Shell)j(Builtins],)e(page)f(31\).)112 665 y Fr(\017)30 b Fu(Bash)22 b(includes)i(the)d Ft(shopt)g Fu(builtin,)k(for)c(\014ner)h(con)o(trol)f(of)h(shell)h(optional)f (capabilities)i(\(see)165 719 y(Section)17 b(4.2)f([Bash)g(Builtins],)i (page)f(36\),)e(and)i(allo)o(ws)g(these)f(options)h(to)f(b)q(e)h(set)f (and)h(unset)g(at)165 774 y(shell)g(in)o(v)o(o)q(cation)e(\(see)h (Section)g(6.1)e([In)o(v)o(oking)h(Bash],)g(page)g(59\).)112 840 y Fr(\017)30 b Fu(Bash)11 b(has)g(m)o(uc)o(h)h(more)e(optional)i(b) q(eha)o(vior)g(con)o(trollable)g(with)g(the)f Ft(set)g Fu(builtin)j(\(see)d(Section)h(4.3)165 895 y([The)j(Set)g(Builtin],)i (page)e(46\).)112 960 y Fr(\017)30 b Fu(The)15 b Ft(test)f Fu(builtin)i(\(see)f(Section)g(4.1)f([Bourne)g(Shell)j(Builtins],)f (page)e(31\))f(is)i(sligh)o(tly)h(di\013eren)o(t,)165 1015 y(as)11 b(it)g(implemen)o(ts)i(the)e Fp(posix)g Fu(algorithm,)g(whic)o(h)i(sp)q(eci\014es)g(the)e(b)q(eha)o(vior)h (based)f(on)g(the)h(n)o(um)o(b)q(er)165 1070 y(of)j(argumen)o(ts.)112 1136 y Fr(\017)30 b Fu(The)21 b Ft(trap)g Fu(builtin)j(\(see)d(Section) h(4.1)e([Bourne)i(Shell)h(Builtins],)h(page)d(31\))f(allo)o(ws)i(a)f Ft(DEBUG)165 1191 y Fu(pseudo-signal)f(sp)q(eci\014cation,)i(similar)e (to)e Ft(EXIT)p Fu(.)30 b(Commands)18 b(sp)q(eci\014ed)j(with)e(a)f Ft(DEBUG)h Fu(trap)165 1245 y(are)g(executed)g(after)g(ev)o(ery)f (simple)j(command.)30 b(The)20 b Ft(DEBUG)e Fu(trap)g(is)h(not)g (inherited)i(b)o(y)d(shell)165 1300 y(functions.)165 1366 y(The)11 b Ft(trap)f Fu(builtin)j(\(see)d(Section)h(4.1)f([Bourne) h(Shell)h(Builtins],)h(page)d(31\))g(allo)o(ws)h(an)f Ft(ERR)g Fu(pseudo-)165 1421 y(signal)16 b(sp)q(eci\014cation,)g (similar)g(to)e Ft(EXIT)g Fu(and)h Ft(DEBUG)p Fu(.)k(Commands)14 b(sp)q(eci\014ed)j(with)f(an)e Ft(ERR)h Fu(trap)165 1475 y(are)f(executed)i(after)e(a)g(simple)i(command)f(fails,)g(with)g(a)f (few)g(exceptions.)21 b(The)15 b Ft(ERR)f Fu(trap)g(is)h(not)165 1530 y(inherited)i(b)o(y)e(shell)i(functions.)112 1596 y Fr(\017)30 b Fu(The)15 b(Bash)g Ft(type)g Fu(builtin)i(is)f(more)f (extensiv)o(e)g(and)h(giv)o(es)f(more)g(information)g(ab)q(out)g(the)g (names)165 1651 y(it)g(\014nds)h(\(see)f(Section)i(4.2)d([Bash)h (Builtins],)h(page)f(36\).)112 1717 y Fr(\017)30 b Fu(The)18 b(Bash)f Ft(umask)f Fu(builtin)k(p)q(ermits)e(a)f(`)p Ft(-p)p Fu(')f(option)h(to)g(cause)h(the)f(output)g(to)g(b)q(e)h (displa)o(y)o(ed)g(in)165 1771 y(the)g(form)f(of)g(a)g Ft(umask)g Fu(command)g(that)g(ma)o(y)g(b)q(e)h(reused)g(as)g(input)g (\(see)g(Section)g(4.1)f([Bourne)165 1826 y(Shell)g(Builtins],)g(page)e (31\).)112 1892 y Fr(\017)30 b Fu(Bash)17 b(implemen)o(ts)h(a)f Ft(csh)p Fu(-lik)o(e)h(directory)g(stac)o(k,)e(and)h(pro)o(vides)h(the) f Ft(pushd)p Fu(,)g Ft(popd)p Fu(,)f(and)i Ft(dirs)165 1947 y Fu(builtins)i(to)c(manipulate)j(it)f(\(see)f(Section)i(6.8)d ([The)h(Directory)h(Stac)o(k],)e(page)i(69\).)25 b(Bash)18 b(also)165 2001 y(mak)o(es)d(the)g(directory)g(stac)o(k)g(visible)i(as) e(the)g(v)m(alue)i(of)d(the)i Ft(DIRSTACK)e Fu(shell)j(v)m(ariable.)112 2067 y Fr(\017)30 b Fu(Bash)14 b(in)o(terprets)g(sp)q(ecial)i(bac)o (kslash-escap)q(ed)g(c)o(haracters)d(in)i(the)f(prompt)g(strings)g (when)h(in)o(ter-)165 2122 y(activ)o(e)g(\(see)g(Section)i(6.9)d([Prin) o(ting)h(a)g(Prompt],)f(page)h(70\).)112 2188 y Fr(\017)30 b Fu(The)24 b(Bash)f(restricted)g(mo)q(de)h(is)g(more)f(useful)h(\(see) f(Section)h(6.10)e([The)i(Restricted)f(Shell],)165 2243 y(page)15 b(71\);)f(the)h(SVR4.2)f(shell)j(restricted)f(mo)q(de)f(is)h (to)q(o)e(limited.)112 2308 y Fr(\017)30 b Fu(The)16 b Ft(disown)e Fu(builtin)k(can)d(remo)o(v)o(e)g(a)f(job)i(from)e(the)i (in)o(ternal)g(shell)h(job)e(table)g(\(see)h(Section)g(7.2)165 2363 y([Job)g(Con)o(trol)g(Builtins],)j(page)d(76\))g(or)g(suppress)h (the)g(sending)g(of)g Ft(SIGHUP)e Fu(to)h(a)g(job)h(when)g(the)165 2418 y(shell)g(exits)e(as)g(the)g(result)h(of)f(a)g Ft(SIGHUP)p Fu(.)112 2484 y Fr(\017)30 b Fu(The)14 b(SVR4.2)f(shell)j(has)e(t)o(w)o (o)f(privilege-related)k(builtins)f(\()p Ft(mldmode)d Fu(and)h Ft(priv)p Fu(\))f(not)h(presen)o(t)g(in)165 2538 y(Bash.)112 2604 y Fr(\017)30 b Fu(Bash)15 b(do)q(es)h(not)f(ha)o (v)o(e)f(the)i Ft(stop)e Fu(or)h Ft(newgrp)f Fu(builtins.)112 2670 y Fr(\017)30 b Fu(Bash)15 b(do)q(es)h(not)f(use)g(the)g Ft(SHACCT)g Fu(v)m(ariable)h(or)f(p)q(erform)g(shell)i(accoun)o(ting.)p eop %%Page: 121 123 121 122 bop 75 -58 a Fu(App)q(endix)17 b(B:)e(Ma)s(jor)f(Di\013erences) i(F)l(rom)e(The)h(Bourne)h(Shell)631 b(121)112 149 y Fr(\017)30 b Fu(The)15 b(SVR4.2)f Ft(sh)h Fu(uses)h(a)f Ft(TIMEOUT)f Fu(v)m(ariable)i(lik)o(e)h(Bash)e(uses)h Ft(TMOUT)p Fu(.)75 229 y(More)f(features)f(unique)j(to)e(Bash)g(ma)o(y) f(b)q(e)i(found)g(in)g(Chapter)f(6)g([Bash)f(F)l(eatures],)h(page)g (59.)75 358 y Fs(B.1)33 b(Implemen)n(tation)24 b(Di\013erences)e(F)-6 b(rom)23 b(The)f(SVR4.2)g(Shell)137 454 y Fu(Since)g(Bash)d(is)i(a)e (completely)i(new)f(implemen)o(tation,)i(it)e(do)q(es)g(not)g(su\013er) f(from)g(man)o(y)h(of)f(the)75 509 y(limitations)e(of)d(the)i(SVR4.2)e (shell.)21 b(F)l(or)15 b(instance:)112 576 y Fr(\017)30 b Fu(Bash)16 b(do)q(es)g(not)f(fork)g(a)h(subshell)i(when)e (redirecting)h(in)o(to)f(or)f(out)h(of)f(a)g(shell)j(con)o(trol)d (structure)165 631 y(suc)o(h)h(as)e(an)h Ft(if)g Fu(or)g Ft(while)f Fu(statemen)o(t.)112 698 y Fr(\017)30 b Fu(Bash)14 b(do)q(es)h(not)f(allo)o(w)h(un)o(balanced)h(quotes.)j(The)c(SVR4.2)e (shell)j(will)g(silen)o(tly)g(insert)f(a)f(needed)165 753 y(closing)h(quote)f(at)f Ft(EOF)h Fu(under)g(certain)h (circumstances.)20 b(This)15 b(can)f(b)q(e)g(the)g(cause)h(of)e(some)h (hard-)165 808 y(to-\014nd)h(errors.)112 875 y Fr(\017)30 b Fu(The)23 b(SVR4.2)e(shell)j(uses)f(a)g(baro)q(que)f(memory)g (managemen)o(t)g(sc)o(heme)h(based)g(on)g(trapping)165 930 y Ft(SIGSEGV)p Fu(.)28 b(If)18 b(the)g(shell)i(is)f(started)e(from) h(a)g(pro)q(cess)g(with)g Ft(SIGSEGV)g Fu(blo)q(c)o(k)o(ed)h(\(e.g.,)e (b)o(y)h(using)165 985 y(the)d Ft(system\(\))f Fu(C)h(library)h (function)g(call\),)g(it)f(misb)q(eha)o(v)o(es)h(badly)l(.)112 1052 y Fr(\017)30 b Fu(In)14 b(a)g(questionable)h(attempt)d(at)h (securit)o(y)l(,)h(the)g(SVR4.2)f(shell,)i(when)f(in)o(v)o(ok)o(ed)g (without)f(the)h(`)p Ft(-p)p Fu(')165 1107 y(option,)19 b(will)h(alter)e(its)g(real)h(and)f(e\013ectiv)o(e)g Fp(uid)h Fu(and)f Fp(gid)g Fu(if)h(they)f(are)g(less)h(than)f(some)g (magic)165 1161 y(threshold)e(v)m(alue,)g(commonly)f(100.)k(This)d(can) f(lead)h(to)f(unexp)q(ected)i(results.)112 1229 y Fr(\017)30 b Fu(The)15 b(SVR4.2)f(shell)j(do)q(es)f(not)f(allo)o(w)g(users)g(to)g (trap)f Ft(SIGSEGV)p Fu(,)g Ft(SIGALRM)p Fu(,)g(or)h Ft(SIGCHLD)p Fu(.)112 1296 y Fr(\017)30 b Fu(The)18 b(SVR4.2)e(shell)j (do)q(es)e(not)g(allo)o(w)h(the)f Ft(IFS)p Fu(,)g Ft(MAILCHECK)p Fu(,)f Ft(PATH)p Fu(,)h Ft(PS1)p Fu(,)g(or)g Ft(PS2)g Fu(v)m(ariables)i(to)165 1351 y(b)q(e)d(unset.)112 1418 y Fr(\017)30 b Fu(The)15 b(SVR4.2)f(shell)j(treats)d(`)p Ft(^)p Fu(')h(as)g(the)g(undo)q(cumen)o(ted)h(equiv)m(alen)o(t)h(of)e (`)p Ft(|)p Fu('.)112 1485 y Fr(\017)30 b Fu(Bash)18 b(allo)o(ws)h(m)o(ultiple)h(option)e(argumen)o(ts)g(when)h(it)f(is)h (in)o(v)o(ok)o(ed)f(\()p Ft(-x)d(-v)p Fu(\);)k(the)f(SVR4.2)f(shell)165 1540 y(allo)o(ws)f(only)h(one)g(option)f(argumen)o(t)g(\()p Ft(-xv)p Fu(\).)22 b(In)17 b(fact,)f(some)g(v)o(ersions)g(of)g(the)g (shell)i(dump)f(core)165 1595 y(if)f(the)f(second)h(argumen)o(t)e(b)q (egins)i(with)g(a)f(`)p Ft(-)p Fu('.)112 1662 y Fr(\017)30 b Fu(The)18 b(SVR4.2)f(shell)i(exits)f(a)g(script)g(if)h(an)o(y)e (builtin)j(fails;)g(Bash)e(exits)g(a)f(script)i(only)f(if)g(one)g(of) 165 1717 y(the)f Fp(posix)f Fu(1003.2)f(sp)q(ecial)j(builtins)h(fails,) e(and)g(only)g(for)f(certain)h(failures,)g(as)f(en)o(umerated)h(in)165 1772 y(the)e Fp(posix)g Fu(1003.2)f(standard.)112 1839 y Fr(\017)30 b Fu(The)15 b(SVR4.2)f(shell)j(b)q(eha)o(v)o(es)f (di\013eren)o(tly)g(when)f(in)o(v)o(ok)o(ed)h(as)f Ft(jsh)f Fu(\(it)i(turns)f(on)g(job)g(con)o(trol\).)p eop %%Page: 122 124 122 123 bop 75 -58 a Fu(122)1262 b(Bash)15 b(Reference)h(Man)o(ual)p eop %%Page: 123 125 123 124 bop 75 -58 a Fu(Index)16 b(of)f(Shell)i(Builtin)h(Commands)1066 b(123)75 149 y Fq(Index)26 b(of)h(Shell)e(Builtin)h(Commands)75 307 y Fs(.)75 372 y Fg(.)8 b Ff(.)e(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f (.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.) h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)21 b Fe(31)75 504 y Fs(:)75 569 y Fg(:)8 b Ff(.)e(.)g(.)h(.)f(.)g(.)g(.)g (.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.) g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g (.)21 b Fe(31)75 701 y Fs([)75 766 y Fg([)8 b Ff(.)e(.)g(.)h(.)f(.)g(.) g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f (.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.) f(.)g(.)21 b Fe(34)75 899 y Fs(A)75 963 y Fg(alias)6 b Ff(.)t(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g (.)g(.)g(.)h(.)f(.)18 b Fe(37)75 1096 y Fs(B)75 1160 y Fg(bg)8 b Ff(.)d(.)h(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g (.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.) g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)20 b Fe(76)75 1208 y Fg(bind)6 b Ff(.)f(.)h(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h (.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.) h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)19 b Fe(37)75 1256 y Fg(break)6 b Ff(.)t(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h (.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)18 b Fe(31)75 1303 y Fg(builtin)t Ff(.)t(.)6 b(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g (.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) g(.)h(.)f(.)g(.)g(.)g(.)17 b Fe(38)75 1436 y Fs(C)75 1500 y Fg(cd)8 b Ff(.)d(.)h(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g (.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.) g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)20 b Fe(31)75 1548 y Fg(command)t Ff(.)t(.)6 b(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g (.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)17 b Fe(38)75 1595 y Fg(compgen)t Ff(.)t(.)6 b(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.) g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g (.)g(.)g(.)17 b Fe(99)75 1643 y Fg(complete)9 b Ff(.)d(.)g(.)g(.)g(.)h (.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.) h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)25 b Fe(100)75 1691 y Fg(continue)s Ff(.)s(.)7 b(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g (.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.) g(.)g(.)g(.)g(.)h(.)f(.)g(.)16 b Fe(32)75 1823 y Fs(D)75 1888 y Fg(declare)t Ff(.)t(.)6 b(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g (.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)17 b Fe(38)75 1935 y Fg(dirs)6 b Ff(.)f(.)h(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g (.)g(.)h(.)f(.)g(.)g(.)19 b Fe(69)75 1983 y Fg(disown)5 b Ff(.)t(.)h(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g (.)g(.)g(.)g(.)18 b Fe(77)75 2115 y Fs(E)75 2180 y Fg(echo)6 b Ff(.)f(.)h(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g (.)g(.)h(.)f(.)g(.)g(.)19 b Fe(39)75 2228 y Fg(enable)5 b Ff(.)t(.)h(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g (.)g(.)g(.)g(.)18 b Fe(39)75 2275 y Fg(eval)6 b Ff(.)f(.)h(.)g(.)g(.)h (.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)19 b Fe(32)75 2323 y Fg(exec)6 b Ff(.)f(.)h(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g (.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)19 b Fe(32)75 2370 y Fg(exit)6 b Ff(.)f(.)h(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g (.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)19 b Fe(32)75 2418 y Fg(export)5 b Ff(.)t(.)h(.)g(.)g(.)g(.)g(.)h(.)f(.)g (.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.) g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)18 b Fe(32)75 2558 y Fs(F)75 2622 y Fg(fc)7 b Ff(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g (.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.) f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)20 b Fe(103)75 2670 y Fg(fg)8 b Ff(.)d(.)h(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h (.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)20 b Fe(76)1012 307 y Fs(G)1012 368 y Fg(getopts)t Ff(.)t(.)6 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f (.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.) 17 b Fe(32)1012 499 y Fs(H)1012 560 y Fg(hash)6 b Ff(.)f(.)h(.)h(.)f(.) g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h (.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.) 20 b Fe(33)1012 606 y Fg(help)6 b Ff(.)f(.)h(.)h(.)f(.)g(.)g(.)g(.)g(.) h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g (.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)20 b Fe(40)1012 652 y Fg(history)t Ff(.)s(.)7 b(.)f(.)g(.)g(.)g(.)g(.)h(.) f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g (.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)16 b Fe(104)1012 783 y Fs(J)1012 844 y Fg(jobs)6 b Ff(.)f(.)h(.)h(.)f(.)g(.)g(.)g(.)g(.) h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g (.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)20 b Fe(76)1012 975 y Fs(K)1012 1036 y Fg(kill)6 b Ff(.)f(.)h(.)h(.)f(.)g (.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.) f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)20 b Fe(77)1012 1160 y Fs(L)1012 1221 y Fg(let)7 b Ff(.)e(.)i(.)f(.)g(.)g (.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.) g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h (.)20 b Fe(40)1012 1267 y Fg(local)6 b Ff(.)t(.)g(.)g(.)h(.)f(.)g(.)g (.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.) g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)19 b Fe(40)1012 1313 y Fg(logout)5 b Ff(.)t(.)h(.)g(.)h(.)f(.)g(.)g(.)g(.) g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g (.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)18 b Fe(40)1012 1443 y Fs(P)1012 1505 y Fg(popd)6 b Ff(.)f(.)h(.)h(.)f(.)g(.)g(.)g(.)g (.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)20 b Fe(69)1012 1551 y Fg(printf)5 b Ff(.)t(.)h(.)g(.)h(.)f(.)g(.)g(.)g(.) g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g (.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)18 b Fe(41)1012 1596 y Fg(pushd)6 b Ff(.)t(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g (.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.) f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)19 b Fe(70)1012 1642 y Fg(pwd)7 b Ff(.)e(.)i(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g (.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)20 b Fe(33)1012 1773 y Fs(R)1012 1834 y Fg(read)6 b Ff(.)f(.)h(.)h(.)f(.)g(.)g(.)g(.)g(.)h (.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)20 b Fe(41)1012 1880 y Fg(readonly)s Ff(.)t(.)6 b(.)g(.)g(.)g(.)h(.)f(.)g (.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.) g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)17 b Fe(34)1012 1926 y Fg(return)5 b Ff(.)t(.)h(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f (.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.) f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)18 b Fe(34)1012 2049 y Fs(S)1012 2111 y Fg(set)7 b Ff(.)e(.)i(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.) f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h (.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)20 b Fe(46)1012 2157 y Fg(shift)6 b Ff(.)t(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g (.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)19 b Fe(34)1012 2203 y Fg(shopt)6 b Ff(.)t(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g (.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)19 b Fe(42)1012 2248 y Fg(source)5 b Ff(.)t(.)h(.)g(.)h(.)f(.)g(.)g(.)g(.)g (.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)18 b Fe(45)1012 2294 y Fg(suspend)t Ff(.)t(.)6 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.) f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g (.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)17 b Fe(77)1012 2425 y Fs(T)1012 2486 y Fg(test)6 b Ff(.)f(.)h(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f (.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.) h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)20 b Fe(34)1012 2532 y Fg(times)6 b Ff(.)t(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g (.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)19 b Fe(35)1012 2578 y Fg(trap)6 b Ff(.)f(.)h(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.) f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g (.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)20 b Fe(35)1012 2624 y Fg(type)6 b Ff(.)f(.)h(.)h(.)f(.)g(.)g(.)g(.)g(.)h (.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)20 b Fe(45)1012 2670 y Fg(typeset)t Ff(.)t(.)6 b(.)g(.)g(.)h(.)f(.)g(.)g (.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.) g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)17 b Fe(45)p eop %%Page: 124 126 124 125 bop 75 -58 a Fu(124)1262 b(Bash)15 b(Reference)h(Man)o(ual)75 149 y Fs(U)75 227 y Fg(ulimit)5 b Ff(.)t(.)h(.)g(.)g(.)g(.)g(.)h(.)f(.) g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f (.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)18 b Fe(45)75 280 y Fg(umask)6 b Ff(.)t(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h (.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)18 b Fe(36)75 333 y Fg(unalias)t Ff(.)t(.)6 b(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g (.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) g(.)h(.)f(.)g(.)g(.)g(.)17 b Fe(46)1012 149 y Fg(unset)6 b Ff(.)t(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.) f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g (.)h(.)f(.)g(.)g(.)19 b Fe(36)1012 272 y Fs(W)1012 333 y Fg(wait)6 b Ff(.)f(.)h(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g (.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)20 b Fe(77)p eop %%Page: 125 127 125 126 bop 75 -58 a Fu(Index)16 b(of)f(Shell)i(Reserv)o(ed)e(W)l(ords) 1123 b(125)75 149 y Fq(Index)26 b(of)h(Shell)e(Reserv)n(ed)h(W)-7 b(ords)75 307 y Fs(!)75 378 y Fg(!)9 b Ff(.)d(.)g(.)g(.)g(.)g(.)h(.)f (.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.) h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g (.)h(.)21 b Fe(8)75 525 y Fs([)75 595 y Fg([[)8 b Ff(.)d(.)h(.)g(.)h(.) f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g (.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) g(.)h(.)20 b Fe(11)75 748 y Fs(])75 819 y Fg(]])8 b Ff(.)d(.)h(.)g(.)h (.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.) g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g (.)g(.)h(.)20 b Fe(11)75 966 y Fd({)75 1036 y Fg({)8 b Ff(.)e(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.) f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h (.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)21 b Fe(12)75 1184 y Fd(})75 1254 y Fg(})8 b Ff(.)e(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.) g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h (.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)21 b Fe(12)75 1401 y Fs(C)75 1472 y Fg(case)6 b Ff(.)f(.)h(.)g(.)g(.)h(.)f (.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.) h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)19 b Fe(10)75 1619 y Fs(D)75 1689 y Fg(do)8 b Ff(.)e(.)g(.)g(.)g(.)g(.)g (.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g (.)g(.)21 b Fe(9)75 1740 y Fg(done)7 b Ff(.)t(.)g(.)f(.)g(.)g(.)g(.)g (.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)19 b Fe(9)1012 307 y Fs(E)1012 368 y Fg(elif)6 b Ff(.)f(.)h(.)h(.)f(.)g(.) g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f (.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)20 b Fe(10)1012 414 y Fg(else)6 b Ff(.)f(.)h(.)h(.)f(.)g(.)g(.)g(.)g(.)h (.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)20 b Fe(10)1012 459 y Fg(esac)6 b Ff(.)f(.)h(.)h(.)f(.)g(.)g(.)g(.)g(.)h (.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)20 b Fe(10)1012 581 y Fs(F)1012 642 y Fg(fi)8 b Ff(.)d(.)i(.)f(.)g(.)g(.)g (.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g (.)21 b Fe(10)1012 688 y Fg(for)8 b Ff(.)d(.)h(.)g(.)g(.)h(.)f(.)g(.)g (.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.) g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)21 b Fe(9)1012 734 y Fg(function)s Ff(.)t(.)6 b(.)g(.)g(.)g(.)h(.)f(.)g(.) g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g (.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)17 b Fe(12)1012 856 y Fs(I)1012 917 y Fg(if)8 b Ff(.)d(.)i(.)f(.)g(.)g(.)g(.)g(.)h(.)f (.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.) f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)21 b Fe(10)1012 962 y Fg(in)8 b Ff(.)d(.)i(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g (.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.) g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)21 b Fe(10)1012 1084 y Fs(S)1012 1145 y Fg(select)5 b Ff(.)t(.)h(.)g(.)h (.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)18 b Fe(11)1012 1267 y Fs(T)1012 1328 y Fg(then)6 b Ff(.)f(.)h(.)h(.)f(.)g (.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.) f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)20 b Fe(10)1012 1374 y Fg(time)7 b Ff(.)e(.)h(.)g(.)g(.)g(.)h(.)f(.)g(.)g (.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.) g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)20 b Fe(8)1012 1496 y Fs(U)1012 1557 y Fg(until)6 b Ff(.)f(.)h(.)g(.)g(.)g (.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)19 b Fe(9)1012 1679 y Fs(W)1012 1740 y Fg(while)6 b Ff(.)f(.)h(.)g(.)g(.)g (.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)19 b Fe(9)p eop %%Page: 126 128 126 127 bop 75 -58 a Fu(126)1262 b(Bash)15 b(Reference)h(Man)o(ual)p eop %%Page: 127 129 127 128 bop 75 -58 a Fu(P)o(arameter)14 b(and)h(V)l(ariable)i(Index) 1132 b(127)75 149 y Fq(P)n(arameter)27 b(and)g(V)-7 b(ariable)26 b(Index)75 307 y Fs(!)75 375 y Fg(!)8 b Ff(.)e(.)g(.)h(.)f(.)g(.)g(.)g (.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.) g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g (.)21 b Fe(14)75 516 y Fs(#)75 584 y Fg(#)8 b Ff(.)e(.)g(.)h(.)f(.)g(.) g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f (.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.) f(.)g(.)21 b Fe(14)75 726 y Fs($)75 794 y Fg($)8 b Ff(.)e(.)g(.)h(.)f (.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.) h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g (.)h(.)f(.)g(.)21 b Fe(14)75 941 y Fs(*)75 1009 y Fg(*)8 b Ff(.)e(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.) f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h (.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)21 b Fe(14)75 1150 y Fs(-)75 1218 y Fg(-)8 b Ff(.)e(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.) g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h (.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)21 b Fe(14)75 1359 y Fs(?)75 1427 y Fg(?)8 b Ff(.)e(.)g(.)h(.)f(.)g(.)g(.) g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g (.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.) g(.)21 b Fe(14)75 1568 y Fs(@)75 1637 y Fg(@)8 b Ff(.)e(.)g(.)h(.)f(.)g (.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.) f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h (.)f(.)g(.)21 b Fe(14)p 79 1778 21 3 v 75 1846 a Fg(_)8 b Ff(.)e(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.) f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h (.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)21 b Fe(15)75 1987 y Fs(0)75 2055 y Fg(0)8 b Ff(.)e(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.) g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h (.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)21 b Fe(14)75 2196 y Fs(A)75 2264 y Fg(auto_resum)o(e)7 b Ff(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.) f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)23 b Fe(78)75 2405 y Fs(B)75 2473 y Fg(BASH)6 b Ff(.)f(.)h(.)g(.)g(.)h(.)f (.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.) h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)19 b Fe(51)75 2523 y Fg(BASH_ENV)s Ff(.)s(.)7 b(.)f(.)g(.)g(.)g(.)g(.)h(.) f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g (.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)16 b Fe(52)75 2572 y Fg(BASH_VERSI)o(NF)o(O)9 b Ff(.)s(.)d(.)g(.)g(.)h(.)f(.)g(.)g(.) g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g (.)g(.)g(.)g(.)22 b Fe(52)75 2621 y Fg(BASH_VERSI)o(ON)6 b Ff(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.) h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)22 b Fe(52)75 2670 y Fg(bell-style)7 b Ff(.)f(.)g(.)h(.)f(.)g(.)g(.)g(.)g (.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) g(.)g(.)h(.)f(.)g(.)g(.)g(.)24 b Fe(83)1012 307 y Fs(C)1012 371 y Fg(CDPATH)5 b Ff(.)t(.)h(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f (.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.) f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)18 b Fe(51)1012 418 y Fg(COLUMNS)t Ff(.)t(.)6 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g (.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.) f(.)g(.)g(.)g(.)g(.)h(.)17 b Fe(52)1012 465 y Fg(comment-beg)o(in)8 b Ff(.)s(.)e(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.) g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)22 b Fe(83)1012 512 y Fg(COMP_CWORD)8 b Ff(.)e(.)g(.)g(.)g(.)g(.)g(.)h(.)f (.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.) f(.)g(.)g(.)g(.)g(.)g(.)h(.)24 b Fe(52)1012 559 y Fg(COMP_LINE)9 b Ff(.)d(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)25 b Fe(52)1012 606 y Fg(COMP_POINT)8 b Ff(.)e(.)g(.)g(.)g(.)g(.)g(.)h(.)f (.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.) f(.)g(.)g(.)g(.)g(.)g(.)h(.)24 b Fe(52)1012 653 y Fg(COMP_WORDS)8 b Ff(.)e(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)24 b Fe(52)1012 700 y Fg(completion-)o(qu)o(ery)o(-i)o(tem)o(s)8 b Ff(.)e(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.) g(.)g(.)g(.)25 b Fe(83)1012 747 y Fg(COMPREPLY)9 b Ff(.)d(.)g(.)g(.)g (.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)25 b Fe(53)1012 794 y Fg(convert-met)o(a)6 b Ff(.)g(.)h(.)f(.)g(.)g(.)g(.)g (.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) g(.)g(.)h(.)f(.)g(.)g(.)23 b Fe(83)1012 924 y Fs(D)1012 988 y Fg(DIRSTACK)s Ff(.)t(.)6 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.) h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g (.)g(.)h(.)f(.)g(.)g(.)g(.)17 b Fe(53)1012 1035 y Fg(disable-com)o(pl)o (eti)o(on)t Ff(.)t(.)6 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.) g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)19 b Fe(83)1012 1172 y Fs(E)1012 1236 y Fg(editing-mod)o(e)6 b Ff(.)g(.)h(.)f(.)g(.)g (.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.) g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)23 b Fe(83)1012 1283 y Fg(enable-keyp)o(ad)8 b Ff(.)s(.)e(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.) g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f (.)g(.)22 b Fe(83)1012 1330 y Fg(EUID)6 b Ff(.)f(.)h(.)h(.)f(.)g(.)g(.) g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g (.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)20 b Fe(53)1012 1377 y Fg(expand-tild)o(e)6 b Ff(.)g(.)h(.)f(.)g(.)g(.)g (.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) g(.)g(.)g(.)h(.)f(.)g(.)g(.)23 b Fe(84)1012 1514 y Fs(F)1012 1577 y Fg(FCEDIT)5 b Ff(.)t(.)h(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f (.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.) f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)18 b Fe(53)1012 1625 y Fg(FIGNORE)t Ff(.)t(.)6 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g (.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.) f(.)g(.)g(.)g(.)g(.)h(.)17 b Fe(53)1012 1672 y Fg(FUNCNAME)s Ff(.)t(.)6 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g (.)g(.)17 b Fe(53)1012 1801 y Fs(G)1012 1865 y Fg(GLOBIGNORE)8 b Ff(.)e(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)24 b Fe(53)1012 1912 y Fg(GROUPS)5 b Ff(.)t(.)h(.)g(.)h(.)f(.)g(.)g(.)g(.) g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g (.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)18 b Fe(53)1012 2042 y Fs(H)1012 2105 y Fg(histchars)9 b Ff(.)d(.)g(.)g(.)g(.)g(.)h(.)f (.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.) h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)25 b Fe(53)1012 2152 y Fg(HISTCMD)t Ff(.)t(.)6 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g (.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.) f(.)g(.)g(.)g(.)g(.)h(.)17 b Fe(54)1012 2199 y Fg(HISTCONTROL)6 b Ff(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.) g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)24 b Fe(54)1012 2246 y Fg(HISTFILE)s Ff(.)t(.)6 b(.)g(.)g(.)g(.)h(.)f(.)g (.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.) g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)17 b Fe(54)1012 2293 y Fg(HISTFILESIZ)o(E)6 b Ff(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.) g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h (.)f(.)g(.)g(.)23 b Fe(54)1012 2341 y Fg(HISTIGNORE)8 b Ff(.)e(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)24 b Fe(54)1012 2388 y Fg(history-pre)o(se)o(rve)o(-p)o(oin)o(t)8 b Ff(.)e(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.) g(.)g(.)g(.)25 b Fe(84)1012 2435 y Fg(HISTSIZE)s Ff(.)t(.)6 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f (.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)17 b Fe(54)1012 2482 y Fg(HOME)6 b Ff(.)f(.)h(.)h(.)f(.)g(.)g(.)g(.)g(.)h (.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)20 b Fe(51)1012 2529 y Fg(horizontal-)o(sc)o(rol)o(l-)o(mod)o(e)8 b Ff(.)e(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.) g(.)g(.)g(.)25 b Fe(84)1012 2576 y Fg(HOSTFILE)s Ff(.)t(.)6 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f (.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)17 b Fe(54)1012 2623 y Fg(HOSTNAME)s Ff(.)t(.)6 b(.)g(.)g(.)g(.)h(.)f(.)g (.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.) g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)17 b Fe(55)1012 2670 y Fg(HOSTTYPE)s Ff(.)t(.)6 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g (.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) g(.)g(.)h(.)f(.)g(.)g(.)g(.)17 b Fe(55)p eop %%Page: 128 130 128 129 bop 75 -58 a Fu(128)1262 b(Bash)15 b(Reference)h(Man)o(ual)75 149 y Fs(I)75 210 y Fg(IFS)7 b Ff(.)e(.)h(.)g(.)g(.)h(.)f(.)g(.)g(.)g (.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)20 b Fe(51)75 256 y Fg(IGNOREEOF)8 b Ff(.)e(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.) f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g (.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)24 b Fe(55)75 302 y Fg(input-meta)7 b Ff(.)f(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.) g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)24 b Fe(84)75 347 y Fg(INPUTRC)t Ff(.)t(.)6 b(.)g(.)g(.)g(.)g(.)h(.)f(.)g (.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.) f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)17 b Fe(55)75 393 y Fg(isearch-te)o(rm)o(ina)o(to)o(rs)t Ff(.)s(.)6 b(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g (.)g(.)g(.)h(.)f(.)17 b Fe(84)75 515 y Fs(K)75 576 y Fg(keymap)5 b Ff(.)t(.)h(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.) f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g (.)h(.)f(.)g(.)g(.)g(.)g(.)18 b Fe(84)75 705 y Fs(L)75 766 y Fg(LANG)6 b Ff(.)f(.)h(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.) f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h (.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)19 b Fe(55)75 812 y Fg(LC_ALL)5 b Ff(.)t(.)h(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g (.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)18 b Fe(55)75 857 y Fg(LC_COLLATE)7 b Ff(.)f(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.) g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)24 b Fe(55)75 903 y Fg(LC_CTYPE)s Ff(.)s(.)7 b(.)f(.)g(.)g(.)g(.)g(.)h(.)f (.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.) h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)16 b Fe(55)75 949 y Fg(LC_MESSAGE)o(S)7 b Ff(.)s(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h (.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.) h(.)20 b Fe(7,)12 b(55)75 994 y Fg(LC_NUMERIC)7 b Ff(.)f(.)g(.)h(.)f(.) g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f (.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)24 b Fe(55)75 1040 y Fg(LINENO)5 b Ff(.)t(.)h(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g (.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)18 b Fe(55)75 1086 y Fg(LINES)6 b Ff(.)t(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g (.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.) f(.)g(.)g(.)g(.)g(.)h(.)f(.)18 b Fe(55)75 1208 y Fs(M)75 1268 y Fg(MACHTYPE)s Ff(.)s(.)7 b(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g (.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.) g(.)g(.)g(.)g(.)h(.)f(.)g(.)16 b Fe(55)75 1314 y Fg(MAIL)6 b Ff(.)f(.)h(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g (.)g(.)h(.)f(.)g(.)g(.)19 b Fe(51)75 1360 y Fg(MAILCHECK)8 b Ff(.)e(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.) g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)24 b Fe(55)75 1405 y Fg(MAILPATH)s Ff(.)s(.)7 b(.)f(.)g(.)g(.)g(.)g(.)h(.) f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g (.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)16 b Fe(51)75 1451 y Fg(mark-modif)o(ie)o(d-l)o(in)o(es)t Ff(.)s(.)6 b(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g (.)g(.)g(.)h(.)f(.)17 b Fe(84)75 1497 y Fg(match-hidd)o(en)o(-fi)o(le)o (s)5 b Ff(.)s(.)i(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h (.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)18 b Fe(84)75 1542 y Fg(meta-flag)8 b Ff(.)e(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g (.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.) g(.)g(.)g(.)g(.)h(.)24 b Fe(84)75 1672 y Fs(O)75 1733 y Fg(OLDPWD)5 b Ff(.)t(.)h(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h (.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.) g(.)h(.)f(.)g(.)g(.)g(.)g(.)18 b Fe(56)75 1778 y Fg(OPTARG)5 b Ff(.)t(.)h(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g (.)g(.)g(.)g(.)18 b Fe(51)75 1824 y Fg(OPTERR)5 b Ff(.)t(.)h(.)g(.)g(.) g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g (.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)18 b Fe(56)75 1870 y Fg(OPTIND)5 b Ff(.)t(.)h(.)g(.)g(.)g(.)g(.)h(.)f(.)g (.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.) g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)18 b Fe(51)75 1915 y Fg(OSTYPE)5 b Ff(.)t(.)h(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g (.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)18 b Fe(56)75 1961 y Fg(output-met)o(a)7 b Ff(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.) g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f (.)g(.)g(.)23 b Fe(85)1012 149 y Fs(P)1012 214 y Fg(PATH)6 b Ff(.)f(.)h(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.) g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h (.)f(.)g(.)g(.)g(.)g(.)20 b Fe(51)1012 261 y Fg(PIPESTATUS)8 b Ff(.)e(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)24 b Fe(56)1012 309 y Fg(POSIXLY_COR)o(RE)o(CT)7 b Ff(.)s(.)f(.)g(.)h(.)f (.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.) h(.)f(.)g(.)g(.)g(.)21 b Fe(56)1012 356 y Fg(PPID)6 b Ff(.)f(.)h(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g (.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.) f(.)g(.)g(.)g(.)g(.)20 b Fe(56)1012 404 y Fg(PROMPT_COMM)o(AN)o(D)8 b Ff(.)s(.)e(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.) f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)21 b Fe(56)1012 451 y Fg(PS1)7 b Ff(.)e(.)i(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f (.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.) f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)20 b Fe(51)1012 499 y Fg(PS2)7 b Ff(.)e(.)i(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.) f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h (.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)20 b Fe(51)1012 546 y Fg(PS3)7 b Ff(.)e(.)i(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.) f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h (.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)20 b Fe(56)1012 593 y Fg(PS4)7 b Ff(.)e(.)i(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.) f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h (.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)20 b Fe(56)1012 641 y Fg(PWD)7 b Ff(.)e(.)i(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.) f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h (.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)20 b Fe(56)1012 773 y Fs(R)1012 837 y Fg(RANDOM)5 b Ff(.)t(.)h(.)g(.)h(.)f (.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.) h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)18 b Fe(56)1012 884 y Fg(REPLY)6 b Ff(.)t(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g (.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)19 b Fe(56)1012 1016 y Fs(S)1012 1081 y Fg(SECONDS)t Ff(.)t(.)6 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f (.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.) 17 b Fe(56)1012 1128 y Fg(SHELLOPTS)9 b Ff(.)d(.)g(.)g(.)g(.)g(.)h(.)f (.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.) h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)25 b Fe(56)1012 1175 y Fg(SHLVL)6 b Ff(.)t(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g (.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.) g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)19 b Fe(57)1012 1223 y Fg(show-all-if)o(-a)o(mbi)o(gu)o(ous)8 b Ff(.)f(.)f(.)g(.)g(.)g(.)g (.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)25 b Fe(85)1012 1362 y Fs(T)1012 1426 y Fg(TEXTDOMAIN)8 b Ff(.)e(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.) f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)25 b Fe(7)1012 1474 y Fg(TEXTDOMAIND)o(IR)6 b Ff(.)g(.)g(.)g(.)g(.)g(.)h (.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.) h(.)f(.)g(.)g(.)g(.)g(.)h(.)22 b Fe(7)1012 1521 y Fg(TIMEFORMAT)8 b Ff(.)e(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)24 b Fe(57)1012 1569 y Fg(TMOUT)6 b Ff(.)t(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g (.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)19 b Fe(57)1012 1700 y Fs(U)1012 1765 y Fg(UID)7 b Ff(.)e(.)i(.)f(.)g(.)g(.) g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g (.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.) 20 b Fe(57)1012 1897 y Fs(V)1012 1961 y Fg(visible-sta)o(ts)8 b Ff(.)s(.)e(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.) g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)22 b Fe(85)p eop %%Page: 129 131 129 130 bop 75 -58 a Fu(F)l(unction)16 b(Index)1432 b(129)75 149 y Fq(F)-7 b(unction)26 b(Index)75 307 y Fs(A)75 376 y Fg(abort)11 b(\(C-g\))5 b Ff(.)t(.)h(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g (.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.) g(.)g(.)g(.)h(.)f(.)17 b Fe(96)75 426 y Fg(accept-lin)o(e)10 b(\(Newline)f(or)j(Return\))6 b Ff(.)t(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g (.)g(.)g(.)19 b Fe(90)75 475 y Fg(alias-expa)o(nd)o(-li)o(ne)9 b(\(\))e Ff(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g (.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)20 b Fe(97)75 627 y Fs(B)75 696 y Fg(backward-c)o(ha)o(r)10 b(\(C-b\))e Ff(.)t(.)e(.)g(.)g(.)h(.)f (.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.) 21 b Fe(90)75 745 y Fg(backward-d)o(el)o(ete)o(-c)o(har)9 b(\(Rubout\))e Ff(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)22 b Fe(92)75 795 y Fg(backward-k)o(il)o(l-l)o(in)o(e)10 b(\(C-x)h(Rubout\))e Ff(.)d(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)24 b Fe(93)75 844 y Fg(backward-k)o(il)o(l-w)o(or)o(d)10 b(\(M-)501 842 y Fi(h)p 512 816 73 2 v 512 844 a Fh(DEL)p 512 852 V 583 842 a Fi(i)598 844 y Fg(\))g Ff(.)c(.)g(.)g(.)g(.)g(.)h (.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)23 b Fe(93)75 894 y Fg(backward-w)o(or)o (d)10 b(\(M-b\))e Ff(.)t(.)e(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.) f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)21 b Fe(90)75 944 y Fg(beginning-)o(of)o(-hi)o(st)o(ory)9 b(\(M-<\))h Ff(.)c(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)25 b Fe(91)75 993 y Fg(beginning-)o(of)o(-li)o(ne)9 b(\(C-a\))c Ff(.)t(.)i(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g (.)g(.)g(.)18 b Fe(90)75 1144 y Fs(C)75 1213 y Fg(call-last-)o(kb)o (d-m)o(ac)o(ro)9 b(\(C-x)j(e\))5 b Ff(.)h(.)g(.)g(.)g(.)g(.)g(.)h(.)f (.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)18 b Fe(95)75 1263 y Fg(capitalize)o(-w) o(ord)9 b(\(M-c\))d Ff(.)f(.)h(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g (.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)19 b Fe(92)75 1313 y Fg(character-)o(se)o(arc)o(h)10 b(\(C-]\))c Ff(.)t(.)g(.)g(.)g (.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)18 b Fe(96)75 1362 y Fg(character-)o(se)o(arc)o(h-)o(bac)o(kwa)o(rd)9 b(\(M-C-]\))e Ff(.)s(.)g(.)f(.)g(.)g(.)g(.)g(.)g(.)20 b Fe(96)75 1412 y Fg(clear-scre)o(en)9 b(\(C-l\))g Ff(.)t(.)d(.)g(.)g (.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) g(.)h(.)f(.)21 b Fe(90)75 1461 y Fg(complete)10 b(\()265 1459 y Fi(h)p 276 1433 74 2 v 276 1461 a Fh(T)m(AB)p 276 1469 V 348 1459 a Fi(i)363 1461 y Fg(\))f Ff(.)e(.)f(.)g(.)g(.)g(.) g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g (.)g(.)g(.)h(.)22 b Fe(94)75 1511 y Fg(complete-c)o(om)o(man)o(d)10 b(\(M-!\))c Ff(.)t(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h (.)f(.)g(.)g(.)g(.)g(.)h(.)18 b Fe(95)75 1561 y Fg(complete-f)o(il)o (ena)o(me)9 b(\(M-/\))c Ff(.)t(.)i(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g (.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)18 b Fe(94)75 1610 y Fg(complete-h)o(os)o(tna)o(me)9 b(\(M-@\))c Ff(.)t(.)i(.)f(.)g(.)g(.) g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)18 b Fe(95)75 1660 y Fg(complete-i)o(nt)o(o-b)o(ra)o(ces)9 b(\(M-{\))h Ff(.)c(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g (.)g(.)25 b Fe(95)75 1710 y Fg(complete-u)o(se)o(rna)o(me)9 b(\(M-~\))c Ff(.)t(.)i(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h (.)f(.)g(.)g(.)g(.)g(.)18 b Fe(95)75 1759 y Fg(complete-v)o(ar)o(iab)o (le)9 b(\(M-$\))c Ff(.)t(.)i(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) g(.)h(.)f(.)g(.)g(.)g(.)g(.)18 b Fe(95)75 1809 y Fg(copy-backw)o(ar)o (d-w)o(or)o(d)10 b(\(\))c Ff(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)19 b Fe(93)75 1858 y Fg(copy-forwa)o(rd)o(-wo)o(rd)9 b(\(\))e Ff(.)f(.)g(.)g(.)g(.)g (.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) 20 b Fe(93)75 1908 y Fg(copy-regio)o(n-)o(as-)o(ki)o(ll)9 b(\(\))d Ff(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f (.)g(.)g(.)g(.)g(.)h(.)18 b Fe(93)75 2059 y Fs(D)75 2128 y Fg(delete-cha)o(r)10 b(\(C-d\))d Ff(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)g (.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.) 22 b Fe(92)75 2178 y Fg(delete-cha)o(r-)o(or-)o(li)o(st)9 b(\(\))d Ff(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f (.)g(.)g(.)g(.)g(.)h(.)18 b Fe(94)75 2227 y Fg(delete-hor)o(iz)o(ont)o (al)o(-sp)o(ace)9 b(\(\))i Ff(.)6 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h (.)f(.)g(.)g(.)g(.)g(.)25 b Fe(93)75 2277 y Fg(digit-argu)o(me)o(nt)9 b(\()p Fc(M-0)p Fg(,)i Fc(M-1)p Fg(,)h(...)f Fc(M--)p Fg(\))c Ff(.)e(.)h(.)g(.)g(.)h(.)f(.)g(.)g(.)20 b Fe(93)75 2327 y Fg(display-sh)o(el)o(l-v)o(er)o(sio)o(n)10 b(\(C-x)h(C-v\))f Ff(.)c(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)24 b Fe(97)75 2376 y Fg(do-upperca)o(se)o(-ve)o(rs)o(ion)9 b(\(M-a,)i(M-b,)g(M-)p Fb(x)p Fg(,)h(...)o(\))159 2422 y Ff(.)6 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g (.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.) g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)20 b Fe(96)75 2472 y Fg(downcase-w)o(or)o(d)10 b(\(M-l\))e Ff(.)t(.)e(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g (.)h(.)f(.)g(.)g(.)g(.)g(.)21 b Fe(92)75 2521 y Fg(dump-funct)o(io)o (ns)9 b(\(\))g Ff(.)d(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g (.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)22 b Fe(97)75 2571 y Fg(dump-macro)o(s)10 b(\(\))g Ff(.)c(.)h(.)f(.)g(.)g (.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.) g(.)g(.)g(.)g(.)h(.)f(.)24 b Fe(97)75 2620 y Fg(dump-varia)o(bl)o(es)9 b(\(\))g Ff(.)d(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g (.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)22 b Fe(97)75 2670 y Fg(dynamic-co)o(mp)o(let)o(e-)o(his)o(tor)o(y)10 b(\(M-)619 2668 y Fi(h)p 629 2642 V 629 2670 a Fh(T)m(AB)p 629 2678 V 701 2668 a Fi(i)716 2670 y Fg(\))c Ff(.)g(.)g(.)g(.)g(.)g(.) g(.)h(.)18 b Fe(95)1012 307 y Fs(E)1012 369 y Fg(emacs-editi)o(ng)o (-mo)o(de)9 b(\(C-e\))t Ff(.)c(.)h(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g (.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)18 b Fe(98)1012 415 y Fg(end-kbd-mac)o(ro)9 b(\(C-x)i(\)\))e Ff(.)e(.)f(.)g(.)g(.)g(.)g(.)h (.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)23 b Fe(95)1012 461 y Fg(end-of-hist)o(or)o(y)10 b(\(M->\))d Ff(.)t(.)f(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f (.)g(.)g(.)g(.)g(.)h(.)20 b Fe(91)1012 507 y Fg(end-of-line)9 b(\(C-e\))e Ff(.)f(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h (.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)23 b Fe(90)1012 553 y Fg(exchange-po)o(in)o(t-a)o(nd)o(-ma)o(rk)9 b(\(C-x)j(C-x\))c Ff(.)e(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)24 b Fe(96)1012 684 y Fs(F)1012 746 y Fg(forward-bac)o(kw)o(ard)o(-d)o(ele)o(te)o(-ch)o (ar)9 b(\(\))f Ff(.)e(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)22 b Fe(92)1012 792 y Fg(forward-cha)o(r)10 b(\(C-f\))f Ff(.)s(.)e(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g (.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)22 b Fe(90)1012 838 y Fg(forward-sea)o(rc)o(h-h)o(is)o(tor)o(y)10 b(\(C-s\))e Ff(.)e(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)24 b Fe(91)1012 884 y Fg(forward-wor)o(d)10 b(\(M-f\))f Ff(.)s(.)e(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g (.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)22 b Fe(90)1012 1008 y Fs(G)1012 1069 y Fg(glob-expand)o(-w)o(ord)9 b(\(C-x)i(*\))d Ff(.)d(.)h(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g (.)g(.)21 b Fe(97)1012 1115 y Fg(glob-list-e)o(xp)o(ans)o(io)o(ns)9 b(\(C-x)j(g\))5 b Ff(.)g(.)h(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.) f(.)g(.)18 b Fe(97)1012 1247 y Fs(H)1012 1308 y Fg(history-and)o(-a)o (lia)o(s-)o(exp)o(an)o(d-l)o(ine)9 b(\(\))e Ff(.)f(.)g(.)g(.)g(.)h(.)f (.)g(.)g(.)g(.)21 b Fe(97)1012 1354 y Fg(history-exp)o(an)o(d-l)o(in)o (e)10 b(\(M-^\))s Ff(.)5 b(.)h(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g (.)h(.)f(.)g(.)g(.)g(.)17 b Fe(97)1012 1400 y Fg(history-sea)o(rc)o (h-b)o(ac)o(kwa)o(rd)9 b(\(\))i Ff(.)c(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g (.)g(.)g(.)g(.)g(.)h(.)f(.)25 b Fe(91)1012 1446 y Fg(history-sea)o(rc)o (h-f)o(or)o(war)o(d)10 b(\(\))s Ff(.)c(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g (.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)17 b Fe(91)1012 1578 y Fs(I)1012 1639 y Fg(insert-comm)o(en)o(t)10 b(\(M-#\))d Ff(.)t(.)f(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f (.)g(.)g(.)g(.)g(.)h(.)20 b Fe(96)1012 1685 y Fg(insert-comp)o(le)o (tio)o(ns)9 b(\(M-*\))t Ff(.)c(.)h(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g (.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)18 b Fe(94)1012 1731 y Fg(insert-last)o(-a)o(rgu)o(me)o(nt)9 b(\(M-.)j(or)g(M-_\))5 b Ff(.)t(.)h(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)18 b Fe(97)1012 1863 y Fs(K)1012 1924 y Fg(kill-line)10 b(\(C-k\))f Ff(.)d(.)g(.)g(.)g (.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.) g(.)g(.)g(.)h(.)f(.)g(.)24 b Fe(92)1012 1970 y Fg(kill-region)9 b(\(\))i Ff(.)6 b(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g (.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)25 b Fe(93)1012 2016 y Fg(kill-whole-)o(li)o(ne)9 b(\(\))g Ff(.)c(.)i(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g (.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)22 b Fe(93)1012 2062 y Fg(kill-word)10 b(\(M-d\))f Ff(.)d(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g (.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.) 24 b Fe(93)1012 2186 y Fs(M)1012 2248 y Fg(magic-space)9 b(\(\))i Ff(.)6 b(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g (.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)25 b Fe(97)1012 2294 y Fg(menu-comple)o(te)9 b(\(\))g Ff(.)e(.)f(.)g(.)g (.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.) g(.)g(.)g(.)g(.)h(.)23 b Fe(94)1012 2425 y Fs(N)1012 2487 y Fg(next-histor)o(y)10 b(\(C-n\))f Ff(.)s(.)e(.)f(.)g(.)g(.)g(.)g (.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) 22 b Fe(91)1012 2533 y Fg(non-increme)o(nt)o(al-)o(fo)o(rwa)o(rd)o(-se) o(arc)o(h-)o(his)o(to)o(ry)10 b(\(M-n\))1096 2578 y Ff(.)c(.)h(.)f(.)g (.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.) f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h (.)20 b Fe(91)1012 2624 y Fg(non-increme)o(nt)o(al-)o(re)o(ver)o(se)o (-se)o(arc)o(h-)o(his)o(to)o(ry)10 b(\(M-p\))1096 2670 y Ff(.)c(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.) g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f (.)g(.)g(.)g(.)g(.)h(.)20 b Fe(91)p eop %%Page: 130 132 130 131 bop 75 -58 a Fu(130)1262 b(Bash)15 b(Reference)h(Man)o(ual)75 149 y Fs(O)75 215 y Fg(operate-an)o(d-)o(get)o(-n)o(ext)9 b(\(C-o\))h Ff(.)c(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g (.)g(.)25 b Fe(97)75 358 y Fs(P)75 424 y Fg(possible-c)o(om)o(man)o(d-) o(com)o(ple)o(ti)o(ons)9 b(\(C-x)i(!\))d Ff(.)e(.)g(.)g(.)g(.)g(.)21 b Fe(95)75 472 y Fg(possible-c)o(om)o(ple)o(ti)o(ons)9 b(\(M-?\))h Ff(.)c(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g (.)g(.)25 b Fe(94)75 520 y Fg(possible-f)o(il)o(ena)o(me)o(-co)o(mpl)o (et)o(ion)o(s)10 b(\(C-x)h(/\))c Ff(.)f(.)g(.)g(.)g(.)20 b Fe(94)75 568 y Fg(possible-h)o(os)o(tna)o(me)o(-co)o(mpl)o(et)o(ion)o (s)10 b(\(C-x)h(@\))c Ff(.)f(.)g(.)g(.)g(.)20 b Fe(95)75 616 y Fg(possible-u)o(se)o(rna)o(me)o(-co)o(mpl)o(et)o(ion)o(s)10 b(\(C-x)h(~\))c Ff(.)f(.)g(.)g(.)g(.)20 b Fe(95)75 664 y Fg(possible-v)o(ar)o(iab)o(le)o(-co)o(mpl)o(et)o(ion)o(s)10 b(\(C-x)h($\))c Ff(.)f(.)g(.)g(.)g(.)20 b Fe(95)75 712 y Fg(prefix-met)o(a)10 b(\()324 710 y Fi(h)p 335 684 70 2 v 335 712 a Fh(ESC)p 335 720 V 402 710 a Fi(i)417 712 y Fg(\))g Ff(.)c(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.) g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)23 b Fe(96)75 760 y Fg(previous-h)o(is)o(tor)o(y)10 b(\(C-p\))c Ff(.)t(.)g(.)g(.)g(.) g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)18 b Fe(90)75 903 y Fs(Q)75 969 y Fg(quoted-ins)o(er)o(t)10 b(\(C-q)h(or)h(C-v\))c Ff(.)e(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g (.)g(.)g(.)g(.)h(.)f(.)22 b Fe(92)75 1111 y Fs(R)75 1177 y Fg(re-read-in)o(it)o(-fi)o(le)9 b(\(C-x)i(C-r\))5 b Ff(.)h(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)18 b Fe(96)75 1225 y Fg(redraw-cur)o(re)o(nt-)o(li)o(ne)9 b(\(\))d Ff(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f (.)g(.)g(.)g(.)g(.)h(.)18 b Fe(90)75 1273 y Fg(reverse-se)o(ar)o(ch-)o (hi)o(sto)o(ry)9 b(\(C-r\))g Ff(.)d(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g (.)h(.)f(.)g(.)23 b Fe(91)75 1321 y Fg(revert-lin)o(e)10 b(\(M-r\))d Ff(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g (.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)22 b Fe(96)1012 149 y Fs(S)1012 210 y Fg(self-insert)9 b(\(a,)j(b,)g(A,)g(1,)g(!,)g (...)o(\))6 b Ff(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)20 b Fe(92)1012 256 y Fg(set-mark)10 b(\(C-@\))g Ff(.)c(.)g(.)g(.)g(.)g(.) h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g (.)h(.)f(.)g(.)g(.)g(.)25 b Fe(96)1012 302 y Fg(shell-expan)o(d-)o(lin) o(e)10 b(\(M-C-e\))s Ff(.)t(.)c(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g (.)h(.)f(.)g(.)g(.)g(.)17 b Fe(97)1012 347 y Fg(start-kbd-m)o(ac)o(ro)9 b(\(C-x)j(\(\))c Ff(.)d(.)i(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g (.)g(.)h(.)f(.)g(.)g(.)g(.)22 b Fe(95)1012 469 y Fs(T)1012 530 y Fg(tilde-expan)o(d)10 b(\(M-&\))f Ff(.)s(.)e(.)f(.)g(.)g(.)g(.)g (.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) 22 b Fe(96)1012 576 y Fg(transpose-c)o(ha)o(rs)9 b(\(C-t\))d Ff(.)f(.)h(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h (.)f(.)g(.)g(.)g(.)20 b Fe(92)1012 621 y Fg(transpose-w)o(or)o(ds)9 b(\(M-t\))d Ff(.)f(.)h(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g (.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)20 b Fe(92)1012 751 y Fs(U)1012 811 y Fg(undo)12 b(\(C-_)f(or)h(C-x)g(C-u\))c Ff(.)t(.)e(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g (.)g(.)h(.)f(.)g(.)g(.)21 b Fe(96)1012 857 y Fg(universal-a)o(rg)o(ume) o(nt)9 b(\(\))d Ff(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g (.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)20 b Fe(94)1012 903 y Fg(unix-line-d)o(is)o(car)o(d)10 b(\(C-u\))5 b Ff(.)t(.)h(.)g(.)g(.)g (.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)18 b Fe(93)1012 948 y Fg(unix-word-r)o(ub)o(out)9 b(\(C-w\))d Ff(.)t(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g (.)h(.)f(.)g(.)19 b Fe(93)1012 994 y Fg(upcase-word)9 b(\(M-u\))e Ff(.)f(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h (.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)23 b Fe(92)1012 1124 y Fs(Y)1012 1184 y Fg(yank)12 b(\(C-y\))5 b Ff(.)t(.)h(.)g(.)h(.)f (.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.) f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)19 b Fe(93)1012 1230 y Fg(yank-last-a)o(rg)9 b(\(M-.)i(or)h(M-_\))c Ff(.)f(.)f(.)g(.)g (.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)23 b Fe(91)1012 1276 y Fg(yank-nth-ar)o(g)10 b(\(M-C-y\))d Ff(.)s(.)f(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f (.)g(.)g(.)g(.)g(.)h(.)20 b Fe(91)1012 1321 y Fg(yank-pop)10 b(\(M-y\))g Ff(.)c(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g (.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)25 b Fe(93)p eop %%Page: 131 133 131 132 bop 75 -58 a Fu(Concept)15 b(Index)1443 b(131)75 149 y Fq(Concept)27 b(Index)75 321 y Fs(A)75 383 y Fe(alias)15 b(expansion)d Ff(.)6 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g (.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)22 b Fe(67)75 429 y(arithmetic)15 b(ev)n(aluation)f Ff(.)7 b(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g (.)h(.)f(.)g(.)g(.)g(.)25 b Fe(66)75 475 y(arithmetic)15 b(expansion)6 b Ff(.)i(.)f(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g (.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)19 b Fe(19)75 521 y(arithmetic,)14 b(shell)e Ff(.)6 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g (.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) g(.)h(.)22 b Fe(66)75 567 y(arra)o(ys)s Ff(.)7 b(.)f(.)g(.)h(.)f(.)g(.) g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g (.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)16 b Fe(68)75 698 y Fs(B)75 760 y Fe(bac)o(kground)e Ff(.)6 b(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g (.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)25 b Fe(75)75 806 y(Bash)14 b(con\014guration)5 b Ff(.)k(.)d(.)g(.)g(.)h (.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) g(.)h(.)f(.)18 b Fe(109)75 852 y(Bash)c(installation)t Ff(.)9 b(.)d(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)16 b Fe(109)75 899 y(Bourne)e(shell)5 b Ff(.)j(.)e(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f (.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.) f(.)g(.)g(.)g(.)g(.)18 b Fe(5)75 945 y(brace)13 b(expansion)h Ff(.)7 b(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.) g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)24 b Fe(15)75 991 y(builtin)9 b Ff(.)g(.)d(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g (.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.) g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)21 b Fe(3)75 1115 y Fs(C)75 1177 y Fe(command)14 b(editing)e Ff(.)6 b(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g (.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)22 b Fe(79)75 1223 y(command)14 b(execution)6 b Ff(.)i(.)e(.)g(.)g(.)g(.)h(.)f(.)g(.) g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)18 b Fe(26)75 1269 y(command)c(expansion)g Ff(.)6 b(.)g(.)g(.)h(.)f(.)g(.) g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f (.)24 b Fe(25)75 1316 y(command)14 b(history)8 b Ff(.)g(.)e(.)g(.)g(.)g (.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) g(.)h(.)f(.)g(.)21 b Fe(103)75 1362 y(command)14 b(searc)o(h)6 b Ff(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)19 b Fe(26)75 1408 y(command)14 b(substitution)h Ff(.)6 b(.)g(.)g(.)g(.)h(.) f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)25 b Fe(19)75 1454 y(command)14 b(timing)t Ff(.)8 b(.)e(.)g(.)g(.)h(.)f(.) g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h (.)f(.)g(.)g(.)g(.)g(.)17 b Fe(8)75 1500 y(commands,)d(conditional)7 b Ff(.)i(.)d(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.) f(.)g(.)g(.)g(.)g(.)h(.)19 b Fe(10)75 1546 y(commands,)14 b(grouping)8 b Ff(.)g(.)e(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f (.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)20 b Fe(12)75 1592 y(commands,)14 b(lists)s Ff(.)8 b(.)e(.)g(.)g(.)g(.)g(.)h(.)f(.)g (.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.) f(.)g(.)g(.)g(.)16 b Fe(8)75 1639 y(commands,)e(lo)q(oping)g Ff(.)6 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.) h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)24 b Fe(9)75 1685 y(commands,)14 b(pip)q(elines)9 b Ff(.)g(.)d(.)g(.)g(.)h(.)f(.)g (.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.) f(.)21 b Fe(8)75 1731 y(commands,)14 b(shell)8 b Ff(.)g(.)e(.)g(.)g(.)h (.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) g(.)h(.)f(.)g(.)g(.)g(.)g(.)21 b Fe(7)75 1777 y(commands,)14 b(simple)e Ff(.)6 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g (.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)23 b Fe(8)75 1823 y(commen)o(ts,)13 b(shell)t Ff(.)8 b(.)e(.)g(.)g(.)h(.)f (.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.) f(.)g(.)g(.)g(.)g(.)h(.)f(.)16 b Fe(7)75 1869 y(completion)f(builtins)g Ff(.)6 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.) h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)24 b Fe(99)75 1915 y(con\014guration)8 b Ff(.)h(.)d(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g (.)g(.)21 b Fe(109)75 1962 y(con)o(trol)14 b(op)q(erator)d Ff(.)c(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g (.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)23 b Fe(3)75 2093 y Fs(D)75 2154 y Fe(directory)14 b(stac)o(k)f Ff(.)6 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.) g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)25 b Fe(69)75 2285 y Fs(E)75 2347 y Fe(editing)15 b(command)f(lines)f Ff(.)6 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.) h(.)f(.)g(.)g(.)g(.)g(.)24 b Fe(79)75 2393 y(en)o(vironmen)o(t)5 b Ff(.)j(.)e(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.) g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)18 b Fe(27)75 2439 y(ev)n(aluation,)d(arithmetic)7 b Ff(.)h(.)e(.)g(.)g(.) h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g (.)h(.)19 b Fe(66)75 2485 y(ev)o(en)o(t)13 b(designators)c Ff(.)g(.)d(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g (.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)22 b Fe(105)75 2532 y(execution)15 b(en)o(vironmen)o(t)d Ff(.)6 b(.)g(.)g(.)g(.)h(.)f (.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)23 b Fe(26)75 2578 y(exit)14 b(status)9 b Ff(.)d(.)g(.)g(.)h(.)f(.)g(.)g (.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.) g(.)g(.)g(.)h(.)f(.)g(.)g(.)22 b Fe(3,)12 b(28)75 2624 y(expansion)c Ff(.)h(.)d(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.) g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f (.)g(.)g(.)g(.)21 b Fe(15)75 2670 y(expansion,)15 b(arithmetic)d Ff(.)6 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.) g(.)h(.)f(.)g(.)g(.)g(.)g(.)23 b Fe(19)1012 321 y(expansion,)15 b(brace)6 b Ff(.)h(.)f(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g (.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)19 b Fe(15)1012 370 y(expansion,)c(\014lename)9 b Ff(.)f(.)e(.)g(.)g(.)h (.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.) h(.)f(.)g(.)22 b Fe(20)1012 419 y(expansion,)15 b(parameter)d Ff(.)6 b(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.) g(.)g(.)g(.)g(.)g(.)h(.)f(.)24 b Fe(17)1012 468 y(expansion,)15 b(pathname)t Ff(.)8 b(.)e(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g (.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)17 b Fe(20)1012 517 y(expansion,)e(tilde)t Ff(.)9 b(.)d(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g (.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.) g(.)g(.)18 b Fe(16)1012 565 y(expressions,)d(arithmetic)8 b Ff(.)g(.)e(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.) g(.)g(.)g(.)g(.)h(.)f(.)21 b Fe(66)1012 614 y(expressions,)15 b(conditional)g Ff(.)6 b(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.) h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)24 b Fe(64)1012 760 y Fs(F)1012 828 y Fe(\014eld)13 b Ff(.)6 b(.)g(.)g(.)g(.)g(.)h(.)f(.)g (.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.) f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)24 b Fe(3)1012 877 y(\014lename)t Ff(.)8 b(.)e(.)g(.)h(.)f(.)g(.)g(.)g(.)g (.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)17 b Fe(3)1012 925 y(\014lename)e(expansion)5 b Ff(.)k(.)d(.)g(.)g(.)g(.)g(.)h(.)f(.)g (.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.) 18 b Fe(20)1012 974 y(foreground)12 b Ff(.)6 b(.)g(.)g(.)g(.)g(.)h(.)f (.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.) h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)23 b Fe(75)1012 1023 y(functions,)15 b(shell)d Ff(.)6 b(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g (.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.) f(.)g(.)24 b Fe(12)1012 1169 y Fs(H)1012 1237 y Fe(history)15 b(builtins)8 b Ff(.)h(.)d(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g (.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)21 b Fe(103)1012 1285 y(history)15 b(ev)o(en)o(ts)c Ff(.)6 b(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h (.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)23 b Fe(105)1012 1334 y(history)15 b(expansion)6 b Ff(.)j(.)d(.)g(.)g(.)h(.)f(.)g(.)g(.) g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g (.)19 b Fe(105)1012 1383 y(history)c(list)9 b Ff(.)e(.)g(.)f(.)g(.)g(.) g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g (.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)22 b Fe(103)1012 1432 y(History)m(,)14 b(ho)o(w)f(to)g(use)d Ff(.)c(.)g(.)g(.)h(.)f(.)g (.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.) f(.)22 b Fe(102)1012 1578 y Fs(I)1012 1645 y Fe(iden)o(ti\014er)8 b Ff(.)h(.)d(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.) h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g (.)h(.)f(.)21 b Fe(3)1012 1694 y(initial)q(izati)q(on)16 b(\014le,)e(readline)t Ff(.)8 b(.)e(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h (.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)17 b Fe(82)1012 1743 y(installati)q(on)6 b Ff(.)j(.)d(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g (.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) g(.)g(.)h(.)f(.)g(.)18 b Fe(109)1012 1792 y(in)o(teraction,)d(readline) 5 b Ff(.)j(.)e(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f (.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)18 b Fe(79)1012 1841 y(in)o(teractiv)o(e)d(shell)d Ff(.)6 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g (.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) 23 b Fe(60,)13 b(63)1012 1890 y(in)o(ternational)q(i)q(zatio)q(n)f Ff(.)6 b(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.) g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)23 b Fe(7)1012 2029 y Fs(J)1012 2097 y Fe(job)11 b Ff(.)c(.)f(.)g(.)g(.)g(.)g(.)h(.)f (.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.) h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)24 b Fe(3)1012 2145 y(job)13 b(con)o(trol)6 b Ff(.)i(.)e(.)g(.)h(.)f(.)g (.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.) f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)19 b Fe(3,)13 b(75)1012 2291 y Fs(K)1012 2359 y Fe(kill)i(ring)7 b Ff(.)h(.)e(.)g(.)g(.)h(.)f (.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.) h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)20 b Fe(81)1012 2408 y(killin)q(g)c(text)8 b Ff(.)e(.)g(.)h(.)f(.)g(.)g(.) g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g (.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)22 b Fe(80)1012 2554 y Fs(L)1012 2621 y Fe(lo)q(calizati)q(on)6 b Ff(.)i(.)f(.)f(.)g(.) g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g (.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)18 b Fe(7)1012 2670 y(login)d(shell)7 b Ff(.)h(.)e(.)g(.)g(.)g(.)h(.)f(.)g (.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.) g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)20 b Fe(60)p eop %%Page: 132 134 132 133 bop 75 -58 a Fu(132)1262 b(Bash)15 b(Reference)h(Man)o(ual)75 149 y Fs(M)75 218 y Fe(matc)o(hing,)e(pattern)s Ff(.)8 b(.)e(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g (.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)16 b Fe(21)75 268 y(metac)o(haracter)9 b Ff(.)e(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g (.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) g(.)g(.)h(.)f(.)21 b Fe(3)75 411 y Fs(N)75 480 y Fe(name)11 b Ff(.)6 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g (.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) g(.)h(.)f(.)g(.)g(.)g(.)23 b Fe(3)75 529 y(nativ)o(e)14 b(languages)7 b Ff(.)i(.)d(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f (.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)20 b Fe(7)75 579 y(notation,)14 b(readline)6 b Ff(.)j(.)d(.)g(.)g(.)h(.)f (.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.) h(.)f(.)g(.)g(.)19 b Fe(79)75 728 y Fs(O)75 797 y Fe(op)q(erator,)14 b(shell)8 b Ff(.)f(.)f(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g (.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.) 20 b Fe(3)75 946 y Fs(P)75 1015 y Fe(parameter)14 b(expansion)7 b Ff(.)h(.)f(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.) g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)20 b Fe(17)75 1064 y(parameters)7 b Ff(.)g(.)f(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.) f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)20 b Fe(13)75 1114 y(parameters,)13 b(p)q(ositional)5 b Ff(.)k(.)e(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g (.)g(.)g(.)g(.)h(.)f(.)g(.)17 b Fe(14)75 1163 y(parameters,)c(sp)q (ecial)h Ff(.)7 b(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f (.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)25 b Fe(14)75 1213 y(pathname)14 b(expansion)e Ff(.)6 b(.)g(.)h(.)f(.)g(.)g(.)g(.)g (.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)22 b Fe(20)75 1262 y(pattern)14 b(matc)o(hing)9 b Ff(.)e(.)f(.)h(.)f(.)g (.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.) f(.)g(.)g(.)g(.)g(.)22 b Fe(21)75 1312 y(pip)q(eline)8 b Ff(.)h(.)d(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.) h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g (.)g(.)h(.)f(.)20 b Fe(8)75 1361 y(POSIX)t Ff(.)6 b(.)g(.)h(.)f(.)g(.)g (.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.) g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)17 b Fe(3)75 1411 y(POSIX)c(Mo)q(de)5 b Ff(.)i(.)f(.)g(.)g(.)g(.)g(.)h(.)f (.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.) h(.)f(.)g(.)g(.)g(.)g(.)18 b Fe(72)75 1460 y(pro)q(cess)c(group)t Ff(.)7 b(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)16 b Fe(3)75 1510 y(pro)q(cess)e(group)g(ID)e Ff(.)6 b(.)g(.)g(.)h(.)f(.)g (.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.) f(.)g(.)g(.)g(.)g(.)25 b Fe(3)75 1559 y(pro)q(cess)14 b(substitution)5 b Ff(.)k(.)d(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g (.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)18 b Fe(20)75 1609 y(programmable)d(completion)8 b Ff(.)h(.)d(.)g(.)g(.)h (.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)21 b Fe(98)75 1658 y(prompting)s Ff(.)9 b(.)d(.)g(.)g(.)g(.)g(.)h(.)f(.)g (.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.) f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)16 b Fe(70)75 1808 y Fs(Q)75 1877 y Fe(quoting)c Ff(.)6 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g (.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)22 b Fe(6)75 1926 y(quoting,)14 b(ANSI)6 b Ff(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.) g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f (.)g(.)g(.)g(.)g(.)19 b Fe(6)1012 149 y Fs(R)1012 210 y Fe(Readline,)c(ho)o(w)e(to)g(use)7 b Ff(.)g(.)f(.)g(.)h(.)f(.)g(.)g (.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.) 20 b Fe(78)1012 256 y(redirection)13 b Ff(.)6 b(.)g(.)h(.)f(.)g(.)g(.)g (.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.) g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)24 b Fe(22)1012 302 y(reserv)o(ed)14 b(w)o(ord)e Ff(.)6 b(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h (.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) g(.)h(.)f(.)g(.)g(.)25 b Fe(3)1012 347 y(restricted)14 b(shell)t Ff(.)9 b(.)d(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g (.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)18 b Fe(71)1012 393 y(return)c(status)c Ff(.)c(.)g(.)h(.)f(.)g(.)g(.)g(.)g (.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) g(.)g(.)h(.)f(.)g(.)g(.)g(.)23 b Fe(3)1012 515 y Fs(S)1012 576 y Fe(shell)15 b(arithmetic)6 b Ff(.)i(.)e(.)g(.)h(.)f(.)g(.)g(.)g (.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) g(.)g(.)g(.)h(.)19 b Fe(66)1012 621 y(shell)c(function)5 b Ff(.)j(.)e(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.) g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)19 b Fe(12)1012 667 y(shell)c(script)9 b Ff(.)e(.)g(.)f(.)g(.)g(.)g(.)g(.) h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g (.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)22 b Fe(29)1012 713 y(shell)15 b(v)n(ariable)9 b Ff(.)f(.)e(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h (.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.) h(.)f(.)g(.)g(.)22 b Fe(13)1012 758 y(shell,)15 b(in)o(teractiv)o(e)8 b Ff(.)g(.)e(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.) f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)22 b Fe(63)1012 804 y(signal)7 b Ff(.)i(.)d(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g (.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.) g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)20 b Fe(4)1012 850 y(signal)15 b(handling)e Ff(.)6 b(.)g(.)g(.)g(.)h(.)f(.)g (.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.) f(.)g(.)g(.)g(.)g(.)23 b Fe(28)1012 895 y(sp)q(ecial)15 b(builtin)7 b Ff(.)i(.)d(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.) h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)19 b Fe(4,)13 b(49)1012 941 y(startup)h(\014les)d Ff(.)6 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f (.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)23 b Fe(61)1012 987 y(susp)q(ending)16 b(jobs)t Ff(.)6 b(.)h(.)f(.)g(.)g (.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.) g(.)g(.)g(.)g(.)h(.)f(.)g(.)17 b Fe(75)1012 1115 y Fs(T)1012 1176 y Fe(tilde)e(expansion)d Ff(.)6 b(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h (.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.) h(.)f(.)g(.)23 b Fe(16)1012 1222 y(tok)o(en)9 b Ff(.)f(.)e(.)g(.)g(.)g (.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.) g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)22 b Fe(4)1012 1267 y(translation,)15 b(nativ)o(e)g(languages)t Ff(.)9 b(.)d(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) g(.)g(.)18 b Fe(7)1012 1396 y Fs(V)1012 1456 y Fe(v)n(ariable,)d(shell) s Ff(.)8 b(.)f(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g (.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)17 b Fe(13)1012 1502 y(v)n(ariables,)e(readline)s Ff(.)9 b(.)d(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g (.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)17 b Fe(83)1012 1631 y Fs(W)1012 1691 y Fe(w)o(ord)5 b Ff(.)i(.)f(.)g(.)g(.)g(.)g(.)h (.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.) h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)18 b Fe(4)1012 1737 y(w)o(ord)13 b(splitting)h Ff(.)6 b(.)g(.)g(.)g(.)g(.) h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g (.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)24 b Fe(20)1012 1865 y Fs(Y)1012 1926 y Fe(y)o(anking)15 b(text)s Ff(.)7 b(.)f(.)h(.)f(.)g(.)g (.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.) g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)17 b Fe(80)p eop %%Page: -1 135 -1 134 bop 1862 -58 a Fu(i)75 149 y Fq(T)-7 b(able)27 b(of)f(Con)n(ten)n(ts)75 320 y Fs(1)67 b(In)n(tro)r(duction)8 b Fa(.)k(.)e(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.) g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)30 b Fs(1)224 389 y Fu(1.1)45 b(What)15 b(is)g(Bash?)10 b Fn(.)f(.)e(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.) h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h (.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)25 b Fu(1)224 444 y(1.2)45 b(What)15 b(is)g(a)g(shell?)7 b Fn(.)j(.)d(.)h(.)f(.)h(.)f(.)h(.)f(.)h (.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.) h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)21 b Fu(1)75 565 y Fs(2)67 b(De\014nitions)19 b Fa(.)10 b(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f (.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)40 b Fs(3)75 700 y(3)67 b(Basic)22 b(Shell)i(F)-6 b(eatures)6 b Fa(.)11 b(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g (.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)29 b Fs(5)224 768 y Fu(3.1)45 b(Shell)17 b(Syn)o(tax)11 b Fn(.)c(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h (.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.) h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)25 b Fu(5)374 823 y(3.1.1)44 b(Shell)17 b(Op)q(eration)5 b Fn(.)j(.)g(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.) h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)20 b Fu(5)374 878 y(3.1.2)44 b(Quoting)5 b Fn(.)j(.)f(.)h(.)g(.)f(.)h(.)f (.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.) f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)19 b Fu(6)523 933 y(3.1.2.1)44 b(Escap)q(e)15 b(Character)c Fn(.)d(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h (.)f(.)h(.)f(.)h(.)26 b Fu(6)523 988 y(3.1.2.2)44 b(Single)16 b(Quotes)8 b Fn(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f (.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)22 b Fu(6)523 1042 y(3.1.2.3)44 b(Double)15 b(Quotes)7 b Fn(.)h(.)g(.)f(.)h(.)g(.)f (.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.) f(.)22 b Fu(6)523 1097 y(3.1.2.4)44 b(ANSI-C)16 b(Quoting)9 b Fn(.)f(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.) h(.)f(.)h(.)g(.)f(.)h(.)23 b Fu(6)523 1152 y(3.1.2.5)44 b(Lo)q(cale-Sp)q(eci\014c)18 b(T)l(ranslation)6 b Fn(.)i(.)f(.)h(.)f(.) h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)20 b Fu(7)374 1207 y(3.1.3)44 b(Commen)o(ts)11 b Fn(.)d(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.) h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f (.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)27 b Fu(7)224 1262 y(3.2)45 b(Shell)17 b(Commands)11 b Fn(.)d(.)f(.)h(.)f(.)h(.)f(.)h (.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.) h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)26 b Fu(7)374 1316 y(3.2.1)44 b(Simple)17 b(Commands)8 b Fn(.)e(.)i(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h (.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)22 b Fu(8)374 1371 y(3.2.2)44 b(Pip)q(elines)7 b Fn(.)j(.)e(.)f(.)h(.)f(.) h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h (.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)22 b Fu(8)374 1426 y(3.2.3)44 b(Lists)15 b(of)g(Commands)d Fn(.)7 b(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.) h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)27 b Fu(8)374 1481 y(3.2.4)44 b(Lo)q(oping)16 b(Constructs)9 b Fn(.)d(.)i(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.) f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)23 b Fu(9)374 1535 y(3.2.5)44 b(Conditional)16 b(Constructs)5 b Fn(.)i(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.) h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)20 b Fu(10)374 1590 y(3.2.6)44 b(Grouping)15 b(Commands)d Fn(.)c(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g (.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)28 b Fu(12)224 1645 y(3.3)45 b(Shell)17 b(F)l(unctions)t Fn(.)9 b(.)e(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.) h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h (.)f(.)h(.)f(.)h(.)f(.)h(.)19 b Fu(12)224 1700 y(3.4)45 b(Shell)17 b(P)o(arameters)10 b Fn(.)c(.)i(.)f(.)h(.)f(.)h(.)f(.)h(.)f (.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.) f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)25 b Fu(13)374 1755 y(3.4.1)44 b(P)o(ositional)16 b(P)o(arameters)7 b Fn(.)f(.)h(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.) h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)22 b Fu(14)374 1809 y(3.4.2)44 b(Sp)q(ecial)17 b(P)o(arameters)12 b Fn(.)c(.)f(.)h(.)f(.)h (.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.) f(.)h(.)f(.)h(.)f(.)29 b Fu(14)224 1864 y(3.5)45 b(Shell)17 b(Expansions)10 b Fn(.)e(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.) f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h (.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)25 b Fu(15)374 1919 y(3.5.1)44 b(Brace)15 b(Expansion)g Fn(.)8 b(.)f(.)h(.)f(.)h(.)f(.)h(.) f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f (.)h(.)f(.)h(.)f(.)30 b Fu(15)374 1974 y(3.5.2)44 b(Tilde)16 b(Expansion)9 b Fn(.)f(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f (.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.) 24 b Fu(16)374 2029 y(3.5.3)44 b(Shell)17 b(P)o(arameter)d(Expansion)9 b Fn(.)f(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.) f(.)h(.)f(.)h(.)24 b Fu(17)374 2083 y(3.5.4)44 b(Command)14 b(Substitution)i Fn(.)7 b(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f (.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)29 b Fu(19)374 2138 y(3.5.5)44 b(Arithmetic)16 b(Expansion)6 b Fn(.)i(.)g(.)f(.)h(.)f (.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.) h(.)f(.)h(.)21 b Fu(19)374 2193 y(3.5.6)44 b(Pro)q(cess)15 b(Substitution)10 b Fn(.)e(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h (.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)25 b Fu(20)374 2248 y(3.5.7)44 b(W)l(ord)15 b(Splitting)f Fn(.)8 b(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.) h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)28 b Fu(20)374 2303 y(3.5.8)44 b(Filename)16 b(Expansion)e Fn(.)7 b(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.) f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)28 b Fu(20)523 2357 y(3.5.8.1)44 b(P)o(attern)14 b(Matc)o(hing)c Fn(.)d(.)h(.)f(.)h(.) f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)25 b Fu(21)374 2412 y(3.5.9)44 b(Quote)15 b(Remo)o(v)m(al)7 b Fn(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.) f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)23 b Fu(22)224 2467 y(3.6)45 b(Redirections)13 b Fn(.)7 b(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h (.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.) f(.)h(.)f(.)h(.)f(.)h(.)f(.)27 b Fu(22)374 2522 y(3.6.1)44 b(Redirecting)16 b(Input)6 b Fn(.)i(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g (.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.) h(.)f(.)21 b Fu(23)374 2577 y(3.6.2)44 b(Redirecting)16 b(Output)9 b Fn(.)f(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f (.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)24 b Fu(23)374 2631 y(3.6.3)44 b(App)q(ending)17 b(Redirected)f(Output)8 b Fn(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.) f(.)23 b Fu(24)p eop %%Page: -2 136 -2 135 bop 75 -58 a Fu(ii)1307 b(Bash)15 b(Reference)h(Man)o(ual)374 42 y(3.6.4)44 b(Redirecting)16 b(Standard)f(Output)h(and)f(Standard)g (Error)477 96 y Fn(.)8 b(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.) h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h (.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.) 28 b Fu(24)374 151 y(3.6.5)44 b(Here)15 b(Do)q(cumen)o(ts)7 b Fn(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.) g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)22 b Fu(24)374 206 y(3.6.6)44 b(Duplicating)17 b(File)f(Descriptors)9 b Fn(.)e(.)g(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.) f(.)h(.)f(.)24 b Fu(24)374 261 y(3.6.7)44 b(Op)q(ening)17 b(File)f(Descriptors)f(for)g(Reading)g(and)h(W)l(riting)477 315 y Fn(.)8 b(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h (.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.) f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)28 b Fu(25)224 370 y(3.7)45 b(Executing)16 b(Commands)d Fn(.)7 b(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.) f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)28 b Fu(25)374 425 y(3.7.1)44 b(Simple)17 b(Command)d(Expansion)g Fn(.)7 b(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.) h(.)f(.)28 b Fu(25)374 480 y(3.7.2)44 b(Command)14 b(Searc)o(h)i(and)f (Execution)7 b Fn(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f (.)h(.)f(.)22 b Fu(26)374 535 y(3.7.3)44 b(Command)14 b(Execution)i(En)o(vironmen)o(t)9 b Fn(.)f(.)f(.)h(.)f(.)h(.)f(.)h(.)f (.)h(.)g(.)f(.)h(.)f(.)24 b Fu(26)374 589 y(3.7.4)44 b(En)o(vironmen)o(t)11 b Fn(.)c(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f (.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.) f(.)h(.)f(.)h(.)f(.)26 b Fu(27)374 644 y(3.7.5)44 b(Exit)15 b(Status)t Fn(.)7 b(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h (.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.) f(.)h(.)f(.)h(.)19 b Fu(28)374 699 y(3.7.6)44 b(Signals)5 b Fn(.)j(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.) h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f (.)h(.)f(.)h(.)f(.)h(.)20 b Fu(28)224 754 y(3.8)45 b(Shell)17 b(Scripts)11 b Fn(.)d(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f (.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.) g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)26 b Fu(29)75 875 y Fs(4)67 b(Shell)24 b(Builtin)h(Commands)18 b Fa(.)10 b(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)g (.)h(.)41 b Fs(31)224 944 y Fu(4.1)k(Bourne)16 b(Shell)h(Builtins)8 b Fn(.)h(.)f(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.) f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f (.)23 b Fu(31)224 998 y(4.2)45 b(Bash)15 b(Builtin)j(Commands)8 b Fn(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.) f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)24 b Fu(36)224 1053 y(4.3)45 b(The)15 b(Set)h(Builtin)e Fn(.)7 b(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.) h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f (.)h(.)f(.)h(.)f(.)h(.)27 b Fu(46)224 1108 y(4.4)45 b(Sp)q(ecial)17 b(Builtins)11 b Fn(.)f(.)e(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f (.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.) h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)26 b Fu(49)75 1229 y Fs(5)67 b(Shell)24 b(V)-6 b(ariables)5 b Fa(.)11 b(.)g(.)f(.)g(.)g(.) g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g (.)g(.)h(.)f(.)g(.)28 b Fs(51)224 1298 y Fu(5.1)45 b(Bourne)16 b(Shell)h(V)l(ariables)6 b Fn(.)i(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g (.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.) h(.)f(.)h(.)f(.)h(.)f(.)21 b Fu(51)224 1352 y(5.2)45 b(Bash)15 b(V)l(ariables)8 b Fn(.)h(.)f(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h (.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.) f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)24 b Fu(51)75 1474 y Fs(6)67 b(Bash)22 b(F)-6 b(eatures)15 b Fa(.)10 b(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)h (.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)38 b Fs(59)224 1542 y Fu(6.1)45 b(In)o(v)o(oking)16 b(Bash)e Fn(.)8 b(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f (.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.) g(.)f(.)h(.)f(.)h(.)29 b Fu(59)224 1597 y(6.2)45 b(Bash)15 b(Startup)g(Files)f Fn(.)7 b(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.) h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h (.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)28 b Fu(61)224 1652 y(6.3)45 b(In)o(teractiv)o(e)15 b(Shells)7 b Fn(.)j(.)d(.)h(.)f(.)h(.)f(.)h(.)f (.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.) h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)22 b Fu(63)374 1707 y(6.3.1)44 b(What)14 b(is)i(an)f(In)o(teractiv)o(e)h (Shell?)10 b Fn(.)f(.)f(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h (.)g(.)f(.)h(.)f(.)25 b Fu(63)374 1761 y(6.3.2)44 b(Is)15 b(this)h(Shell)h(In)o(teractiv)o(e?)5 b Fn(.)j(.)g(.)f(.)h(.)f(.)h(.)f (.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)20 b Fu(63)374 1816 y(6.3.3)44 b(In)o(teractiv)o(e)15 b(Shell)i(Beha)o (vior)11 b Fn(.)d(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g (.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)26 b Fu(63)224 1871 y(6.4)45 b(Bash)15 b(Conditional)i(Expressions)10 b Fn(.)e(.)f(.)h(.)f(.)h(.)f (.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.) h(.)f(.)h(.)25 b Fu(64)224 1926 y(6.5)45 b(Shell)17 b(Arithmetic)e Fn(.)8 b(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.) h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h (.)f(.)h(.)f(.)h(.)29 b Fu(66)224 1980 y(6.6)45 b(Aliases)13 b Fn(.)7 b(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f (.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.) f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)27 b Fu(67)224 2035 y(6.7)45 b(Arra)o(ys)13 b Fn(.)8 b(.)f(.)h(.)f(.)h(.)f (.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.) h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f (.)h(.)g(.)f(.)h(.)f(.)h(.)29 b Fu(68)224 2090 y(6.8)45 b(The)15 b(Directory)g(Stac)o(k)7 b Fn(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f (.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.) h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)23 b Fu(69)374 2145 y(6.8.1)44 b(Directory)15 b(Stac)o(k)f(Builtins)5 b Fn(.)10 b(.)e(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f (.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)20 b Fu(69)224 2200 y(6.9)45 b(Con)o(trolling)16 b(the)f(Prompt)8 b Fn(.)e(.)i(.)f(.)h(.)f(.)h(.)f (.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.) h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)23 b Fu(70)224 2254 y(6.10)45 b(The)15 b(Restricted)g(Shell)6 b Fn(.)j(.)f(.)f(.)h(.)f(.)h(.)f(.)h(.) f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f (.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)21 b Fu(71)224 2309 y(6.11)45 b(Bash)15 b(POSIX)h(Mo)q(de)8 b Fn(.)g(.)f(.)h(.)f(.)h(.)f(.) h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f (.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)23 b Fu(72)75 2430 y Fs(7)67 b(Job)22 b(Con)n(trol)16 b Fa(.)10 b(.)h(.)f(.)g(.)g(.)h (.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.) g(.)h(.)f(.)g(.)g(.)g(.)39 b Fs(75)224 2499 y Fu(7.1)45 b(Job)15 b(Con)o(trol)g(Basics)c Fn(.)d(.)g(.)g(.)f(.)h(.)f(.)h(.)f(.)h (.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.) h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)26 b Fu(75)224 2554 y(7.2)45 b(Job)15 b(Con)o(trol)g(Builtins)6 b Fn(.)k(.)d(.)h(.)f (.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.) f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)21 b Fu(76)224 2609 y(7.3)45 b(Job)15 b(Con)o(trol)g(V)l(ariables)h Fn(.)7 b(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.) f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)29 b Fu(78)p eop %%Page: -3 137 -3 136 bop 1837 -58 a Fu(iii)75 42 y Fs(8)67 b(Command)22 b(Line)i(Editing)c Fa(.)10 b(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) g(.)h(.)f(.)g(.)g(.)h(.)f(.)41 b Fs(79)224 110 y Fu(8.1)k(In)o(tro)q (duction)16 b(to)f(Line)h(Editing)d Fn(.)8 b(.)f(.)h(.)f(.)h(.)f(.)h(.) f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h (.)g(.)f(.)27 b Fu(79)224 165 y(8.2)45 b(Readline)16 b(In)o(teraction)8 b Fn(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f (.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.) h(.)f(.)h(.)f(.)h(.)f(.)23 b Fu(79)374 220 y(8.2.1)44 b(Readline)16 b(Bare)f(Essen)o(tials)e Fn(.)8 b(.)f(.)h(.)f(.)h(.)f(.)h (.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)27 b Fu(79)374 274 y(8.2.2)44 b(Readline)16 b(Mo)o(v)o(emen)o(t)e (Commands)6 b Fn(.)i(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.) f(.)h(.)f(.)22 b Fu(80)374 329 y(8.2.3)44 b(Readline)16 b(Killing)i(Commands)10 b Fn(.)d(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.) h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)25 b Fu(80)374 384 y(8.2.4)44 b(Readline)16 b(Argumen)o(ts)c Fn(.)7 b(.)h(.)f(.)h(.)f(.)h (.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.) h(.)g(.)f(.)27 b Fu(81)374 439 y(8.2.5)44 b(Searc)o(hing)16 b(for)e(Commands)h(in)h(the)f(History)d Fn(.)c(.)f(.)h(.)f(.)h(.)f(.)h (.)g(.)27 b Fu(81)224 494 y(8.3)45 b(Readline)16 b(Init)h(File)d Fn(.)8 b(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.) f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h (.)f(.)h(.)f(.)29 b Fu(82)374 548 y(8.3.1)44 b(Readline)16 b(Init)g(File)h(Syn)o(tax)6 b Fn(.)h(.)g(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.) h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)21 b Fu(82)374 603 y(8.3.2)44 b(Conditional)16 b(Init)g(Constructs)e Fn(.)8 b(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.) f(.)h(.)f(.)30 b Fu(87)374 658 y(8.3.3)44 b(Sample)16 b(Init)g(File)11 b Fn(.)d(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h (.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.) f(.)26 b Fu(87)224 713 y(8.4)45 b(Bindable)17 b(Readline)g(Commands)6 b Fn(.)h(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.) f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)21 b Fu(90)374 768 y(8.4.1)44 b(Commands)14 b(F)l(or)h(Mo)o(ving)e Fn(.)7 b(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f (.)h(.)f(.)h(.)f(.)h(.)28 b Fu(90)374 822 y(8.4.2)44 b(Commands)14 b(F)l(or)h(Manipulating)i(The)e(History)9 b Fn(.)e(.)h(.)f(.)h(.)f(.)h(.)24 b Fu(90)374 877 y(8.4.3)44 b(Commands)14 b(F)l(or)h(Changing)h(T)l(ext)e Fn(.)8 b(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)30 b Fu(92)374 932 y(8.4.4)44 b(Killing)18 b(And)e(Y)l(anking)9 b Fn(.)e(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.) h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)24 b Fu(92)374 987 y(8.4.5)44 b(Sp)q(ecifying)17 b(Numeric)f(Argumen)o(ts)c Fn(.)c(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)27 b Fu(93)374 1042 y(8.4.6)44 b(Letting)15 b(Readline)i(T)o(yp)q(e)e(F)l (or)g(Y)l(ou)10 b Fn(.)d(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.) h(.)f(.)h(.)f(.)25 b Fu(94)374 1096 y(8.4.7)44 b(Keyb)q(oard)15 b(Macros)6 b Fn(.)h(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f (.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)21 b Fu(95)374 1151 y(8.4.8)44 b(Some)15 b(Miscellaneous)i(Commands)7 b Fn(.)g(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.) 22 b Fu(96)224 1206 y(8.5)45 b(Readline)16 b(vi)g(Mo)q(de)e Fn(.)7 b(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.) f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f (.)h(.)f(.)h(.)28 b Fu(98)224 1261 y(8.6)45 b(Programmable)14 b(Completion)6 b Fn(.)j(.)f(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f (.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)21 b Fu(98)224 1315 y(8.7)45 b(Programmable)14 b(Completion)i(Builtins)7 b Fn(.)j(.)d(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.) f(.)h(.)f(.)h(.)f(.)22 b Fu(99)75 1437 y Fs(9)67 b(Using)22 b(History)h(In)n(teractiv)n(ely)7 b Fa(.)13 b(.)d(.)g(.)h(.)f(.)g(.)g (.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)29 b Fs(103)224 1505 y Fu(9.1)45 b(Bash)15 b(History)g(F)l(acilities)6 b Fn(.)k(.)d(.)h(.)f(.) h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f (.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)21 b Fu(103)224 1560 y(9.2)45 b(Bash)15 b(History)g(Builtins)t Fn(.)10 b(.)e(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f (.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)19 b Fu(103)224 1615 y(9.3)45 b(History)15 b(Expansion)g Fn(.)7 b(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.) h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f (.)h(.)29 b Fu(105)374 1670 y(9.3.1)44 b(Ev)o(en)o(t)14 b(Designators)d Fn(.)c(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f (.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)26 b Fu(105)374 1724 y(9.3.2)44 b(W)l(ord)15 b(Designators)e Fn(.)8 b(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.) h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)29 b Fu(106)374 1779 y(9.3.3)44 b(Mo)q(di\014ers)14 b Fn(.)8 b(.)f(.)h(.)f(.)h(.)f(.)h (.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.) f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)29 b Fu(107)75 1900 y Fs(10)66 b(Installing)25 b(Bash)14 b Fa(.)c(.)h(.)f(.)g(.)g(.)g (.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.) g(.)38 b Fs(109)224 1969 y Fu(10.1)45 b(Basic)16 b(Installation)e Fn(.)8 b(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.) f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h (.)f(.)29 b Fu(109)224 2024 y(10.2)45 b(Compilers)16 b(and)f(Options)c Fn(.)d(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.) g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f (.)26 b Fu(110)224 2078 y(10.3)45 b(Compiling)16 b(F)l(or)f(Multiple)i (Arc)o(hitectures)6 b Fn(.)i(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.) h(.)f(.)h(.)f(.)h(.)f(.)21 b Fu(110)224 2133 y(10.4)45 b(Installation)16 b(Names)11 b Fn(.)c(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f (.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.) h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)26 b Fu(110)224 2188 y(10.5)45 b(Sp)q(ecifying)17 b(the)e(System)h(T)o(yp)q(e)5 b Fn(.)j(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.) f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)20 b Fu(111)224 2243 y(10.6)45 b(Sharing)15 b(Defaults)c Fn(.)d(.)f(.)h(.)f(.)h(.)f(.)h (.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.) h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)25 b Fu(111)224 2298 y(10.7)45 b(Op)q(eration)16 b(Con)o(trols)6 b Fn(.)g(.)i(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.) h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f (.)21 b Fu(111)224 2352 y(10.8)45 b(Optional)16 b(F)l(eatures)9 b Fn(.)e(.)g(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.) f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h (.)f(.)24 b Fu(111)75 2474 y Fs(App)r(endix)g(A)67 b(Rep)r(orting)24 b(Bugs)13 b Fa(.)d(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g (.)36 b Fs(115)p eop %%Page: -4 138 -4 137 bop 75 -58 a Fu(iv)1295 b(Bash)15 b(Reference)h(Man)o(ual)75 42 y Fs(App)r(endix)24 b(B)67 b(Ma)t(jor)21 b(Di\013erences)h(F)-6 b(rom)23 b(The)f(Bourne)209 108 y(Shell)8 b Fa(.)13 b(.)d(.)g(.)h(.)f (.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)31 b Fs(117)224 176 y Fu(B.1)45 b(Implemen)o(tation)17 b(Di\013erences)f(F)l (rom)e(The)h(SVR4.2)f(Shell)c Fn(.)g(.)e(.)f(.)h(.)25 b Fu(121)75 298 y Fs(Index)e(of)f(Shell)i(Builtin)h(Commands)13 b Fa(.)d(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)36 b Fs(123)75 433 y(Index)23 b(of)f(Shell)i(Reserv)n(ed)f(W)-6 b(ords)21 b Fa(.)10 b(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f (.)43 b Fs(125)75 567 y(P)n(arameter)22 b(and)h(V)-6 b(ariable)24 b(Index)13 b Fa(.)e(.)g(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) h(.)f(.)g(.)g(.)36 b Fs(127)75 702 y(F)-6 b(unction)25 b(Index)18 b Fa(.)11 b(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g (.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)41 b Fs(129)75 837 y(Concept)22 b(Index)9 b Fa(.)i(.)g(.)f(.)g(.)g(.)g(.)h (.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) h(.)f(.)g(.)g(.)g(.)32 b Fs(131)p eop %%Trailer end userdict /end-hook known{end-hook}if %%EOF doc/bashref.dvi100664 436 0 1754570 7374257271 12301 0ustar chetwheel÷ƒ’À;è TeX output 2001.11.13:1256‹ÿÿÿÿŸò ƒ3* şšé‘GóBÂÖN ¼j cmbx12ëBBash–ƧReference“Man‘ÿZual‘GŸ‰±¸Ÿ šª’ [Ëó2Kñ`y ó3 cmr10İReference–¦fDoMŞcumen²!tation“for“Bash¤ ’öÀEdition–¦f2.5a,“for“ó3ßêİ'.¡‘GŞname‘"ÒKİA‘y!Şword–yWİconsisting“solely“of“letters,›®n•²!um“bMŞers,˜and–yWunderscores,˜and“bMŞeginning¦‘Kâ:with–Ãİa“letter“or“underscore.‘’ZŞNameİs“are“used“as“shell“v‘ÿdDariable“and“function“names.¦‘Kâ:Also–¦freferred“to“as“an“Şidentifierİ.¡‘GŞoperator‘ Ó£İA‘‰ÄŞcontrol›¦foperator–‰ÿİor“a“Şredirection˜operatorİ.‘ˆ§See“Section“3.6“[Redirec-¦‘Kâ:tions],–¦fpage“22,“for“a“list“of“redirection“opMŞerators.¡‘GŞprocess‘¦fgroup¦‘Kâ:İA–¦fcollection“of“related“proMŞcesses“eacš²!h“ha˜ving“the“same“proMŞcess“group“ãidİ.¡‘GŞprocess–¦fgroup“ID¦‘Kâ:İA–¦funique“idenš²!tifer“that“represen˜ts“a“Şprocess“group“İduring“its“lifetime.¡‘GŞreserved‘¦fword¦‘Kâ:İA‘i9Şword–iHİthat“has“a“spMŞecial“meaning“to“the“shell.‘É~Most“reservš²!ed“w˜ords“in˜troMŞduce¦‘Kâ:shell–¦f oš²!w“con˜trol“constructs,“suc˜h“as“Şfor“İand“Şwhileİ.¡‘GŞreturn‘¦fstatus¦‘Kâ:İA–¦fsynon²!ym“for“Şexit“statusİ.Œ‹¬Ÿò‘Gİ4’;52Bash–¦fReference“Man²!ual ƒ3* ı ÌÖ‘GŞsignal‘R÷İA‘Ğæmec•²!hanism›Ñ2b“y˜whic“h˜a˜proMŞcess˜ma“y˜bMŞe˜noti ed˜b“y˜the˜k“ernel˜of˜an˜ev“en“t¤ 33‘Kâ:oMŞccurring–¦fin“the“system.©33‘GŞspecial‘¦fbuiltin¡‘Kâ:İA‘(shell–(#builtin“command“that“has“bšMŞeen“classi ed“as“sp˜ecial“b²!y“the“ãposix“İ1003.2¡‘Kâ:standard.¦‘GŞtoken‘¡İA‘”?sequence–”|of“cš²!haracters“considered“a“single“unit“b˜y“the“shell.‘¨It“is“either“a¡‘Kâ:Şword–¦fİor“an“Şoperatorİ.¦‘GŞword‘"ÒKİA–¦fŞtoken“İthat“is“not“an“Şoperatorİ.Œ‹!‰Ÿò‘GİChapter–¦f3:‘İİBasic“Shell“F‘ÿeeatures’á5 ƒ3* ı ÌÖ‘GëK3‘ ¸QBasic–z³Shell“F‘şaGeaturesŸ½‘!GİBash–DÀis“an“acron²!ym“for“`ŞBourne-Again‘¦fSHellİ'.‘½PThe“Bourne“shell“is“the“traditional“Unix¤ 33‘Gshell–moriginally“written“b²!y“Stephen“Bourne.‘ıòAll“of“the“Bourne“shell“builtin“commands“are¡‘Ga²!v›ÿdDailable–7bin“Bash,‘M–and“the“rules“for“ev˜aluation“and“quoting“are“tak²!en“from“the“ãposix“İ1003.2¡‘GspMŞeci cation–¦ffor“the“`standard'“Unix“shell.©a*‘!GThis–ß cš²!hapter“brie y“summarizes“the“shell's“`building“bloMŞc˜ks':‘O&commands,‘í3con˜trol“struc-¡‘Gtures,–…ºshell›Yfunctions,“shell˜ó5ı': ó3 cmti10àp–ÿp¹ar“ametersİ,–…ºshell˜expansions,“àr–ÿp¹e“dir“e“ctionsİ,‘…ºwhic•²!h˜are˜a˜w“a“y˜to¡‘Gdirect–¦finput“and“output“from“and“to“named“ les,“and“ho²!w“the“shell“executes“commands.Ÿ!òé‘GëT3.1‘™Shell‘f@SynŒÌtaxŸa*‘!GİWhen–ò‚the“shell“reads“input,‘‰it“prošMŞceeds“through“a“sequence“of“op˜erations.‘Â2If“the“input¡‘Gindicates–”the“bMŞeginning“of“a“commenš²!t,‘—¼the“shell“ignores“the“commen˜t“sym˜bMŞol“(`Ş#İ'),‘—¼and“the¡‘Grest–¦fof“that“line.¦‘!GOtherwise,–ãroughly›×TspMŞeaking,“the˜shell˜reads˜its˜input˜and˜divides˜the˜input˜in•²!to˜w“ords¡‘Gand–Ú™opMŞerators,‘\emploš²!ying“the“quoting“rules“to“select“whic˜h“meanings“to“assign“v‘ÿdDarious“w˜ords¡‘Gand‘¦fc²!haracters.¦‘!GThe–¥0shell“then“parses“these“tokš²!ens“in˜to“commands“and“other“constructs,‘äãremo˜v˜es“the¡‘GspMŞecial–œşmeaning“of“certain“wš²!ords“or“c˜haracters,›ßexpands“others,˜redirects“input“and“output¡‘Gas–Æneeded,›(Lexecutes“the“spMŞeci ed“command,˜w²!aits“for“the“command's“exit“status,˜and“mak²!es¡‘Gthat–¦fexit“status“a²!v‘ÿdDailable“for“further“inspšMŞection“or“pro˜cessing.Ÿ[í‘Gó]ÂÖN  #× cmbx12ë]3.1.1‘d(Shell‘íMOpierationŸa*‘!GİThe–v follo²!wing“is“a“brief“description“of“the“shell's“opMŞeration“when“it“reads“and“executes“a¡‘Gcommand.‘İİBasically‘ÿe,–¦fthe“shell“doMŞes“the“follo²!wing:¦‘-1.‘'¿«Reads–4its“input“from“a“ le“(see“Section“3.8“[Shell“Scripts],›m'page“29),˜from“a“string¡‘'¿«supplied–GFas“an“argumenš²!t“to“the“`Ş-cİ'“in˜v˜oMŞcation“option“(see“Section“6.1“[In˜v˜oking“Bash],¡‘'¿«page–¦f59),“or“from“the“user's“terminal.©Ê.‘-2.‘'¿«Breaks–Ñthe“input“inš²!to“w˜ords“and“op•MŞerators,‘|ëob“eying–Ñthe“quoting“rules“describMŞed“in¡‘'¿«Section–0ó3.1.2“[Quoting],‘Hppage“6.‘¶·These“tokš²!ens“are“separated“b˜y“Şmetacharactersİ.‘¶·Alias¡‘'¿«expansion–¦fis“pMŞerformed“b²!y“this“step“(see“Section“6.6“[Aliases],“page“67).¦‘-3.‘'¿«Pš²!arses–% the“tok˜ens“in˜to“simple“and“compMŞound“commands“(see“Section“3.2“[Shell“Com-¡‘'¿«mands],–¦fpage“7).¦‘-4.‘'¿«P²!erforms–ÙÖthe“v‘ÿdDarious“shell“expansions“(see“Section“3.5“[Shell“Expansions],‘&²page“15),¡‘'¿«breaking–6‘the“expanded“tokš²!ens“in˜to“lists“of“ lenames“(see“Section“3.5.8“[Filename“Ex-¡‘'¿«pansion],–¦fpage“20)“and“commands“and“argumen²!ts.¦‘-5.‘'¿«P•²!erforms›kan“y˜necessary˜redirections˜(see˜Section˜3.6˜[Redirections],‘œDpage˜22)˜and˜re-¡‘'¿«mo•²!v“es–¦fthe“redirection“opšMŞerators“and“their“op˜erands“from“the“argumen²!t“list.¦‘-6.‘'¿«Executes–¦fthe“command“(see“Section“3.7“[Executing“Commands],“page“25).¦‘-7.‘'¿«Optionally–´ w²!aits“for“the“command“to“complete“and“collects“its“exit“status“(see“Sec-¡‘'¿«tion–¦f3.7.5“[Exit“Status],“page“28).Œ‹#ãŸò‘Gİ6’;52Bash–¦fReference“Man²!ual ƒ3* ı ÌÖ‘Gë]3.1.2‘d(Quoting©Yò‘!GİQuoting–Şuis“used“to“remo•²!v“e–Şuthe“spMŞecial“meaning“of“certain“cš²!haracters“or“w˜ords“to“the“shell.¤ 33‘GQuoting–IQcan“bšMŞe“used“to“disable“sp˜ecial“treatmen²!t“for“sp˜ecial“cš²!haracters,‘[ïto“prev˜en˜t“reserv˜ed¡‘Gwš²!ords–¦ffrom“bMŞeing“recognized“as“suc˜h,“and“to“prev˜en˜t“parameter“expansion.ŸYò‘!GEacš²!h–Ÿ€of“the“shell“metac˜haracters“(see“Chapter“2“[De nitions],‘Ôpage“3)“has“spMŞecial“meaning¡‘Gto–»¯the“shell“and“mš²!ust“bMŞe“quoted“if“it“is“to“represen˜t“itself.‘¹When“the“command“history¡‘Gexpansion–šfacilities“are“bMŞeing“used,›Öüthe“áhistory“expansion“İc²!haracter,˜usually“`Ş!İ',˜m²!ust“bMŞe¡‘Gquoted–l¿to“prev•²!en“t–l¿history“expansion.‘0èSee“Section“9.1“[Bash“History“F‘ÿeacilities],‘Upage“103,¡‘Gfor–]amore“details“concerning“history“expansion.‘ÍThere“are“three“quoting“mec²!hanisms:‘KÒthe¡‘GáescapMŞe–¦fc²!haracterİ,“single“quotes,“and“double“quotes.ŸM~‘Gë]3.1.2.1‘d(Escapie‘íMCharacter¦‘!GİA‘Bïnon-quoted–Cbacš²!kslash“`Ş\İ'“is“the“Bash“escapMŞe“c˜haracter.‘¼¾It“preserv˜es“the“literal“v‘ÿdDalue“of¡‘Gthe–1œnext“cš²!haracter“that“follo˜ws,‘Høwith“the“exception“of“Şnewlineİ.‘¶ïIf“a“Ş\newline“İpair“appMŞears,¡‘Gand–¬the“bacš²!kslash“itself“is“not“quoted,‘­lthe“Ş\newline“İis“treated“as“a“line“con˜tin˜uation“(that¡‘Gis,–¦fit“is“remo•²!v“ed–¦ffrom“the“input“stream“and“e ectiv²!ely“ignored).ŸM~‘Gë]3.1.2.2‘d(Single‘íMQuotes¦‘!GİEnclosing–Ucš²!haracters“in“single“quotes“(`Ş'İ')“preserv˜es“the“literal“v‘ÿdDalue“of“eac˜h“c˜haracter¡‘Gwithin–øthe“quotes.‘£ÃA‘÷ìsingle“quote“ma²!y“not“ošMŞccur“b˜et•²!w“een–øsingle“quotes,‘ôev²!en“when“preceded¡‘Gbš²!y–¦fa“bac˜kslash.ŸM~‘Gë]3.1.2.3‘d(Double‘íMQuotes¦‘!GİEnclosing–[ücš²!haracters“in“double“quotes“(`Ş"İ')“preserv˜es“the“literal“v‘ÿdDalue“of“all“c˜haracters¡‘Gwithin–êthe“quotes,›ûˆwith“the“exception“of“`Ş$İ',˜`Ş`İ',˜and“`Ş\İ'.‘ª/The“c²!haracters“`Ş$İ'“and“`Ş`İ'“retain¡‘Gtheir–^ºspMŞecial“meaning“within“double“quotes“(see“Section“3.5“[Shell“Expansions],‘ŒÏpage“15).¡‘GThe–£bacš²!kslash“retains“its“spMŞecial“meaning“only“when“follo˜w˜ed“b˜y“one“of“the“follo˜wing“c˜har-¡‘Gacters:‘e±`Ş$İ',–›J`Ş`İ',“`Ş"İ',“`Ş\İ',“or–jPŞnewlineİ.‘)›Within“double“quotes,‘›Jbacš²!kslashes“that“are“follo˜w˜ed¡‘Gbš²!y–RĞone“of“these“c˜haracters“are“remo˜v˜ed.‘ãBac˜kslashes“preceding“c˜haracters“without“a“spMŞe-¡‘Gcial–âAmeaning“are“left“unmošMŞdi ed.‘‘oA‘â2double“quote“ma²!y“b˜e“quoted“within“double“quotes“b²!y¡‘Gpreceding–¦fit“with“a“bac²!kslash.ŸYò‘!GThe–ı„spšMŞecial“parameters“`Ş*İ'“and“`Ş@İ'“ha•²!v“e–ı„sp˜ecial“meaning“when“in“double“quotes“(see¡‘GSection–¦f3.5.3“[Shell“P²!arameter“Expansion],“page“17).ŸM~‘Gë]3.1.2.4‘d(ANSI-C‘íMQuoting¦‘!GİW›ÿeords–† of“the“form“Ş$'ástring‘ğŞ'“İare“treated“spMŞecially˜.‘|ÏThe“w²!ord“expands“to“ástringİ,‘½õwith¡‘Gbac•²!kslash-escapMŞed›8c“haracters˜replaced˜as˜spMŞeci ed˜b“y˜the˜ANSI–7¸C“standard.‘ “Bac²!kslash¡‘GescapšMŞe–¦fsequences,“if“presen²!t,“are“deco˜ded“as“follo²!ws:ŸmQ‘GŞ\a‘.QŸİalert‘¦f(bMŞell)¤Yñ‘GŞ\b‘.QŸİbac²!kspace¡‘GŞ\e‘.QŸİan–¦fescapMŞe“c²!haracter“(not“ANSI“C)Œ‹1´Ÿò‘GİChapter–¦f3:‘İİBasic“Shell“F‘ÿeeatures’á7 ƒ3* ı ÌÖ‘GŞ\f‘.QŸİform‘¦ffeed¤i‘GŞ\n‘.QŸİnewline¡‘GŞ\r‘.QŸİcarriage‘¦freturn¡‘GŞ\t‘.QŸİhorizon²!tal‘¦ftab¡‘GŞ\v‘.QŸİv²!ertical‘¦ftab¡‘GŞ\\‘.QŸİbac²!kslash¡‘GŞ\'‘.QŸİsingle‘¦fquote¡‘GŞ\ánnn‘!ÑGİthe–¦feighš²!t-bit“c˜haracter“whose“v›ÿdDalue“is“the“oMŞctal“v˜alue“ánnn“İ(one“to“three“digits)¡‘GŞ\xáHH‘äÑİthe–N˜eighš²!t-bit“c˜haracter“whose“v›ÿdDalue“is“the“hexadecimal“v˜alue“áHH‘~İ(one“or“t•²!w“o¤ 33‘Kâ:hex‘¦fdigits)Ÿºƒ‘GThe–¦fexpanded“result“is“single-quoted,“as“if“the“dollar“sign“had“not“bMŞeen“presen²!t.©´k‘Gë]3.1.2.5‘d(Lo•icale-Sp“eci c‘íMT‘şÄ£ranslationŸh‘!GİA‘ªûdouble-quoted–ªıstring“preceded“b²!y“a“dollar“sign“(`Ş$İ')“will“cause“the“string“to“bMŞe“trans-¡‘Glated–Ú”according“to“the“currenš²!t“loMŞcale.‘zhIf“the“curren˜t“loMŞcale“is“ŞC“İor“ŞPOSIXİ,‘ç the“dollar“sign“is¡‘Gignored.‘İİIf–¦fthe“string“is“translated“and“replaced,“the“replacemen²!t“is“double-quoted.Ÿh‘!GSome–z¿systems“use“the“message“catalog“selected“b²!y“the“ŞLC_MESSAGES“İshell“v‘ÿdDariable.‘yûOthers¡‘Gcreate–r†the“name“of“the“message“catalog“from“the“v›ÿdDalue“of“the“ŞTEXTDOMAIN“İshell“v˜ariable,¡‘GpMŞossibly–ǯadding“a“sux“of“`Ş.moİ'.‘A¹If“yš²!ou“use“the“ŞTEXTDOMAIN“İv‘ÿdDariable,‘Ğy˜ou“ma˜y“need“to“set¡‘Gthe–©‰ŞTEXTDOMAINDIR“İv‘ÿdDariable“to“the“lošMŞcation“of“the“message“catalog“ les.‘‰”Still“others“use“b˜oth¡‘Gv‘ÿdDariables–¦fin“this“fashion:‘İİŞTEXTDOMAINDIRİ/ŞLC_MESSAGESİ/LC‘¨/‰x³Hø‘ñ'MESSA²!GES/ŞTEXTDOMAINİ.mo.¦‘Gë]3.1.3‘d(Commen–áts©h‘!GİIn–Iªa“non-in•²!teractiv“e–Iªshell,‘r{or“an“in•²!teractiv“e–Iªshell“in“whic²!h“the“Şinteractive_comments¡‘Gİoption–zeto“the“Şshopt“İbuiltin“is“enabled“(see“Section“4.2“[Bash“Builtins],›¯epage“36),˜a“w²!ord¡‘GbMŞeginning–'»with“`Ş#İ'“causes“that“wš²!ord“and“all“remaining“c˜haracters“on“that“line“to“bMŞe“ignored.¡‘GAn›4Rin•²!teractiv“e˜shell˜without˜the˜Şinteractive_comments˜İoption˜enabled˜doMŞes˜not˜allo“w¡‘Gcommenš²!ts.‘LThe–66Şinteractive_comments“İoption“is“on“b˜y“default“in“in˜teractiv˜e“shells.‘LSee¡‘GSection–u'6.3“[In•²!teractiv“e–u'Shells],›page“63,˜for“a“description“of“what“makš²!es“a“shell“in˜teractiv˜e.Ÿ$ᆑGëT3.2‘™Shell‘f@Commands¦‘!GİA‘Şsimple–ŞŸshell“command“sucš²!h“as“Şecho–¦fa“b“c–ŞŸİconsists“of“the“command“itself“follo˜w˜ed“b˜y¡‘Gargumenš²!ts,–¦fseparated“b˜y“spaces.Ÿh‘!GMore–ºcomplex“shell“commands“are“compMŞosed“of“simple“commands“arranged“together“in¡‘Ga–«'v‘ÿdDarietš²!y“of“w˜a˜ys:‘ç^in“a“pipMŞeline“in“whic˜h“the“output“of“one“command“bMŞecomes“the“input“of¡‘Ga–¦fsecond,“in“a“loMŞop“or“conditional“construct,“or“in“some“other“grouping.Œ‹?Ÿò‘Gİ8’;52Bash–¦fReference“Man²!ual ƒ3* ı ÌÖ‘Gë]3.2.1‘d(Simple‘íMCommands©Ët‘!GİA‘7>simple–7Zcommand“is“the“kind“of“command“encoun²!tered“most“often.‘¸ÙIt's“just“a“sequence¤ 33‘Gof–6wš²!ords“separated“b˜y“Şblankİs,‘L’terminated“b˜y“one“of“the“shell's“con˜trol“opMŞerators“(see“Chap-¡‘Gter–U2“[De nitions],‘)‘page“3).‘ªThe“ rst“w²!ord“generally“spšMŞeci es“a“command“to“b˜e“executed,¡‘Gwith–¦fthe“rest“of“the“wš²!ords“bMŞeing“that“command's“argumen˜ts.ŸËt‘!GThe–äœreturn“status“(see“Section“3.7.5“[Exit“Status],‘ô)page“28)“of“a“simple“command“is“its¡‘Gexit–l6status“as“proš²!vided“b˜y“the“ãposix“İ1003.1“Şwaitpid“İfunction,‘ªor“128Ş+án“İif“the“command¡‘Gwš²!as–¦fterminated“b˜y“signal“ánİ.ŸÈ‘Gë]3.2.2‘d(Pipielines¦‘!GİA–¦fŞpipeline“İis“a“sequence“of“simple“commands“separated“b²!y“`Ş|İ'.¤Ët‘!GThe–¦fformat“for“a“pipMŞeline“isŸA‘.ùœŞ[time–¿ª[-p]]“[!]“ácommand1›ãŞ[|“ácommand2˜Ş...‘İâ]¡‘GİThe–m.output“of“eac²!h“command“in“the“pipšMŞeline“is“connected“via“a“pip˜e“to“the“input“of“the© 33‘Gnext–¦fcommand.‘İİThat“is,“eac²!h“command“reads“the“previous“command's“output.¡‘!GThe–ckreservš²!ed“w˜ord“Ştime“İcauses“timing“statistics“to“bMŞe“prin˜ted“for“the“pipMŞeline“once“it¦‘G nishes.‘=éThe–¿statistics“currenš²!tly“consist“of“elapsed“(w˜all-cloMŞc˜k)“time“and“user“and“system¦‘Gtime–B¯consumed“bš²!y“the“command's“execution.‘²·The“`Ş-pİ'“option“c˜hanges“the“output“format¦‘Gto–QAthat“spMŞeci ed“bš²!y“ãposixİ.‘ŞnThe“ŞTIMEFORMAT“İv‘ÿdDariable“ma˜y“bMŞe“set“to“a“format“string“that¦‘GspšMŞeci es–{ho²!w“the“timing“information“should“b˜e“displa•²!y“ed.‘ÏoSee–{Section“5.2“[Bash“V‘ÿeariables],¦‘Gpage–dF51,‘q€for“a“description“of“the“aš²!v‘ÿdDailable“formats.‘ÇÓThe“use“of“Ştime“İas“a“reserv˜ed“w˜ord“pMŞer-¦‘Gmits–V"the“timing“of“shell“builtins,›f0shell“functions,˜and“pipMŞelines.‘ÃAn“external“Ştime“İcommand¦‘Gcannot–¦ftime“these“easily‘ÿe.¡‘!GIf–ûthe“pipMŞeline“is“not“executed“async²!hronously“(see“Section“3.2.3“[Lists],›"Şpage“8),˜the“shell¦‘Gw²!aits–¦ffor“all“commands“in“the“pipMŞeline“to“complete.¡‘!GEacš²!h–æcommand“in“a“pipMŞeline“is“executed“in“its“o˜wn“subshell“(see“Section“3.7.3“[Command¦‘GExecution›K'En•²!vironmen“t],‘tWpage˜26).‘Ì!The˜exit˜status˜of˜a˜pipMŞeline˜is˜the˜exit˜status˜of˜the¦‘Glast–Jbcommand“in“the“pipMŞeline.‘¿1If“the“reservš²!ed“w˜ord“`Ş!İ'“precedes“the“pipMŞeline,‘\Êthe“exit“status¦‘Gis–¦fthe“logical“negation“of“the“exit“status“of“the“last“command.ŸÈ‘Gë]3.2.3‘d(Lists–íMof“CommandsŸËt‘!GİA‘‡¶Şlist–‡¾İis“a“sequence“of“one“or“more“pipšMŞelines“separated“b²!y“one“of“the“op˜erators“`Ş;İ',‘ß`Ş&İ',¦‘G`Ş&&İ',–¦for“`Ş||İ',“and“optionally“terminated“b²!y“one“of“`Ş;İ',“`Ş&İ',“or“a“Şnewlineİ.¡‘!GOf–ØÖthese“list“opMŞerators,›ó`Ş&&İ'“and“`Ş||İ'“ha•²!v“e–ØÖequal“precedence,˜follo•²!w“ed›ØÖb“y˜`Ş;İ'˜and˜`Ş&İ',‘ówhic“h¦‘Gha•²!v“e–¦fequal“precedence.¡‘!GIf–Sía“command“is“terminated“bš²!y“the“con˜trol“opMŞerator“`Ş&İ',‘dlthe“shell“executes“the“command¦‘Gasyncš²!hronously–sáin“a“subshell.‘ÍThis“is“kno˜wn“as“executing“the“command“in“the“ábac˜kgroundİ.¦‘GThe–lyshell“doMŞes“not“w²!ait“for“the“command“to“ nish,‘xand“the“return“status“is“0“(true).‘ÊWhen¦‘Gjob–ÓĞconš²!trol“is“not“activ˜e“(see“Chapter“7“[Job“Con˜trol],›*page“75),˜the“standard“input“for¦‘Gasyncš²!hronous–Bcommands,‘¨ûin“the“absence“of“an˜y“explicit“redirections,‘¨ûis“redirected“from¦‘GŞ/dev/nullİ.¡‘!GCommands–…ıseparated“bš²!y“a“`Ş;İ'“are“executed“sequen˜tially;‘æ the“shell“w˜aits“for“eac˜h“command¦‘Gto–¦fterminate“in“turn.‘İİThe“return“status“is“the“exit“status“of“the“last“command“executed.Œ‹ J+Ÿò‘GİChapter–¦f3:‘İİBasic“Shell“F‘ÿeeatures’á9 ƒ3* ı ÌÖ‘!GThe–¡ícon²!trol“opšMŞerators“`Ş&&İ'“and“`Ş||İ'“denote“ãand“İlists“and“ãor“İlists,‘¢Òresp˜ectiv²!ely‘ÿe.‘Ü_An“ãandŸ 33‘Gİlist–¦fhas“the“form©@ü‘.ùœácommand1‘ãŞ&&‘¿ªácommand2¤ô/‘Gcommand2›…Ÿİis–¦fexecuted“if,“and“only“if,“ácommand1˜İreturns“an“exit“status“of“zero.¡‘!GAn–¦fãor“İlist“has“the“form¦‘.ùœácommand1‘ãŞ||‘¿ªácommand2¡‘Gcommand2›…Ÿİis–¦fexecuted“if,“and“only“if,“ácommand1˜İreturns“a“non-zero“exit“status.¡‘!GThe–ú„return“status“of“ãand“İand“ãor“İlists“is“the“exit“status“of“the“last“command“executed© 33‘Gin–¦fthe“list.ŸBô‘Gë]3.2.4‘d(Loioping‘íMConstructsŸô/‘!GİBash–¦fsuppšMŞorts“the“follo²!wing“lo˜oping“constructs.¡‘!GNote–that“wherevš²!er“a“`Ş;İ'“appMŞears“in“the“description“of“a“command's“syn˜tax,‘-šit“ma˜y“bMŞe¦‘Greplaced–¦fwith“one“or“more“newlines.Ÿµ+‘GŞuntil‘¡İThe–¦fsyn²!tax“of“the“Şuntil“İcommand“is:Ÿ@ü‘hÊŞuntil–¿ªátest-commandsšs‚Ş;“do“áconsequen²!t-commands˜Ş;“done¡‘Kâ:İExecute–ñXáconsequen²!t-commands›dÚİas“long“as“átest-commands˜İhas“an“exit“status¦‘Kâ:whic²!h–§ris“not“zero.‘áThe“return“status“is“the“exit“status“of“the“last“command¦‘Kâ:executed–¦fin“áconsequenš²!t-commandsİ,“or“zero“if“none“w˜as“executed.Ÿµ+‘GŞwhile‘¡İThe–¦fsyn²!tax“of“the“Şwhile“İcommand“is:Ÿ@ü‘hÊŞwhile–¿ªátest-commandsšs‚Ş;“do“áconsequen²!t-commands˜Ş;“done¡‘Kâ:İExecute–ñXáconsequen²!t-commands›dÚİas“long“as“átest-commands˜İhas“an“exit“status¦‘Kâ:of–Izero.‘<‡The“return“status“is“the“exit“status“of“the“last“command“executed“in¦‘Kâ:áconsequenš²!t-commandsİ,–¦for“zero“if“none“w˜as“executed.Ÿµ+‘GŞfor‘(‘õİThe–¦fsyn²!tax“of“the“Şfor“İcommand“is:Ÿ@ü‘hÊŞfor–¿ªáname‘\±Ş[in“áw²!ords‘3,Ş...‘r+];“do“ácommandss‚Ş;“done¡‘Kâ:İExpand–ïQáwš²!ordsİ,‘‹and“execute“ácommands‘bÓİonce“for“eac˜h“mem˜bMŞer“in“the“resultan˜t¦‘Kâ:list,‘‹àwith–…>áname‘"EİbMŞound“to“the“currenš²!t“mem˜bMŞer.‘ÒĞIf“`Şin‘¦fáw˜ordss‚İ'“is“not“presen˜t,‘‹àthe¦‘Kâ:Şfor–Фİcommand“executes“the“ácommands‘ş&İonce“for“eac²!h“pMŞositional“parameter“that¦‘Kâ:is–7«set,‘MĞas“if“`Şin‘¦f"$@"İ'“had“bšMŞeen“sp˜eci ed“(see“Section“3.4.2“[Sp˜ecial“P²!arameters],¦‘Kâ:page–Ÿ14).‘†The“return“status“is“the“exit“status“of“the“last“command“that“executes.¦‘Kâ:If–ütthere“are“no“items“in“the“expansion“of“áw²!ordsİ,›rno“commands“are“executed,˜and¦‘Kâ:the–¦freturn“status“is“zero.¡‘Kâ:An–¦falternate“form“of“the“Şfor“İcommand“is“also“suppMŞorted:Ÿ@ü‘hÊŞfor–¿ª((“áexpr1›ãŞ;“áexpr2˜Ş;“áexpr3˜Ş))“;“do“ácommands‘3,Ş;“done¡‘Kâ:İFirst,‘Œthe–^,arithmetic“expression“áexpr1‘=eİis“ev‘ÿdDaluated“according“to“the“rules“de-¦‘Kâ:scrib•MŞed›b“elo²!w˜(see˜Section˜6.5˜[Shell˜Arithmetic],‘iÙpage˜66).‘ ZThe˜arithmetic¦‘Kâ:expression– ïáexpr2‘ë(İis“then“ev›ÿdDaluated“repMŞeatedly“un²!til“it“ev˜aluates“to“zero.‘wEac²!h¦‘Kâ:time–»Dáexpr2‘š}İev›ÿdDaluates“to“a“non-zero“v˜alue,‘êKácommands‘.Æİare“executed“and“the“arith-¦‘Kâ:metic–e·expression“áexpr3‘Dğİis“ev‘ÿdDaluated.‘ÈMIf“anš²!y“expression“is“omitted,‘r¦it“bMŞeha˜v˜es“as¦‘Kâ:if–½git“ev›ÿdDaluates“to“1.‘"áThe“return“v˜alue“is“the“exit“status“of“the“last“command“in¦‘Kâ:álist‘ãfİthat–¦fis“executed,“or“false“if“anš²!y“of“the“expressions“is“in˜v‘ÿdDalid.Œ‹ Y3Ÿò‘Gİ10’5»˜Bash–¦fReference“Man²!ual ƒ3* ı ÌÖ‘!GThe–JuŞbreak“İand“Şcontinue“İbuiltins“(see“Section“4.1“[Bourne“Shell“Builtins],‘\Øpage“31)“ma²!y© 33‘GbšMŞe–¦fused“to“con²!trol“lo˜op“execution.Ÿ±±‘Gë]3.2.5‘d(Conditional‘íMConstructsŸxw‘GŞif‘.QŸİThe–¦fsyn²!tax“of“the“Şif“İcommand“is:Ÿìl‘hÊŞif–¿ªátest-commandss‚Ş;“then¤ €‘tIãáconsequen²!t-commandss‚Ş;¡‘hÊ[elif–¿ªámore-test-commandss‚Ş;“then¡‘tIãámore-consequen²!tss‚Ş;]¡‘hÊ[else‘¿ªáalternate-consequen²!tss‚Ş;]¡‘hÊfi¤ŸŸ‘Kâ:İThe–mbátest-commands‘àäİlist“is“executed,› and“if“its“return“status“is“zero,˜the¦‘Kâ:áconsequen²!t-commands›@¥İlist–Í#is“executed.‘RIf“átest-commands˜İreturns“a“non-zero¦‘Kâ:status,›Wºeac²!h–Şelif“İlist“is“executed“in“turn,˜and“if“its“exit“status“is“zero,˜the¦‘Kâ:correspMŞonding–†&ámore-consequen²!ts‘ù¨İis“executed“and“the“command“completes.‘}If¦‘Kâ:`Şelse‘¦fáalternate-consequenš²!tss‚İ'–zis“presen˜t,‘ø>and“the“ nal“command“in“the“ nal¦‘Kâ:Şif–Sİor“Şelif“İclause“has“a“non-zero“exit“status,‘¾Bthen“áalternate-consequen²!ts‘Æ™İis¦‘Kâ:executed.‘pJThe–,Šreturn“status“is“the“exit“status“of“the“last“command“executed,¦‘Kâ:or–¦fzero“if“no“condition“tested“true.Ÿ ‘GŞcase‘"ÒKİThe–¦fsyn²!tax“of“the“Şcase“İcommand“is:Ÿìl‘hÊŞcase–¿ªáw²!ord‘-üŞin“[“[(]“ápattern“Ş[|“ápatternŞ]...‘>ÿ)“ácommand-list‘üªŞ;;]...‘ş©esac¡‘Kâ:case–+ İwill“selectiv²!ely“execute“the“ácommand-list‘h İcorrespMŞonding“to“the“ rst“ápat-¦‘Kâ:tern–ä†İthat“matcš²!hes“áw˜ordİ.‘˜=The“`Ş|İ'“is“used“to“separate“m˜ultiple“patterns,‘4 and¦‘Kâ:the–¿î`Ş)İ'“opšMŞerator“terminates“a“pattern“list.‘*vA‘¿èlist“of“patterns“and“an“asso˜ciated¦‘Kâ:command-list–øis“knoš²!wn“as“a“áclauseİ.‘ÛcEac˜h“clause“m˜ust“bMŞe“terminated“with“`Ş;;İ'.¦‘Kâ:The–G áw²!ord‘µrİundergoMŞes“tilde“expansion,›Z.parameter“expansion,˜command“substitu-¦‘Kâ:tion,–šmarithmetic›iŸexpansion,“and˜quote˜remo•²!v‘ÿdDal˜bMŞefore˜matc“hing˜is˜attempted.¦‘Kâ:Eac²!h–Wápattern“İundergoMŞes“tilde“expansion,›Óparameter“expansion,˜command“sub-¦‘Kâ:stitution,–¦fand“arithmetic“expansion.¡‘Kâ:There–šömaš²!y“bMŞe“an“arbitrary“n˜um˜bMŞer“of“Şcase“İclauses,‘?eac˜h“terminated“b˜y“a“`Ş;;İ'.¦‘Kâ:The–¦f rst“pattern“that“matc²!hes“determines“the“command-list“that“is“executed.¡‘Kâ:Here–0•is“an“example“using“Şcase“İin“a“script“that“could“bšMŞe“used“to“describ˜e“one¦‘Kâ:in²!teresting–¦ffeature“of“an“animal:Ÿìl‘hÊŞecho–¿ª-n“"Enter“the“name“of“an“animal:“"¤ €‘hÊread‘¿ªANIMAL¡‘hÊecho–¿ª-n“"The“$ANIMAL“has“"¡‘hÊcase–¿ª$ANIMAL“in¡‘tIãhorse–¿ª|“dog“|“cat)“echo“-n“"four";;¡‘tIãman–¿ª|“kangaroo“)“echo“-n“"two";;¡‘tIã*)–¿ªecho“-n“"an“unknown“number“of";;¡‘hÊesac¡‘hÊecho–¿ª"“legs."ŸŸŸ‘Kâ:İThe–"Preturn“status“is“zero“if“no“ápattern“İis“matc²!hed.‘±ÖOtherwise,‘<»the“return“status¦‘Kâ:is–¦fthe“exit“status“of“the“ácommand-list‘ãfİexecuted.Œ‹ fŸò‘GİChapter–¦f3:‘İİBasic“Shell“F‘ÿeeatures’gm11 ƒ3* ı ÌÖ‘GŞselect¤­-‘Kâ:İThe–ôŞselect“İconstruct“alloš²!ws“the“easy“generation“of“men˜us.‘‡It“has“almost“the© 33‘Kâ:same–¦fsyn²!tax“as“the“Şfor“İcommand:Ÿùú‘hÊŞselect–¿ªáname‘\±Ş[in“áw²!ords‘3,Ş...‘r+];“do“ácommandss‚Ş;“done¡‘Kâ:İThe–alist“of“wš²!ords“follo˜wing“Şin“İis“expanded,‘'ügenerating“a“list“of“items.‘©1The“set“of¦‘Kâ:expanded–zŒwš²!ords“is“prin˜ted“on“the“standard“error“output“stream,‘ƒReac˜h“preceded¦‘Kâ:bš²!y–”{a“n˜um˜bMŞer.‘‚If“the“`Şin‘¦fáw˜ordss‚İ'“is“omitted,‘ËCthe“pMŞositional“parameters“are“prin˜ted,¦‘Kâ:as–€if“`Şin‘¦f"$@"İ'“had“bšMŞeen“sp˜ecifed.‘Ñ@The“ŞPS3“İprompt“is“then“displa•²!y“ed–€and“a“line¦‘Kâ:is–rread“from“the“standard“input.‘ÌoIf“the“line“consists“of“a“n•²!um“b•MŞer‘rcorresp“onding¦‘Kâ:to–9›one“of“the“displa•²!y“ed›9›w“ords,‘^hthen˜the˜v‘ÿdDalue˜of˜áname‘Ö¢İis˜set˜to˜that˜w“ord.‘—|If¦‘Kâ:the–rŸline“is“emptš²!y‘ÿe,‘¥­the“w˜ords“and“prompt“are“displa˜y˜ed“again.‘B‡If“ŞEOF“İis“read,¦‘Kâ:the–ôÖŞselect“İcommand“completes.‘É.An²!y“other“v‘ÿdDalue“read“causes“áname‘‘İİto“bMŞe“set¦‘Kâ:to–¦fnš²!ull.‘İİThe“line“read“is“sa˜v˜ed“in“the“v‘ÿdDariable“ŞREPLYİ.¡‘Kâ:The– Œácommands‘İare“executed“after“eacš²!h“selection“un˜til“a“Şbreak“İcommand“is¦‘Kâ:executed,–¦fat“whicš²!h“pMŞoin˜t“the“Şselect“İcommand“completes.¡‘Kâ:Here–®"is“an“example“that“alloš²!ws“the“user“to“pic˜k“a“ lename“from“the“curren˜t¦‘Kâ:directory‘ÿe,–¦fand“displa²!ys“the“name“and“index“of“the“ le“selected.©ùú‘hÊŞselect–¿ªfname“in“*;¤ €‘hÊdo¡‘hÊecho–¿ªyou“picked“$fname“\($REPLY\)¡‘hÊbreak;¡‘hÊdoneŸ''‘G((...‘>ÿ))¦‘hÊ((–¿ªáexpression“Ş))Ÿ­-‘Kâ:İThe– Äarithmetic“áexpression“İis“ev‘ÿdDaluated“according“to“the“rules“describšMŞed“b˜elo²!w¤ 33‘Kâ:(see–-ÍSection“6.5“[Shell“Arithmetic],‘O¦page“66).‘tIf“the“v‘ÿdDalue“of“the“expression“is¡‘Kâ:non-zero,‘-Nthe–return“status“is“0;‘A}otherwise“the“return“status“is“1.‘«iThis“is“exactly¡‘Kâ:equiv‘ÿdDalen²!t‘¦fto¦‘hÊŞlet‘¿ª"áexpressionŞ"¤­-‘Kâ:İSee–1Section“4.2“[Bash“Builtins],›&ÿ]]¦‘hÊ[[–¿ªáexpression“Ş]]¡‘Kâ:İReturn–âa“status“of“0“or“1“depMŞending“on“the“ev‘ÿdDaluation“of“the“conditional“expres-¤ 33‘Kâ:sion–£6áexpressionİ.‘ÜÍExpressions“are“compšMŞosed“of“the“primaries“describ˜ed“b˜elo²!w“in¡‘Kâ:Section–GU6.4“[Bash“Conditional“Expressions],‘opage“64.‘ÀªW‘ÿeord“splitting“and“ le-¡‘Kâ:name–î¶expansion“are“not“pšMŞerformed“on“the“w²!ords“b˜et•²!w“een–î¶the“`Ş[[İ'“and“`Ş]]İ';‘+ñtilde¡‘Kâ:expansion,›¬æparameter–«™and“v‘ÿdDariable“expansion,˜arithmetic“expansion,˜command¡‘Kâ:substitution,–¦fprošMŞcess“substitution,“and“quote“remo²!v‘ÿdDal“are“p˜erformed.Ÿ­-‘Kâ:When–²`the“`Ş==İ'“and“`Ş!=İ'“opšMŞerators“are“used,‘ã.the“string“to“the“righ²!t“of“the“op˜erator¡‘Kâ:is–ÁÅconsidered“a“pattern“and“matc²!hed“according“to“the“rules“describšMŞed“b˜elo²!w“in¡‘Kâ:Section–¡a3.5.8.1“[Pš²!attern“Matc˜hing],‘¢bpage“21.‘Ü1The“return“v‘ÿdDalue“is“0“if“the“string¡‘Kâ:matcš²!hes–&or“doMŞes“not“matc˜h“the“pattern,–$™respMŞectiv˜ely‘ÿe,“and–&1“otherwise.‘§ÈAn˜y“part¡‘Kâ:of–¦fthe“pattern“ma²!y“bšMŞe“quoted“to“force“it“to“b˜e“matc²!hed“as“a“string.Œ‹ rXŸò‘Gİ12’5»˜Bash–¦fReference“Man²!ual ƒ3* ı ÌÖ‘Kâ:Expressions–Ñšmaš²!y“bMŞe“com˜bined“using“the“follo˜wing“opMŞerators,‘ü)listed“in“decreasing¤ 33‘Kâ:order–¦fof“precedence:©‘Kâ:Ş(–¦fáexpression“Ş)¡’…³-İReturns–µ™the“v‘ÿdDalue“of“áexpressionİ.‘ vThis“maš²!y“bMŞe“used“to“o˜v˜erride“the¡’…³-normal–¦fprecedence“of“opMŞerators.¦‘Kâ:Ş!‘¦fáexpression¡’…³-İT‘ÿerue–¦fif“áexpression“İis“false.¦‘Kâ:áexpression1‘…ŸŞ&&‘¦fáexpression2¡’…³-İT‘ÿerue–¦fif“bMŞoth“áexpression1›…Ÿİand“áexpression2˜İare“true.¦‘Kâ:áexpression1‘…ŸŞ||‘¦fáexpression2¡’…³-İT‘ÿerue–¦fif“either“áexpression1›…Ÿİor“áexpression2˜İis“true.¦‘Kâ:The–åת&&“İand“Ş||“İcommands“do“not“execute“áexpression2‘Åİif“the“v‘ÿdDalue“of“áexpression1¡‘Kâ:İis–¦fsucienš²!t“to“determine“the“return“v‘ÿdDalue“of“the“en˜tire“conditional“expression.Ÿ¸‘Gë]3.2.6‘d(Grouping‘íMCommandsŸh‘!GİBash–¦Ëproš²!vides“t˜w˜o“w˜a˜ys“to“group“a“list“of“commands“to“bMŞe“executed“as“a“unit.‘ˆ©When“com-¡‘Gmands–Ä„are“groupšMŞed,‘Ì redirections“ma²!y“b˜e“applied“to“the“en²!tire“command“list.‘88F‘ÿeor“example,¡‘Gthe–¦foutput“of“all“the“commands“in“the“list“ma²!y“bMŞe“redirected“to“a“single“stream.¦‘GŞ()Ÿ´è‘hÊ(‘¿ªálist‘üªŞ)Ÿh‘Kâ:İPlacing–ë£a“list“of“commands“bMŞet•²!w“een›ë£paren“theses˜causes˜a˜subshell˜to˜bMŞe˜created,¡‘Kâ:and–N eac²!h“of“the“commands“in“álist‘‹ İto“bMŞe“executed“in“that“subshell.‘ÀiSince“the“álist¡‘Kâ:İis–oÂexecuted“in“a“subshell,‘z°v‘ÿdDariable“assignmen²!ts“do“not“remain“in“e ect“after“the¡‘Kâ:subshell‘¦fcompletes.¦‘GŞ{}Ÿ´è‘hÊ{–¿ªálist=Ş;“}Ÿh‘Kâ:İPlacing–†*a“list“of“commands“bšMŞet•²!w“een–†*curly“braces“causes“the“list“to“b˜e“executed¡‘Kâ:in–2vthe“currenš²!t“shell“con˜text.›·8No“subshell“is“created.˜The“semicolon“(or“newline)¡‘Kâ:follo²!wing–¦fálist‘ãfİis“required.¦‘!GIn–òèaddition“to“the“creation“of“a“subshell,‘there“is“a“subtle“di erence“bMŞet•²!w“een–òèthese“t•²!w“o¡‘Gconstructs–[due“to“historical“reasons.‘ E»The“braces“are“Şreserved‘¦fwordsİ,‘|Wso“they“m²!ust“bMŞe¡‘Gseparated–åÏfrom“the“álist‘"Ïİbš²!y“Şblankİs.‘œThe“paren˜theses“are“Şoperatorsİ,‘õ©and“are“recognized“as¡‘Gseparate–¦ftokš²!ens“b˜y“the“shell“ev˜en“if“they“are“not“separated“from“the“álist‘ãfİb˜y“whitespace.©h‘!GThe–¦fexit“status“of“bMŞoth“of“these“constructs“is“the“exit“status“of“álistİ.Ÿ¸‘GëT3.3‘™Shell‘f@F‘ş¦functionsŸh‘!GİShell–Hàfunctions“are“a“w•²!a“y–Hàto“group“commands“for“later“execution“using“a“single“name“for¡‘Gthe–9îgroup.›˜vThey“are“executed“just“lik²!e“a“Ş"İregularŞ"“İcommand.˜When“the“name“of“a“shell¡‘Gfunction–²%is“used“as“a“simple“command“name,‘õthe“list“of“commands“assoMŞciated“with“that¡‘Gfunction–×name“is“executed.‘­XShell“functions“are“executed“in“the“currenš²!t“shell“con˜text;‘E\no“new¡‘GproMŞcess–¦fis“created“to“in²!terpret“them.¦‘!GF‘ÿeunctions–¦fare“declared“using“this“syn²!tax:Œ‹ ¤Ÿò‘GİChapter–¦f3:‘İİBasic“Shell“F‘ÿeeatures’gm13 ƒ3* ı ÌÖ‘.ùœŞ[–¿ªfunction“]“áname‘\±Ş()“{“ácommand-list=Ş;“}©Ûø‘!GİThis–î´de nes“a“shell“function“named“ánameİ.‘¶ÇThe“reservš²!ed“w˜ord“Şfunction“İis“optional.‘¶ÇIf¤ 33‘Gthe–¹1Şfunction“İreservš²!ed“w˜ord“is“supplied,‘ıãthe“paren˜theses“are“optional.‘=The“áb•MŞo“dy‘©Iİof‘¹1the¡‘Gfunction–ô¼is“the“ácommand-list‘1¼İbMŞet•²!w“een–ô¼Ş{“İand“Ş}İ.‘ÈßThis“list“is“executed“whenev²!er“áname‘‘Ãİis¡‘GspMŞeci ed–¢Ìas“the“name“of“a“command.‘ܪThe“exit“status“of“a“function“is“the“exit“status“of“the¡‘Glast–¦fcommand“executed“in“the“b•MŞo“dy‘ÿe.¦‘!GNote–Oithat“for“historical“reasons,‘`Ïthe“curly“braces“that“surround“the“b•MŞo“dy–Oiof“the“function¡‘Gm²!ust–fÆbšMŞe“separated“from“the“b˜o˜dy“b²!y“Şblankİs“or“newlines.‘şThis“is“b˜ecause“the“braces“are¡‘Greserv•²!ed›¬%w“ords˜and˜are˜only˜recognized˜as˜suc“h˜when˜they˜are˜separated˜b“y˜whitespace.¡‘GAlso,–¦fthe“ácommand-list‘ãfİm²!ust“bMŞe“terminated“with“a“semicolon“or“a“newline.¦‘!GWhen–üa“function“is“executed,‘‡the“argumen²!ts“to“the“function“bšMŞecome“the“p˜ositional“pa-¡‘Grameters–ûÔduring“its“execution“(see“Section“3.4.1“[Pš²!ositional“P˜arameters],‘Q/page“14).‘Ş'The¡‘GspšMŞecial–UKparameter“`Ş#İ'“that“expands“to“the“n•²!um“b˜er–UKof“p˜ositional“parameters“is“up˜dated“to¡‘Gre ect–”the“c•²!hange.›@fP“ositional–”parameter“Ş0“İis“unc²!hanged.˜The“ŞFUNCNAME“İv‘ÿdDariable“is“set“to¡‘Gthe–¦fname“of“the“function“while“the“function“is“executing.¦‘!GIf–‚°the“builtin“command“Şreturn“İis“executed“in“a“function,‘¹Âthe“function“completes“and¡‘Gexecution– resumes“with“the“next“command“after“the“function“call.‘»When“a“function“com-¡‘Gpletes,‘ˆ¤the–[ev‘ÿdDalues“of“the“pšMŞositional“parameters“and“the“sp˜ecial“parameter“`Ş#İ'“are“restored¡‘Gto–¨ıthe“v‘ÿdDalues“they“had“prior“to“the“function's“execution.‘å¢If“a“nš²!umeric“argumen˜t“is“giv˜en“to¡‘GŞreturnİ,‘ˆ5that–[ is“the“function's“return“status;‘µ_otherwise“the“function's“return“status“is“the¡‘Gexit–¦fstatus“of“the“last“command“executed“bMŞefore“the“Şreturnİ.¦‘!GV‘ÿeariables–’»lošMŞcal“to“the“function“ma²!y“b˜e“declared“with“the“Şlocal“İbuiltin.‘×OThese“v‘ÿdDariables¡‘Gare–¦fvisible“only“to“the“function“and“the“commands“it“in•²!v“ok“es.¦‘!GF‘ÿeunctions–¦fmaš²!y“bMŞe“recursiv˜e.‘İİNo“limit“is“placed“on“the“n˜um˜bMŞer“of“recursiv˜e“calls.Ÿ ¥í‘GëT3.4‘™Shell‘f@PŒÌarametersŸÛø‘!GİA‘äÁáparameter‘®<İis–åan“en•²!tit“y–åthat“stores“v‘ÿdDalues.‘™åIt“can“bšMŞe“a“Şnameİ,‘4¾a“n•²!um“b˜er,‘4¾or–åone“of¡‘Gthe–.sspšMŞecial“c²!haracters“listed“b˜elo²!w.‘ vF‘ÿeor“the“shell's“purp˜oses,‘va“áv‘ÿdDariable‘Ëzİis“a“parameter¡‘Gdenoted–£4b²!y“a“Şnameİ.‘ÔGA‘¢óv›ÿdDariable“has“a“áv˜alue‘@;İand“zero“or“more“áattributesİ.‘ÔGA²!ttributes“are¡‘Gassigned–oçusing“the“Şdeclare“İbuiltin“command“(see“the“description“of“the“Şdeclare“İbuiltin“in¡‘GSection–¦f4.2“[Bash“Builtins],“page“36).¦‘!GA‘lVparameter–leis“set“if“it“has“bMŞeen“assigned“a“v›ÿdDalue.‘ʇThe“n²!ull“string“is“a“v˜alid“v˜alue.‘ʇOnce¡‘Ga–¦fv‘ÿdDariable“is“set,“it“maš²!y“bMŞe“unset“only“b˜y“using“the“Şunset“İbuiltin“command.¦‘!GA–¦fv‘ÿdDariable“maš²!y“bMŞe“assigned“to“b˜y“a“statemen˜t“of“the“formŸ(Å‘.ùœáname–Ş=[áv‘ÿdDalue“Ş]¦‘GİIf–8qáv›ÿdDalue‘Õxİis“not“giv²!en,‘œóthe“v˜ariable“is“assigned“the“n²!ull“string.‘ “şAll“áv˜alue‘İs“undergo“tilde¡‘Gexpansion,›ÿ´parameter–Öand“v‘ÿdDariable“expansion,˜command“substitution,˜arithmetic“expansion,¡‘Gand–åquote“remoš²!v‘ÿdDal“(detailed“bMŞelo˜w).‘™¶If“the“v‘ÿdDariable“has“its“Şinteger“İattribute“set,‘4«then¡‘Gáv‘ÿdDalue‘ÿâİis–bÛsub‘›»ject“to“arithmetic“expansion“ev²!en“if“the“Ş$((...‘>ÿ))“İexpansion“is“not“used“(see¡‘GSection–Ü¡3.5.5“[Arithmetic“Expansion],›ê/page“19).‘€W‘ÿeord“splitting“is“not“pMŞerformed,˜with“the¡‘Gexception–Yof“Ş"$@"“İas“explained“bšMŞelo²!w.‘H·Filename“expansion“is“not“p˜erformed.‘H·Assignmen²!t¡‘Gstatemen•²!ts›óma“y˜also˜appMŞear˜as˜argumen“ts˜to˜the˜Şdeclareİ,–îŞtypesetİ,“Şexportİ,“Şreadonlyİ,“and¡‘GŞlocal–¦fİbuiltin“commands.Œ‹‹˜Ÿò‘Gİ14’5»˜Bash–¦fReference“Man²!ual ƒ3* ı ÌÖ‘Gë]3.4.1‘d(P•–áositional‘íMP“arameters©ä‘!GİA‘mápMŞositional–mQparameter‘6zİis“a“parameter“denoted“b²!y“one“or“more“digits,‘Ÿ other“than“the¤ 33‘Gsingle–ÍÄdigit“Ş0İ.‘SøPš²!ositional“parameters“are“assigned“from“the“shell's“argumen˜ts“when“it“is¡‘Gin•²!v“ok“ed,‘¥Úand›rÃma“y˜bMŞe˜reassigned˜using˜the˜Şset˜İbuiltin˜command.‘BôP“ositional˜parameter˜ŞN¡‘Gİmaš²!y–8ÎbMŞe“referenced“as“Ş${N}İ,‘N¹or“as“Ş$N“İwhen“ŞN“İconsists“of“a“single“digit.‘¹UP˜ositional“parameters¡‘Gmaš²!y–Â$not“bMŞe“assigned“to“with“assignmen˜t“statemen˜ts.‘1The“Şset“İand“Şshift“İbuiltins“are“used¡‘Gto–ÖOset“and“unset“them“(see“Chapter“4“[Shell“Builtin“Commands],‘âIpage“31).‘m˜The“pMŞositional¡‘Gparameters–Ûğare“tempMŞorarily“replaced“when“a“shell“function“is“executed“(see“Section“3.3“[Shell¡‘GF‘ÿeunctions],–¦fpage“12).Ÿä‘!GWhen–awa“pMŞositional“parameter“consisting“of“more“than“a“single“digit“is“expanded,‘oAit“m²!ust¡‘GbMŞe–¦fenclosed“in“braces.Ÿ®‘Gë]3.4.2‘d(Spiecial‘íMP–áarameters¦‘!GİThe–[¬shell“treats“sevš²!eral“parameters“spMŞecially‘ÿe.‘ÄõThese“parameters“ma˜y“only“bMŞe“referenced;¡‘Gassignmenš²!t–¦fto“them“is“not“allo˜w˜ed.©áF‘GŞ*‘4IİExpands–što“the“pMŞositional“parameters,‘œùstarting“from“one.‘ÙïWhen“the“expansion¡‘Kâ:oMŞccurs–_øwithin“double“quotes,‘nit“expands“to“a“single“wš²!ord“with“the“v‘ÿdDalue“of“eac˜h¡‘Kâ:parameter–†%the“Şset“İbuiltin“command,‘dor“those“set“b˜y“the“shell“itself“(suc˜h“as“the“`Ş-iİ'¡‘Kâ:option).¦‘GŞ$‘4IİExpands–èƒto“the“proMŞcess“ãid“İof“the“shell.‘¤5In“a“Ş()“İsubshell,‘9 it“expands“to“the¡‘Kâ:proMŞcess–¦fãid“İof“the“in•²!v“oking–¦fshell,“not“the“subshell.¦‘GŞ!‘4IİExpands–ÙRto“the“proMŞcess“ãid“İof“the“most“recenš²!tly“executed“bac˜kground“(asyn-¡‘Kâ:c²!hronous)‘¦fcommand.¦‘GŞ0‘4IİExpands–cto“the“name“of“the“shell“or“shell“script.‘…‡This“is“set“at“shell“initialization.¡‘Kâ:If–O.Bash“is“in•²!v“ok“ed–O.with“a“ le“of“commands“(see“Section“3.8“[Shell“Scripts],¡‘Kâ:page–’M29),‘ÍFŞ$0“İis“set“to“the“name“of“that“ le.‘¡’If“Bash“is“started“with“the“`Ş-cİ'¡‘Kâ:option–¾H(see“Section“6.1“[In•²!v“oking–¾HBash],›@page“59),˜then“Ş$0“İis“set“to“the“ rst¡‘Kâ:argumenš²!t–®úafter“the“string“to“bMŞe“executed,‘± if“one“is“presen˜t.‘÷šOtherwise,‘± it“is“set¡‘Kâ:to–¦fthe“ lename“used“to“in•²!v“ok“e–¦fBash,“as“givš²!en“b˜y“argumen˜t“zero.Œ‹œ\Ÿò‘GİChapter–¦f3:‘İİBasic“Shell“F‘ÿeeatures’gm15 ƒ3* ı ÌÖ‘GŞ_‘4Iİ(An– underscore.)‘øA²!t“shell“startup,‘%‡set“to“the“absolute“ lename“of“the“shell“or¤ 33‘Kâ:shell–y{script“bMŞeing“executed“as“passed“in“the“argumenš²!t“list.‘WSubsequen˜tly‘ÿe,‘®@ex-¡‘Kâ:pands–to“the“last“argumen²!t“to“the“previous“command,‘·Ìafter“expansion.‘nAlso¡‘Kâ:set–}Çto“the“full“pathname“of“eacš²!h“command“executed“and“placed“in“the“en˜viron-¡‘Kâ:menš²!t–cïexpMŞorted“to“that“command.‘yWhen“c˜hec˜king“mail,‘“Rthis“parameter“holds¡‘Kâ:the–¦fname“of“the“mail“ le.Ÿ‡‘GëT3.5‘™Shell‘f@ExpansionsŸ66‘!GİExpansion–š is“pšMŞerformed“on“the“command“line“after“it“has“b˜een“split“in²!to“Ştokenİs.‘Ù¿There¡‘Gare–¦fsev²!en“kinds“of“expansion“pMŞerformed:©66‘ Øæ‘'¿«İbrace‘¦fexpansion¤4´‘ Øæ‘'¿«İtilde‘¦fexpansion¡‘ Øæ‘'¿«İparameter–¦fand“v‘ÿdDariable“expansion¡‘ Øæ‘'¿«İcommand‘¦fsubstitution¡‘ Øæ‘'¿«İarithmetic‘¦fexpansion¡‘ Øæ‘'¿«İw²!ord‘¦fsplitting¡‘ Øæ‘'¿«İ lename‘¦fexpansionŸ7·‘!GThe–Qorder“of“expansions“is:‘±´brace“expansion,›*Ìtilde“expansion,˜parameter,˜v‘ÿdDariable,˜and¤ 33‘Garithmetic–jeexpansion“and“command“substitution“(done“in“a“left-to-righš²!t“fashion),‘Ûdw˜ord¡‘Gsplitting,–¦fand“ lename“expansion.¦‘!GOn–8Esystems“that“can“suppšMŞort“it,‘œ¼there“is“an“additional“expansion“a²!v‘ÿdDailable:‘›ápro˜cess¡‘Gsubstitutionİ.‘NëThis–vÀis“pMŞerformed“at“the“same“time“as“parameter,–ªÖv‘ÿdDariable,“and‘vÀarithmetic¡‘Gexpansion–¦fand“command“substitution.¦‘!GOnly–_Ğbrace“expansion,›*w²!ord“splitting,˜and“ lename“expansion“can“cš²!hange“the“n˜um˜bMŞer¡‘Gof–aFwš²!ords“of“the“expansion;‘¾¶other“expansions“expand“a“single“w˜ord“to“a“single“w˜ord.‘}The¡‘Gonly–âKexceptions“to“this“are“the“expansions“of“Ş"$@"“İ(see“Section“3.4.2“[SpMŞecial“P²!arameters],¡‘Gpage–¦f14)“and“Ş"${áname‘Ş[@]}"“İ(see“Section“6.7“[Arra²!ys],“page“68).¦‘!GAfter–Nall“expansions,›VÇŞquote‘¦fremoval“İ(see“Section“3.5.9“[Quote“Remo²!v‘ÿdDal],˜page“22)“is¡‘GpMŞerformed.Ÿ‘Gë]3.5.1‘d(Brace‘íMExpansionŸ66‘!GİBrace–}expansion“is“a“mecš²!hanism“b˜y“whic˜h“arbitrary“strings“ma˜y“bMŞe“generated.‘zëThis“mec˜h-¡‘Ganism–@Úis“similar“to“á lename“expansion“İ(see“Section“3.5.8“[Filename“Expansion],‘gvpage“20),¡‘Gbut–Ğthe“ le“names“generated“need“not“exist.‘ZãPš²!atterns“to“bMŞe“brace“expanded“tak˜e“the“form¡‘Gof–›¬an“optional“ápream•²!bleİ,‘Ñfollo“w“ed››¬b“y˜a˜series˜of˜comma-separated˜strings˜bMŞet“w“een˜a˜pair˜of¡‘Gbraces,‘îfollo•²!w“ed›Àb“y˜an˜optional˜ápMŞostscriptİ.‘‘The˜pream“ble˜is˜pre xed˜to˜eac“h˜string˜con“tained¡‘Gwithin–½vthe“braces,‘Ã:and“the“pšMŞostscript“is“then“app˜ended“to“eac²!h“resulting“string,‘Ã:expanding¡‘Gleft–¦fto“righ²!t.¦‘!GBrace–`­expansions“maš²!y“bMŞe“nested.‘ ±The“results“of“eac˜h“expanded“string“are“not“sorted;¡‘Gleft–¦fto“righš²!t“order“is“preserv˜ed.‘İİF‘ÿeor“example,Ÿƒ‘.ùœŞbash$–¿ªecho“a{d,c,b}eŸ €‘.ùœade–¿ªace“abeŒ‹ª®Ÿò‘Gİ16’5»˜Bash–¦fReference“Man²!ual ƒ3* ı ÌÖ‘!GBrace–DÉexpansion“is“pšMŞerformed“b˜efore“anš²!y“other“expansions,‘lband“an˜y“c˜haracters“spMŞecial¤ 33‘Gto–Î÷other“expansions“are“preserv²!ed“in“the“result.›WIt“is“strictly“textual.˜Bash“doMŞes“not“apply¡‘Gan•²!y›@ syn“tactic˜in“terpretation˜to˜the˜con“text˜of˜the˜expansion˜or˜the˜text˜bMŞet“w“een˜the˜braces.¡‘GT‘ÿeo›Xua•²!v“oid˜con icts˜with˜parameter˜expansion,‘„ùthe˜string˜`Ş${İ'˜is˜not˜considered˜eligible˜for¡‘Gbrace‘¦fexpansion.©‘!GA‘äcorrectly-formed–êbrace“expansion“mš²!ust“con˜tain“unquoted“opMŞening“and“closing“braces,¡‘Gand–Dat“least“one“unquoted“comma.‘ HwAn²!y“incorrectly“formed“brace“expansion“is“left“un-¡‘Gc²!hanged.¦‘!GThis–¸©construct“is“t²!ypically“used“as“shorthand“when“the“common“pre x“of“the“strings“to¡‘GbšMŞe–¦fgenerated“is“longer“than“in“the“ab˜o•²!v“e‘¦fexample:¤]Ş‘.ùœŞmkdir‘¿ª/usr/local/src/bash/{old,new,dist,bugs}¦‘!Gİor¡‘.ùœŞchown–¿ªroot“/usr/{ucb/{ex,edit},lib/{ex?.?*,how_ex}}Ÿ™™‘Gë]3.5.2‘d(Tilde‘íMExpansionŸ‘!GİIf–Ka“wš²!ord“bMŞegins“with“an“unquoted“tilde“c˜haracter“(`Ş~İ'),‘´Úall“of“the“c˜haracters“up“to¤ 33‘Gthe–'“ rst“unquoted“slash“(or“all“c²!haracters,‘GŞif“there“is“no“unquoted“slash)“are“considered“a¡‘Gátilde-pre xİ.‘”KIf–8‹none“of“the“cš²!haracters“in“the“tilde-pre x“are“quoted,‘]the“c˜haracters“in“the¡‘Gtilde-pre x–81follo²!wing“the“tilde“are“treated“as“a“pMŞossible“álogin“nameİ.‘¹!If“this“login“name“is“the¡‘Gn²!ull–Ãstring,‘ÊMthe“tilde“is“replaced“with“the“v›ÿdDalue“of“the“ŞHOME“İshell“v˜ariable.‘4If“ŞHOME“İis“unset,¡‘Gthe–bKhome“directory“of“the“user“executing“the“shell“is“substituted“instead.‘‹Otherwise,‘‘Cthe¡‘Gtilde-pre x–¦fis“replaced“with“the“home“directory“assošMŞciated“with“the“sp˜eci ed“login“name.¦‘!GIf–í§the“tilde-pre x“is“`Ş~+İ',‘ÿwthe“v›ÿdDalue“of“the“shell“v˜ariable“ŞPWD“İreplaces“the“tilde-pre x.‘³ŸIf¡‘Gthe–¦ftilde-pre x“is“`Ş~-İ',“the“v›ÿdDalue“of“the“shell“v˜ariable“ŞOLDPWDİ,“if“it“is“set,“is“substituted.¦‘!GIf–—Jthe“cš²!haracters“follo˜wing“the“tilde“in“the“tilde-pre x“consist“of“a“n˜um˜bMŞer“áNİ,“optionally¡‘Gpre xed–Ìbš²!y“a“`Ş+İ'“or“a“`Ş-İ',‘÷½the“tilde-pre x“is“replaced“with“the“correspMŞonding“elemen˜t“from“the¡‘Gdirectory–CÅstacš²!k,‘kas“it“w˜ould“bMŞe“displa˜y˜ed“b˜y“the“Şdirs“İbuiltin“in˜v˜ok˜ed“with“the“c˜haracters¡‘Gfolloš²!wing–£Âtilde“in“the“tilde-pre x“as“an“argumen˜t“(see“Section“6.8“[The“Directory“Stac˜k],¡‘Gpage–?š69).‘©yIf“the“tilde-pre x,›eçsans“the“tilde,˜consists“of“a“n•²!um“bMŞer–?šwithout“a“leading“`Ş+İ'“or¡‘G`Ş-İ',–¦f`Ş+İ'“is“assumed.¦‘!GIf–¦fthe“login“name“is“inš²!v‘ÿdDalid,“or“the“tilde“expansion“fails,“the“w˜ord“is“left“unc˜hanged.¦‘!GEacš²!h–„Êv‘ÿdDariable“assignmen˜t“is“c˜hec˜k˜ed“for“unquoted“tilde-pre xes“immediately“follo˜wing“a¡‘G`Ş:İ'–­üor“`Ş=İ'.›ôIn“these“cases,‘¯átilde“expansion“is“also“pMŞerformed.˜Consequenš²!tly‘ÿe,‘¯áone“ma˜y“use“ le¡‘Gnames–oËwith“tildes“in“assignmen²!ts“to“ŞPATHİ,–z¶ŞMAILPATHİ,“and›oËŞCDPATHİ,“and˜the˜shell˜assigns˜the¡‘Gexpanded‘¦fv‘ÿdDalue.¦‘!GThe–¦ffolloš²!wing“table“sho˜ws“ho˜w“Bash“treats“unquoted“tilde-pre xes:¤îï‘GŞ~‘4IİThe–¦fv‘ÿdDalue“of“Ş$HOME¡‘G~/foo‘¡İ`Ş$HOME/fooİ'¡‘GŞ~fred/fooŸ 33‘Kâ:İThe–¦fsubMŞdirectory“Şfoo“İof“the“home“directory“of“the“user“Şfred¡‘G~+/foo‘R÷İ`Ş$PWD/fooİ'¡‘GŞ~-/foo‘R÷İ`Ş${OLDPWD-'~-'}/fooİ'Œ‹·Ÿò‘GİChapter–¦f3:‘İİBasic“Shell“F‘ÿeeatures’gm17 ƒ3* ı ÌÖ‘GŞ~áN‘+ÚâİThe–¦fstring“that“wš²!ould“bMŞe“displa˜y˜ed“b˜y“`Şdirs“+áN‘/®İ'¤iï‘GŞ~+áN‘&8İThe–¦fstring“that“wš²!ould“bMŞe“displa˜y˜ed“b˜y“`Şdirs“+áN‘/®İ'¡‘GŞ~-áN‘&8İThe–¦fstring“that“wš²!ould“bMŞe“displa˜y˜ed“b˜y“`Şdirs“-áN‘/®İ'Ÿmv‘Gë]3.5.3‘d(Shell–íMP–áarameter“ExpansionŸiî‘!GİThe–JÍ`Ş$İ'“cš²!haracter“in˜troMŞduces“parameter“expansion,›]command“substitution,˜or“arithmetic¤ 33‘Gexpansion.‘‹¦The–¯¿parameter“name“or“sym²!bšMŞol“to“b˜e“expanded“ma²!y“b˜e“enclosed“in“braces,‘áwhic²!h¡‘Gare–©boptional“but“servš²!e“to“protect“the“v‘ÿdDariable“to“bMŞe“expanded“from“c˜haracters“immediately¡‘Gfolloš²!wing–¦fit“whic˜h“could“bMŞe“in˜terpreted“as“part“of“the“name.©iî‘!GWhen–lÁbraces“are“used,‘ŞVthe“matcš²!hing“ending“brace“is“the“ rst“`Ş}İ'“not“escapMŞed“b˜y“a¡‘Gbacš²!kslash–´Šor“within“a“quoted“string,‘øand“not“within“an“em˜bMŞedded“arithmetic“expansion,¡‘Gcommand–¦fsubstitution,“or“parameter“expansion.¦‘!GThe–í‰basic“form“of“parameter“expansion“is“$Ş{áparameter‘É)Ş}İ.‘³EThe“v‘ÿdDalue“of“áparameter‘¶²İis¡‘Gsubstituted.‘37The–ÂÙbraces“are“required“when“áparameter‘Œİis“a“pMŞositional“parameter“with“more¡‘Gthan–ßone“digit,‘íÅor“when“áparameter‘¨¨İis“follo•²!w“ed›ßb“y˜a˜c“haracter˜that˜is˜not˜to˜bMŞe˜in“terpreted¡‘Gas–¦fpart“of“its“name.¦‘!GIf–Iİthe“ rst“cš²!haracter“of“áparameter‘İis“an“exclamation“pMŞoin˜t,‘\_a“lev˜el“of“v‘ÿdDariable“indirection¡‘Gis–‰¨in²!troMŞduced.‘‡¢Bash“uses“the“v›ÿdDalue“of“the“v˜ariable“formed“from“the“rest“of“áparameter‘RÑİas¡‘Gthe–á’name“of“the“v›ÿdDariable;‘ÿ(this“v˜ariable“is“then“expanded“and“that“v˜alue“is“used“in“the“rest¡‘Gof–Fthe“substitution,‘~rather“than“the“v‘ÿdDalue“of“áparameter‘Ğoİitself.‘}This“is“kno²!wn“as“Şindirect¡‘Gexpansionİ.‘İİThe–¦fexception“to“this“is“the“expansion“of“$Ş{İ!ápre x*Ş}“İdescribšMŞed“b˜elo²!w.¦‘!GIn–Ôreacš²!h“of“the“cases“bMŞelo˜w,‘õáw˜ord‘BÄİis“sub‘›»ject“to“tilde“expansion,‘õparameter“expansion,¡‘Gcommand–¦fsubstitution,“and“arithmetic“expansion.¦‘!GWhen–dnot“pMŞerforming“substring“expansion,‘#Bash“tests“for“a“parameter“that“is“unset“or¡‘Gn²!ull;‘€Öomitting–8the“colon“results“in“a“test“only“for“a“parameter“that“is“unset.‘’½Put“another¡‘Gw•²!a“y‘ÿe,›şif–xäthe“colon“is“included,˜the“opšMŞerator“tests“for“b˜oth“existence“and“that“the“v‘ÿdDalue“is“not¡‘Gn²!ull;–¦fif“the“colon“is“omitted,“the“opMŞerator“tests“only“for“existence.ŸL‘GŞ${áparameter‘É)Ş:æáw²!ordnRŞ}¡‘Kâ:İIf–£ºáparameter‘lãİis“unset“or“nš²!ull,‘¤Cthe“expansion“of“áw˜ord‘ İis“substituted.‘ÜùOtherwise,¡‘Kâ:the–¦fv‘ÿdDalue“of“áparameter‘oİis“substituted.©iï‘GŞ${áparameter‘É)Ş:=áw²!ordnRŞ}¡‘Kâ:İIf–÷áparameter‘À-İis“unset“or“nš²!ull,‘ +the“expansion“of“áw˜ord‘eVİis“assigned“to“áparameterİ.¡‘Kâ:The–¸Ëv‘ÿdDalue“of“áparameter‘ôİis“then“substituted.‘ P²!ositional“parameters“and“spMŞecial¡‘Kâ:parameters–¦fmaš²!y“not“bMŞe“assigned“to“in“this“w˜a˜y‘ÿe.¦‘GŞ${áparameter‘É)Ş:?áw²!ordnRŞ}¡‘Kâ:İIf–"öáparameter‘ìİis“nš²!ull“or“unset,‘=@the“expansion“of“áw˜ord‘‘Hİ(or“a“message“to“that“e ect¡‘Kâ:if–],áwš²!ord‘Ë~İis“not“presen˜t)“is“written“to“the“standard“error“and“the“shell,‘kÑif“it“is“not¡‘Kâ:in•²!teractiv“e,–¦fexits.‘İİOtherwise,“the“v‘ÿdDalue“of“áparameter‘oİis“substituted.¦‘GŞ${áparameter‘É)Ş:+áw²!ordnRŞ}¡‘Kâ:İIf–C áparameter‘ 4İis“n²!ull“or“unset,›j4nothing“is“substituted,˜otherwise“the“expansion¡‘Kâ:of–¦fáw²!ord‘¸İis“substituted.Œ‹ÄïŸò‘Gİ18’5»˜Bash–¦fReference“Man²!ual ƒ3* ı ÌÖ‘GŞ${áparameter‘É)Ş:áo set=Ş}¤ 33‘G${áparameter‘É)Ş:áo set=Ş:álengthŞ}¡‘Kâ:İExpands–syto“up“to“álength“İcš²!haracters“of“áparameter‘<¢İstarting“at“the“c˜haracter¡‘Kâ:spMŞeci ed–±mb²!y“áo setİ.‘şòIf“álength“İis“omitted,‘´/expands“to“the“substring“of“áparameter¡‘Kâ:İstarting–z¥at“the“cš²!haracter“spMŞeci ed“b˜y“áo setİ.‘Z™álength“İand“áo set‘·¥İare“arithmetic¡‘Kâ:expressions–´´(see“Section“6.5“[Shell“Arithmetic],‘¸Hpage“66).‘ÈThis“is“referred“to“as¡‘Kâ:Substring‘¦fExpansion.Ÿ™™‘Kâ:álength–ÂÌİmš²!ust“ev‘ÿdDaluate“to“a“n˜um˜bMŞer“greater“than“or“equal“to“zero.‘3If“áo set‘ÿÌİev‘ÿdDal-¡‘Kâ:uates–Hsto“a“n•²!um“bMŞer–Hsless“than“zero,‘pöthe“v‘ÿdDalue“is“used“as“an“o set“from“the“end¡‘Kâ:of–€šthe“v‘ÿdDalue“of“áparameterİ.‘lzIf“áparameter‘IÃİis“`Ş@İ',‘·'the“result“is“álength“İpMŞositional¡‘Kâ:parameters–ØbMŞeginning“at“áo setİ.‘J2If“áparameter‘éİis“an“arraš²!y“name“indexed“b˜y“`Ş@İ'¡‘Kâ:or–—ê`Ş*İ',‘šÏthe“result“is“the“álength“İmemš²!bMŞers“of“the“arra˜y“bMŞeginning“with“Ş${áparame-¡‘Kâ:ter‘É)Ş[áo set=Ş]}İ.‘ÉßSubstring–jmindexing“is“zero-based“unless“the“pMŞositional“parameters¡‘Kâ:are–¦fused,“in“whic²!h“case“the“indexing“starts“at“1.©ÿÿ‘GŞ${!ápre x‘Á_Ş*}¡‘Kâ:İExpands–Pto“the“names“of“v‘ÿdDariables“whose“names“bMŞegin“with“ápre xİ,‘z†separated¡‘Kâ:bš²!y–¦fthe“ rst“c˜haracter“of“the“ŞIFS“İspMŞecial“v‘ÿdDariable.¦‘GŞ${#áparameter‘É)Ş}¡‘Kâ:İThe–Ôèlength“in“c²!haracters“of“the“expanded“v‘ÿdDalue“of“áparameter‘İis“substituted.¡‘Kâ:If–(µáparameter‘ñŞİis“`Ş*İ'“or“`Ş@İ',‘‰Hthe“v‘ÿdDalue“substituted“is“the“n•²!um“bšMŞer–(µof“p˜ositional¡‘Kâ:parameters.‘`›If–Ñûáparameter‘›$İis“an“arraš²!y“name“subscripted“b˜y“`Ş*İ'“or“`Ş@İ',‘Üàthe“v‘ÿdDalue¡‘Kâ:substituted–¦fis“the“n•²!um“bMŞer–¦fof“elemenš²!ts“in“the“arra˜y‘ÿe.¦‘GŞ${áparameter‘É)Ş#áw²!ordnRŞ}¡‘G${áparameter‘É)Ş##áw²!ordnRŞ}¡‘Kâ:İThe–Õ áw²!ord‘Crİis“expanded“to“proMŞduce“a“pattern“just“as“in“ lename“expansion“(see¡‘Kâ:Section–?M3.5.8“[Filename“Expansion],‘e†page“20).‘¨‘If“the“pattern“matc²!hes“the“bMŞe-¡‘Kâ:ginning–a(of“the“expanded“v‘ÿdDalue“of“áparameterİ,‘othen“the“result“of“the“expansion“is¡‘Kâ:the–Jßexpanded“v‘ÿdDalue“of“áparameter‘İwith“the“shortest“matc²!hing“pattern“(the“`Ş#İ'¡‘Kâ:case)–õØor“the“longest“matc²!hing“pattern“(the“`Ş##İ'“case)“deleted.‘£If“áparameter‘¿İis“`Ş@İ'¡‘Kâ:or–h}`Ş*İ',‘tßthe“pattern“remoš²!v‘ÿdDal“opMŞeration“is“applied“to“eac˜h“pMŞositional“parameter“in¡‘Kâ:turn,‘Úõand–Ğrthe“expansion“is“the“resultanš²!t“list.‘\If“áparameter‘™›İis“an“arra˜y“v‘ÿdDariable¡‘Kâ:subscripted–κwith“`Ş@İ'“or“`Ş*İ',‘Ïthe“pattern“remoš²!v‘ÿdDal“opMŞeration“is“applied“to“eac˜h¡‘Kâ:memš²!bMŞer–¦fof“the“arra˜y“in“turn,“and“the“expansion“is“the“resultan˜t“list.¦‘GŞ${áparameter‘É)Ş%áw²!ordnRŞ}¡‘G${áparameter‘É)Ş%%áw²!ordnRŞ}¡‘Kâ:İThe–B$áw²!ord‘°vİis“expanded“to“proMŞduce“a“pattern“just“as“in“ lename“expansion.‘±If¡‘Kâ:the–*qpattern“matc²!hes“a“trailing“pMŞortion“of“the“expanded“v‘ÿdDalue“of“áparameterİ,¡‘Kâ:then–·$the“result“of“the“expansion“is“the“v‘ÿdDalue“of“áparameter‘€Mİwith“the“shortest¡‘Kâ:matcš²!hing–‹êpattern“(the“`Ş%İ'“case)“or“the“longest“matc˜hing“pattern“(the“`Ş%%İ'“case)¡‘Kâ:deleted.‘Å´If–ó®áparameter‘¼×İis“`Ş@İ'“or“`Ş*İ',‘the“pattern“remo²!v‘ÿdDal“opMŞeration“is“applied“to¡‘Kâ:eacš²!h–v°pMŞositional“parameter“in“turn,‘ªÂand“the“expansion“is“the“resultan˜t“list.‘N¼If¡‘Kâ:áparameter‘İis–ÃÜan“arraš²!y“v‘ÿdDariable“subscripted“with“`Ş@İ'“or“`Ş*İ',‘Ë:the“pattern“remo˜v‘ÿdDal¡‘Kâ:opMŞeration–’0is“applied“to“eacš²!h“mem˜bMŞer“of“the“arra˜y“in“turn,‘–;and“the“expansion“is¡‘Kâ:the–¦fresultan²!t“list.Œ‹ÓhŸò‘GİChapter–¦f3:‘İİBasic“Shell“F‘ÿeeatures’gm19 ƒ3* ı ÌÖ‘GŞ${áparameter‘É)Ş/ápatternŞ/ástring‘ğŞ}¤ 33‘G${áparameter‘É)Ş//ápatternŞ/ástring‘ğŞ}¡‘Kâ:İThe–xÁápattern“İis“expanded“to“proMŞduce“a“pattern“just“as“in“ lename“expansion.¡‘Kâ:áPš²!arameter‘Zİis–ßexpanded“and“the“longest“matc˜h“of“ápattern“İagainst“its“v‘ÿdDalue“is¡‘Kâ:replaced–[~with“ástringİ.›ı%In“the“ rst“form,‘ˆÄonly“the“ rst“matc²!h“is“replaced.˜The¡‘Kâ:second–(>form“causes“all“matc²!hes“of“ápattern“İto“bMŞe“replaced“with“ástringİ.‘³ĞIf“ápattern¡‘Kâ:İbMŞegins–@˜with“`Ş#İ',‘g$it“mš²!ust“matc˜h“at“the“bMŞeginning“of“the“expanded“v‘ÿdDalue“of“ápa-¡‘Kâ:rameterİ.‘^If–Ñ"ápattern“İbMŞegins“with“`Ş%İ',‘ÛÑit“mš²!ust“matc˜h“at“the“end“of“the“expanded¡‘Kâ:v‘ÿdDalue–æÇof“áparameterİ.‘ÿIf“ástring‘Ößİis“n•²!ull,‘ößmatc“hes–æÇof“ápattern“İare“deleted“and“the“Ş/¡‘Kâ:İfolloš²!wing–:¬ápattern“İma˜y“bMŞe“omitted.‘š°If“áparameter‘Õİis“`Ş@İ'“or“`Ş*İ',‘_¾the“substitution¡‘Kâ:opšMŞeration–€çis“applied“to“eac²!h“p˜ositional“parameter“in“turn,‘ˆgand“the“expansion“is¡‘Kâ:the–Âresultanš²!t“list.‘0óIf“áparameter‘‹Aİis“an“arra˜y“v‘ÿdDariable“subscripted“with“`Ş@İ'“or“`Ş*İ',¡‘Kâ:the–¢Üsubstitution“opMŞeration“is“applied“to“eacš²!h“mem˜bMŞer“of“the“arra˜y“in“turn,‘£‘and¡‘Kâ:the–¦fexpansion“is“the“resultan²!t“list.Ÿ§A‘Gë]3.5.4‘d(Command‘íMSubstitutionŸ†Ó‘!GİCommand–µİsubstitution“allo²!ws“the“output“of“a“command“to“replace“the“command“itself.¡‘GCommand–¦fsubstitution“oMŞccurs“when“a“command“is“enclosed“as“follo²!ws:¤Ó ‘.ùœŞ$(ácommandnRŞ)©†Ó‘Gİor¡‘.ùœŞ`ácommandnRŞ`¦‘GİBash–h{pMŞerforms“the“expansion“b²!y“executing“ácommand‘ÖÍİand“replacing“the“command“sub-¤ 33‘Gstitution–Ö:with“the“standard“output“of“the“command,‘"/with“an²!y“trailing“newlines“deleted.¡‘GEmš²!bMŞedded–Ænewlines“are“not“deleted,‘Ιbut“they“ma˜y“bMŞe“remo˜v˜ed“during“w˜ord“splitting.‘>YThe¡‘Gcommand–¦fsubstitution“Ş$(cat“á le‘Ş)“İcan“bMŞe“replaced“bš²!y“the“equiv‘ÿdDalen˜t“but“faster“Ş$(<“á le‘Ş)İ.¦‘!GWhen–ûthe“old-stš²!yle“bac˜kquote“form“of“substitution“is“used,‘6àbac˜kslash“retains“its“literal¡‘Gmeaning–”except“when“follo•²!w“ed›”b“y˜`Ş$İ',–Ïf`Ş`İ',“or˜`Ş\İ'.‘¦¬The˜ rst˜bac•²!kquote˜not˜preceded˜b“y˜a¡‘Gbac²!kslash–eterminates“the“command“substitution.‘„When“using“the“Ş$(ácommandnRŞ)“İform,‘•kall¡‘Gc•²!haracters›¦fbMŞet“w“een˜the˜paren“theses˜mak“e˜up˜the˜command;˜none˜are˜treated˜spMŞecially‘ÿe.¦‘!GCommand–Åsubstitutions“maš²!y“bMŞe“nested.‘’ÂT‘ÿeo“nest“when“using“the“bac˜kquoted“form,‘ò$escapMŞe¡‘Gthe–¦finner“bacš²!kquotes“with“bac˜kslashes.¦‘!GIf–‚the“substitution“appMŞears“within“double“quotes,‘ˆãw²!ord“splitting“and“ lename“expansion¡‘Gare–¦fnot“pMŞerformed“on“the“results.Ÿ§A‘Gë]3.5.5‘d(Arithmetic‘íMExpansionŸ†Ó‘!GİArithmetic–ä“expansion“allo²!ws“the“ev‘ÿdDaluation“of“an“arithmetic“expression“and“the“substi-¡‘Gtution–¦fof“the“result.‘İİThe“format“for“arithmetic“expansion“is:ŸÓ ‘.ùœŞ$((–¿ªáexpression“Ş))¦‘!GİThe– jexpression“is“treated“as“if“it“w²!ere“within“double“quotes,‘$«but“a“double“quote“inside¡‘Gthe–Äparenš²!theses“is“not“treated“spMŞecially‘ÿe.‘“÷All“tok˜ens“in“the“expression“undergo“parameter¡‘Gexpansion,–{command›Ñ«substitution,“and˜quote˜remo•²!v‘ÿdDal.‘_«Arithmetic˜substitutions˜ma“y˜bMŞe¡‘Gnested.Œ‹⋟ò‘Gİ20’5»˜Bash–¦fReference“Man²!ual ƒ3* ı ÌÖ‘!GThe–B¢ev‘ÿdDaluation“is“pšMŞerformed“according“to“the“rules“listed“b˜elo²!w“(see“Section“6.5“[Shell¤ 33‘GArithmetic],›¨Fpage–§æ66).‘â]If“the“expression“is“in²!v‘ÿdDalid,˜Bash“prin²!ts“a“message“indicating“failure¡‘Gto–¦fthe“standard“error“and“no“substitution“oMŞccurs.Ÿ]]‘Gë]3.5.6‘d(Proicess‘íMSubstitutionŸáâ‘!GİProšMŞcess–;substitution“is“supp˜orted“on“systems“that“supp˜ort“named“pip˜es“(ãfifÁ´oİs)“or“the¡‘G`Ş/dev/fdİ'–¦fmethošMŞd“of“naming“op˜en“ les.‘İİIt“tak²!es“the“form“of¤.¯‘.ùœŞ<(álist=Ş)©áâ‘Gİor¡‘.ùœŞ>(álist=Ş)¦‘GİThe–ÏÒproMŞcess“álist‘ Òİis“run“with“its“input“or“output“connected“to“a“ãfifÁ´o“İor“some“ le“in“`Ş/dev/fdİ'.¤ 33‘GThe–qname“of“this“ le“is“passed“as“an“argumenš²!t“to“the“curren˜t“command“as“the“result“of“the¡‘Gexpansion.›¶™If–î¥the“Ş>(álist=Ş)“İform“is“used,‘´writing“to“the“ le“will“pro²!vide“input“for“álistİ.˜If“the¡‘GŞ<(álist=Ş)–•Éİform“is“used,‘™the“ le“passed“as“an“argumen²!t“should“bMŞe“read“to“obtain“the“output“of¡‘Gálistİ.‘ÕùNote–ºthat“no“space“ma²!y“appšMŞear“b˜et•²!w“een–ºthe“Ş<“İor“Ş>“İand“the“left“paren²!thesis,‘“votherwise¡‘Gthe–¦fconstruct“wš²!ould“bMŞe“in˜terpreted“as“a“redirection.¦‘!GWhen–bÒa²!v‘ÿdDailable,‘‘íprošMŞcess“substitution“is“p˜erformed“sim²!ultaneously“with“parameter“and¡‘Gv‘ÿdDariable–¦fexpansion,“command“substitution,“and“arithmetic“expansion.Ÿ]]‘Gë]3.5.7‘d(W‘şÄ£ord‘íMSplittingŸáâ‘!GİThe–X]shell“scans“the“results“of“parameter“expansion,›„Ûcommand“substitution,˜and“arith-¡‘Gmetic–¦fexpansion“that“did“not“oMŞccur“within“double“quotes“for“w²!ord“splitting.¦‘!GThe–Mshell“treats“eacš²!h“c˜haracter“of“Ş$IFS“İas“a“delimiter,‘¶Åand“splits“the“results“of“the¡‘Gother–Å}expansions“inš²!to“w˜ords“on“these“c˜haracters.‘;!If“ŞIFS“İis“unset,‘ Bor“its“v‘ÿdDalue“is“exactly¡‘GŞİ,–ëthe›î default,“then˜an•²!y˜sequence˜of˜ŞIFS˜İc“haracters˜serv“es˜to˜delimit¡‘Gwš²!ords.‘‹ÆIf–° ŞIFS“İhas“a“v‘ÿdDalue“other“than“the“default,‘áathen“sequences“of“the“whitespace“c˜haracters¡‘GŞspace–UJİand“Ştab“İare“ignored“at“the“bMŞeginning“and“end“of“the“w²!ord,‘eƒas“long“as“the“whitespace¡‘Gcš²!haracter–èÑis“in“the“v‘ÿdDalue“of“ŞIFS“İ(an“ŞIFS“İwhitespace“c˜haracter).‘¥An˜y“c˜haracter“in“ŞIFS“İthat¡‘Gis–¦fnot“ŞIFS“İwhitespace,“along“with“anš²!y“adjacen˜t“ŞIFS“İwhitespace“c˜haracters,“delimits“a“ eld.¡‘GA‘ÜÛsequence–Üéof“ŞIFS“İwhitespace“c²!haracters“is“also“treated“as“a“delimiter.‘eIf“the“v‘ÿdDalue“of“ŞIFS¡‘Gİis–¦fnš²!ull,“no“w˜ord“splitting“oMŞccurs.¦‘!GExplicit–3mnš²!ull“argumen˜ts“(Ş""“İor“Ş''İ)“are“retained.‘ „òUnquoted“implicit“n˜ull“argumen˜ts,¡‘Gresulting–Ğófrom“the“expansion“of“parameters“that“ha•²!v“e–Ğóno“v‘ÿdDalues,‘û£are“remo•²!v“ed.‘–·If–Ğóa“parameter¡‘Gwith–¦fno“v‘ÿdDalue“is“expanded“within“double“quotes,“a“nš²!ull“argumen˜t“results“and“is“retained.¦‘!GNote–¦fthat“if“no“expansion“ošMŞccurs,“no“splitting“is“p˜erformed.Ÿ]]‘Gë]3.5.8‘d(Filename‘íMExpansionŸáâ‘!GİAfter–²1w²!ord“splitting,‘ãunless“the“`Ş-fİ'“option“has“bMŞeen“set“(see“Section“4.3“[The“Set“Builtin],¡‘Gpage–-£46),‘EÊBash“scans“eacš²!h“w˜ord“for“the“c˜haracters“`Ş*İ',–EÊ`Ş?İ',“and–-£`Ş[İ'.‘µœIf“one“of“these“c˜haracters¡‘GappMŞears,›K>then–4tthe“w²!ord“is“regarded“as“a“ápatternİ,˜and“replaced“with“an“alphabMŞetically“sorted¡‘Glist–ÓŸof“ le“names“matcš²!hing“the“pattern.‘e‡If“no“matc˜hing“ le“names“are“found,‘Şíand“the“shell¡‘Goption–^RŞnullglob“İis“disabled,‘l¼the“wš²!ord“is“left“unc˜hanged.‘ÅÖIf“the“Şnullglob“İoption“is“set,‘l¼andŒ‹ğ=Ÿò‘GİChapter–¦f3:‘İİBasic“Shell“F‘ÿeeatures’gm21 ƒ3* ı ÌÖ‘Gno–£œmatcš²!hes“are“found,‘¤+the“w˜ord“is“remo˜v˜ed.‘ÜïIf“the“shell“option“Şnocaseglob“İis“enabled,‘¤+the¤ 33‘Gmatc²!h–¦fis“pšMŞerformed“without“regard“to“the“case“of“alphab˜etic“c²!haracters.©S÷‘!GWhen–§ a“pattern“is“used“for“ lename“generation,‘Úthe“c²!haracter“`Ş.İ'“at“the“start“of“a“ lename¡‘Gor–Ñ|immediately“folloš²!wing“a“slash“m˜ust“bMŞe“matc˜hed“explicitly‘ÿe,‘üunless“the“shell“option“Şdotglob¡‘Gİis–Äset.‘6ùWhen“matcš²!hing“a“ le“name,‘ˇthe“slash“c˜haracter“m˜ust“alw˜a˜ys“bMŞe“matc˜hed“explicitly‘ÿe.¡‘GIn–¦fother“cases,“the“`Ş.İ'“c²!haracter“is“not“treated“spMŞecially‘ÿe.¦‘!GSee–”·the“description“of“Şshopt“İin“Section“4.2“[Bash“Builtins],›˜Apage“36,˜for“a“description“of¡‘Gthe–¦fŞnocaseglobİ,“Şnullglobİ,“and“Şdotglob“İoptions.¦‘!GThe–¹ØŞGLOBIGNORE“İshell“v‘ÿdDariable“maš²!y“bMŞe“used“to“restrict“the“set“of“ lenames“matc˜hing¡‘Ga–J¥pattern.‘ ÊšIf“ŞGLOBIGNORE“İis“set,‘³´eacš²!h“matc˜hing“ lename“that“also“matc˜hes“one“of“the¡‘Gpatterns–rÌin“ŞGLOBIGNORE“İis“remo•²!v“ed–rÌfrom“the“list“of“matc²!hes.‘̪The“ lenames“`Ş.İ'“and“`Ş..İ'“are¡‘Galw•²!a“ys›Ãjignored,‘Ê«ev“en˜when˜ŞGLOBIGNORE˜İis˜set.‘4êHo“w“ev“er,‘Ê«setting˜ŞGLOBIGNORE˜İhas˜the˜e ect¡‘Gof–Kaenabling“the“Şdotglob“İshell“option,‘]–so“all“other“ lenames“bMŞeginning“with“a“`Ş.İ'“will“matc²!h.¡‘GT‘ÿeo–Šget“the“old“bšMŞeha²!vior“of“ignoring“ lenames“b˜eginning“with“a“`Ş.İ',‘Âèmak²!e“`Ş.*İ'“one“of“the¡‘Gpatterns–¦fin“ŞGLOBIGNOREİ.‘İİThe“Şdotglob“İoption“is“disabled“when“ŞGLOBIGNORE“İis“unset.ŸA‰‘Gë]3.5.8.1‘d(P•–áattern‘íMMatc“hingŸS÷‘!GİAn•²!y›¾c“haracter˜that˜app•MŞears˜in˜a˜pattern,‘other˜than˜the˜sp“ecial˜pattern˜c²!haracters˜de-¡‘Gscrib•MŞed›Ø%b“elo•²!w,‘ä•matc“hes˜itself.‘sThe˜ãnul˜İc“haracter˜ma“y˜not˜o•MŞccur˜in˜a˜pattern.‘sThe˜sp“ecial¡‘Gpattern–¦fcš²!haracters“m˜ust“bšMŞe“quoted“if“they“are“to“b˜e“matc²!hed“literally‘ÿe.¦‘!GThe–¦fspMŞecial“pattern“cš²!haracters“ha˜v˜e“the“follo˜wing“meanings:ŸdY‘GŞ*‘4IİMatc•²!hes›¦fan“y˜string,˜including˜the˜n“ull˜string.¤S÷‘GŞ?‘4IİMatc•²!hes›¦fan“y˜single˜c“haracter.¡‘GŞ[...‘>ÿ]‘ İMatc•²!hes›ûoan“y˜one˜of˜the˜enclosed˜c“haracters.‘¤àA‘ûCpair˜of˜c“haracters˜separated˜b“y˜a¤ 33‘Kâ:hš²!yphen–TÆdenotes“a“árange“expressionİ;‘oûan˜y“c˜haracter“that“sorts“bMŞet˜w˜een“those“t˜w˜o¡‘Kâ:c•²!haracters,›.inclusiv“e,˜using–ù¡the“currenš²!t“loMŞcale's“collating“sequence“and“c˜haracter¡‘Kâ:set,‘¤íis–¤matcš²!hed.‘İ@If“the“ rst“c˜haracter“follo˜wing“the“`Ş[İ'“is“a“`Ş!İ'“or“a“`Ş^İ'“then“an˜y¡‘Kâ:cš²!haracter–õ‘not“enclosed“is“matc˜hed.‘¢ëA‘õd`æİ'“ma˜y“bMŞe“matc˜hed“b˜y“including“it“as“the¡‘Kâ: rst–úhor“last“cš²!haracter“in“the“set.‘ÙãA‘úR`Ş]İ'“ma˜y“bMŞe“matc˜hed“b˜y“including“it“as“the¡‘Kâ: rst–¬cš²!haracter“in“the“set.‘­JThe“sorting“order“of“c˜haracters“in“range“expressions“is¡‘Kâ:determined–ÂÅbš²!y“the“curren˜t“loMŞcale“and“the“v›ÿdDalue“of“the“ŞLC_COLLATE“İshell“v˜ariable,¡‘Kâ:if‘¦fset.©C•‘Kâ:F‘ÿeor–ó¾example,›in“the“default“C‘óªloMŞcale,˜`Ş[a-dx-z]İ'“is“equiv‘ÿdDalen²!t“to“`Ş[abcdxyz]İ'.¡‘Kâ:Manš²!y– ãloMŞcales“sort“c˜haracters“in“dictionary“order,‘ ?€and“in“these“loMŞcales¡‘Kâ:`Ş[a-dx-z]İ'–Œtis“tš²!ypically“not“equiv‘ÿdDalen˜t“to“`Ş[abcdxyz]İ';‘ÿ{it“migh˜t“bMŞe“equiv‘ÿdDalen˜t¡‘Kâ:to–ö$`Ş[aBbCcDdxXyYz]İ',‘ for“example.‘ÍT‘ÿeo“obtain“the“traditional“in²!terpretation“of¡‘Kâ:ranges–ìşin“brac•²!k“et›ìşexpressions,‘ş¤y“ou˜can˜force˜the˜use˜of˜the˜C‘ììloMŞcale˜b“y˜setting¡‘Kâ:the–¦fŞLC_COLLATE“İor“ŞLC_ALL“İen•²!vironmen“t–¦fv›ÿdDariable“to“the“v˜alue“`ŞCİ'.¦‘Kâ:Within–È]`Ş[İ'“and“`Ş]İ',‘ôÅác²!haracter“classes‘;ßİcan“bšMŞe“sp˜eci ed“using“the“syn²!tax“Ş[:áclasss‚Ş:]İ,¡‘Kâ:where–4Îáclass‘¨Pİis“one“of“the“follo²!wing“classes“de ned“in“the“ãposix“İ1003.2“standard:Ÿb‘hÊŞalnum–>şalpha“ascii“blank“cntrl“digit“graph“lowerŸ €‘hÊprint–>şpunct“space“upper“xdigit¦‘Kâ:İA–¦fcš²!haracter“class“matc˜hes“an˜y“c˜haracter“bMŞelonging“to“that“class.Œ‹ÿŸò‘Gİ22’5»˜Bash–¦fReference“Man²!ual ƒ3* ı ÌÖ‘Kâ:Within–ì’`Ş[İ'“and“`Ş]İ',‘¼an“áequiv‘ÿdDalence“class‘`İcan“bšMŞe“sp˜eci ed“using“the“syn²!tax“Ş[=ác‘ªŞ=]İ,¤ 33‘Kâ:whic•²!h›‰Qmatc“hes˜all˜c“haracters˜with˜the˜same˜collation˜w“eigh“t˜(as˜de ned˜b“y˜the¡‘Kâ:currenš²!t–¦floMŞcale)“as“the“c˜haracter“ácİ.Ÿ7ê‘Kâ:Within–’G`Ş[İ'“and“`Ş]İ',‘Éthe“synš²!tax“Ş[.ásym˜bMŞolnRŞ.]“İmatc˜hes“the“collating“sym˜bMŞol“ásym˜bMŞolİ.©AX‘!GIf–Šğthe“Şextglob“İshell“option“is“enabled“using“the“Şshopt“İbuiltin,‘nsev²!eral“extended“pattern¡‘Gmatcš²!hing–EÉopMŞerators“are“recognized.‘¼In“the“follo˜wing“description,‘m¡a“ápattern-list‘‚Éİis“a“list“of¡‘Gone–æ…or“more“patterns“separated“bš²!y“a“`Ş|İ'.‘9CompMŞosite“patterns“ma˜y“bMŞe“formed“using“one“or¡‘Gmore–¦fof“the“follo²!wing“sub-patterns:¦‘GŞ?(ápattern-list=Ş)¡‘Kâ:İMatcš²!hes–¦fzero“or“one“oMŞccurrence“of“the“giv˜en“patterns.©<¡‘GŞ*(ápattern-list=Ş)¡‘Kâ:İMatcš²!hes–¦fzero“or“more“oMŞccurrences“of“the“giv˜en“patterns.¦‘GŞ+(ápattern-list=Ş)¡‘Kâ:İMatcš²!hes–¦fone“or“more“oMŞccurrences“of“the“giv˜en“patterns.¦‘GŞ@(ápattern-list=Ş)¡‘Kâ:İMatcš²!hes–¦fexactly“one“of“the“giv˜en“patterns.¦‘GŞ!(ápattern-list=Ş)¡‘Kâ:İMatc•²!hes›¦fan“ything˜except˜one˜of˜the˜giv“en˜patterns.Ÿİ‘Gë]3.5.9‘d(Quote‘íMRemo–áv‘ÿ-Âal©<¡‘!GİAfter–ãüthe“preceding“expansions,›óaall“unquoted“oMŞccurrences“of“the“c²!haracters“`Ş\İ',˜`Ş'İ',˜and¡‘G`Ş"İ'–¦fthat“did“not“result“from“one“of“the“abMŞo•²!v“e–¦fexpansions“are“remo•²!v“ed.Ÿ”‘GëT3.6‘™Redirections¦‘!GİBefore–ô[a“command“is“executed,‘Øits“input“and“output“ma²!y“bšMŞe“áredirected‘b­İusing“a“sp˜ecial¡‘Gnotation–Ûüinš²!terpreted“b˜y“the“shell.‘~Redirection“ma˜y“also“bšMŞe“used“to“op˜en“and“close“ les“for¡‘Gthe–öÚcurrenš²!t“shell“execution“en˜vironmen˜t.‘Ï9The“follo˜wing“redirection“opMŞerators“ma˜y“precede¡‘Gor–‡tappMŞear“anš²!ywhere“within“a“simple“command“or“ma˜y“follo˜w“a“command.‘ÓŒRedirections“are¡‘GprošMŞcessed–¦fin“the“order“they“app˜ear,“from“left“to“righ²!t.©<¡‘!GIn–qthe“folloš²!wing“descriptions,‘{ºif“the“ le“descriptor“n˜um˜bMŞer“is“omitted,‘{ºand“the“ rst“c˜har-¡‘Gacter–ãŞof“the“redirection“opMŞerator“is“`Ş<İ',‘3İ',‘ Òthe“redirection“refers¡‘Gto–¦fthe“standard“output“( le“descriptor“1).¦‘!GThe–ã2wš²!ord“follo˜wing“the“redirection“opMŞerator“in“the“follo˜wing“descriptions,‘òeunless“other-¡‘Gwise–…noted,›¾íis“sub‘›»jected“to“brace“expansion,˜tilde“expansion,˜parameter“expansion,˜command¡‘Gsubstitution,–¼Åarithmetic›¸Kexpansion,“quote˜remo²!v‘ÿdDal,“ lename˜expansion,“and˜w²!ord˜splitting.¡‘GIf–¦fit“expands“to“more“than“one“w²!ord,“Bash“repMŞorts“an“error.¦‘!GNote–¦fthat“the“order“of“redirections“is“signi can²!t.‘İİF‘ÿeor“example,“the“commandŸ‰n‘.ùœŞls–¿ª>“ádirlist‘üªŞ2>&1¦‘Gİdirects–P¼bMŞoth“standard“output“( le“descriptor“1)“and“standard“error“( le“descriptor“2)“to“the¡‘G le–¦fádirlistİ,“while“the“commandŒ‹`Ÿò‘GİChapter–¦f3:‘İİBasic“Shell“F‘ÿeeatures’gm23 ƒ3* ı ÌÖ‘.ùœŞls–¿ª2>&1“>“ádirlist¤å‘Gİdirects–ˆonly“the“standard“output“to“ le“ádirlistİ,‘!bMŞecause“the“standard“error“w²!as“duplicated© 33‘Gas–¦fstandard“output“bMŞefore“the“standard“output“w²!as“redirected“to“ádirlistİ.¡‘!GBash–%handles“sev²!eral“ lenames“spšMŞecially“when“they“are“used“in“redirections,‘?^as“describ˜ed¦‘Gin–¦fthe“follo²!wing“table:¤ —‘GŞ/dev/fd/áfd¦‘Kâ:İIf–¦fáfd›¸İis“a“v‘ÿdDalid“in²!teger,“ le“descriptor“áfd˜İis“duplicated.¡‘GŞ/dev/stdin¦‘Kâ:İFile–¦fdescriptor“0“is“duplicated.¡‘GŞ/dev/stdout¦‘Kâ:İFile–¦fdescriptor“1“is“duplicated.¡‘GŞ/dev/stderr¦‘Kâ:İFile–¦fdescriptor“2“is“duplicated.¡‘GŞ/dev/tcp/áhost=Ş/ápMŞort¦‘Kâ:İIf–úáhost›7İis“a“v‘ÿdDalid“hostname“or“In²!ternet“address,‘Nëand“ápMŞort˜İis“an“in²!teger“pMŞort¦‘Kâ:n•²!um“bšMŞer–m­or“service“name,‘ß~Bash“attempts“to“op˜en“a“TCP‘m8connection“to“the¦‘Kâ:corresp•MŞonding‘¦fso“c•²!k“et.¡‘GŞ/dev/udp/áhost=Ş/ápMŞort¦‘Kâ:İIf–úáhost›7İis“a“v‘ÿdDalid“hostname“or“In²!ternet“address,‘Nëand“ápMŞort˜İis“an“in²!teger“pMŞort¦‘Kâ:n•²!um“bšMŞer–]Èor“service“name,‘Ë Bash“attempts“to“op˜en“a“UDP‘]Wconnection“to“the¦‘Kâ:corresp•MŞonding‘¦fso“c•²!k“et.¡‘!GA–¦ffailure“to“opMŞen“or“create“a“ le“causes“the“redirection“to“fail.¤C‘Gë]3.6.1‘d(Redirecting‘íMInputŸå‘!GİRedirection–wof“input“causes“the“ le“whose“name“results“from“the“expansion“of“áw²!ord‘Éİto¦‘Gb•MŞe›%°op“ened˜for˜reading˜on˜ le˜descriptor˜Şnİ,‘Eƒor˜the˜standard˜input˜( le˜descriptor˜0)˜if˜Şn˜İis¦‘Gnot‘¦fspMŞeci ed.Ÿå‘!GThe–¦fgeneral“format“for“redirecting“input“is:Ÿ벑.ùœŞ[n]<áw²!ord¡‘Gë]3.6.2‘d(Redirecting‘íMOutputŸå‘!GİRedirection–¥of“output“causes“the“ le“whose“name“results“from“the“expansion“of“áw²!ord‘lİto¦‘Gb•MŞe›Ôpop“ened˜for˜writing˜on˜ le˜descriptor˜Şnİ,‘ßòor˜the˜standard˜output˜( le˜descriptor˜1)˜if˜Şn˜İis¦‘Gnot– pspšMŞeci ed.‘ üIf“the“ le“do˜es“not“exist“it“is“created;‘=öif“it“do˜es“exist“it“is“truncated“to“zero¦‘Gsize.¤å‘!GThe–¦fgeneral“format“for“redirecting“output“is:Ÿ벑.ùœŞ[n]>[|]áw²!ord¡‘!GİIf–¯…the“redirection“opšMŞerator“is“`Ş>İ',‘±Íand“the“Şnoclobber“İoption“to“the“Şset“İbuiltin“has“b˜een¦‘Genabled,‘è!the–Úüredirection“will“fail“if“the“ le“whose“name“results“from“the“expansion“of“áw²!ord¦‘Gİexists–©band“is“a“regular“ le.‘æĞIf“the“redirection“opšMŞerator“is“`Ş>|İ',‘ª or“the“redirection“op˜erator“is¦‘G`Ş>İ'–D°and“the“Şnoclobber“İoption“is“not“enabled,‘lCthe“redirection“is“attempted“ev²!en“if“the“ le¦‘Gnamed–¦fbš²!y“áw˜ord‘¸İexists.Œ‹Ÿò‘Gİ24’5»˜Bash–¦fReference“Man²!ual ƒ3* ı ÌÖ‘Gë]3.6.3‘d(Appiending–íMRedirected“Output©=Ş‘!GİRedirection–o>of“output“in“this“fashion“causes“the“ le“whose“name“results“from“the“expan-¤ 33‘Gsion–6of“áw²!ord‘~ˆİto“bšMŞe“op˜ened“for“app˜ending“on“ le“descriptor“Şnİ,‘*ªor“the“standard“output“( le¡‘Gdescriptor–¦f1)“if“Şn“İis“not“spšMŞeci ed.‘İİIf“the“ le“do˜es“not“exist“it“is“created.Ÿ=Ş‘!GThe–¦fgeneral“format“for“appMŞending“output“is:ŸŠ«‘.ùœŞ[n]>>áw²!ordŸU‘Gë]3.6.4‘d(Redirecting–íMStandard“Output“and“Standard“Error¦‘!GİBash–¸Şallo²!ws“bMŞoth“the“standard“output“( le“descriptor“1)“and“the“standard“error“output¡‘G( le–;˜descriptor“2)“to“bMŞe“redirected“to“the“ le“whose“name“is“the“expansion“of“áw²!ord‘©êİwith“this¡‘Gconstruct.¤=Ş‘!GThere–¦fare“t•²!w“o–¦fformats“for“redirecting“standard“output“and“standard“error:©Š«‘.ùœŞ&>áw²!ord¡‘Gİand¦‘.ùœŞ>&áw²!ord¡‘GİOf–¦fthe“t•²!w“o–¦fforms,“the“ rst“is“preferred.‘İİThis“is“semanš²!tically“equiv‘ÿdDalen˜t“to¦‘.ùœŞ>áw²!ord‘-üŞ2>&1ŸU‘Gë]3.6.5‘d(Here‘íMDoicumen–átsŸ=Ş‘!GİThis–„’tš²!ypMŞe“of“redirection“instructs“the“shell“to“read“input“from“the“curren˜t“source“un˜til“a¤ 33‘Gline–¢conš²!taining“only“áw˜ord‘Wİ(with“no“trailing“blanks)“is“seen.‘ÜgAll“of“the“lines“read“up“to“that¡‘GpMŞoin²!t–¦fare“then“used“as“the“standard“input“for“a“command.Ÿ=Ş‘!GThe–¦fformat“of“here-doMŞcumenš²!ts“is“as“follo˜ws:¦‘.ùœŞ<<[æŞ]áw²!ord¤ €‘\öìhere-doMŞcumen²!t¡‘.ùœdelimiter©=Ş‘!GİNo–şêparameter“expansion,› command“substitution,˜arithmetic“expansion,˜or“ lename“ex-¤ 33‘Gpansion–6×is“pMŞerformed“on“áwš²!ordİ.‘1If“an˜y“c˜haracters“in“áw˜ord‘¥)İare“quoted,‘Zóthe“ádelimiter‘İis“the¡‘Gresult–Ü8of“quote“remoš²!v‘ÿdDal“on“áw˜ordİ,‘)¬and“the“lines“in“the“here-doMŞcumen˜t“are“not“expanded.¡‘GIf–ì:áwš²!ord‘ZŒİis“unquoted,‘ı¯all“lines“of“the“here-doMŞcumen˜t“are“sub‘›»jected“to“parameter“expansion,¡‘Gcommand–ûsubstitution,›®and“arithmetic“expansion.‘¤æIn“the“latter“case,˜the“c²!haracter“sequence¡‘GŞ\newline–¦fİis“ignored,“and“`Ş\İ'“mš²!ust“bMŞe“used“to“quote“the“c˜haracters“`Ş\İ',“`Ş$İ',“and“`Ş`İ'.¦‘!GIf–®šthe“redirection“opšMŞerator“is“`Ş<<-İ',‘à)then“all“leading“tab“c²!haracters“are“stripp˜ed“from“input¡‘Glines–ó´and“the“line“conš²!taining“ádelimiterİ.‘ÅÆThis“allo˜ws“here-doMŞcumen˜ts“within“shell“scripts“to¡‘GbMŞe–¦finden²!ted“in“a“natural“fashion.ŸU‘Gë]3.6.6‘d(Duplicating–íMFile“DescriptorsŸ=Ş‘!GİThe–¦fredirection“opMŞeratorŸŠ«‘.ùœŞ[n]<&áw²!ord¦‘Gİis–(tused“to“duplicate“input“ le“descriptors.‘dIf“áw²!ord‘–Æİexpands“to“one“or“more“digits,‘Høthe“ le¡‘Gdescriptor– .denoted“bš²!y“Şn“İis“made“to“bMŞe“a“cop˜y“of“that“ le“descriptor.‘4If“the“digits“in“áw˜ordŒ‹&ÚŸò‘GİChapter–¦f3:‘İİBasic“Shell“F‘ÿeeatures’gm25 ƒ3* ı ÌÖ‘Gdo–‡rnot“spšMŞecify“a“ le“descriptor“op˜en“for“input,‘£a“redirection“error“o˜ccurs.‘ÓŒIf“áw²!ord‘õÄİev‘ÿdDaluates¤ 33‘Gto–¶^`Ş-İ',›º\ le“descriptor“Şn“İis“closed.‘ ÆIf“Şn“İis“not“spMŞeci ed,˜the“standard“input“( le“descriptor“0)¡‘Gis‘¦fused.¤%‘!GThe‘¦fopMŞerator©Ùò‘.ùœŞ[n]>&áw²!ord¡‘Gİis–Ülused“similarly“to“duplicate“output“ le“descriptors.‘ïIf“Şn“İis“not“spMŞeci ed,‘)íthe“standard¤ 33‘Goutput–še( le“descriptor“1)“is“used.‘ÙİIf“the“digits“in“áw²!ord‘·İdo“not“spšMŞecify“a“ le“descriptor“op˜en¡‘Gfor–˜poutput,‘Ôòa“redirection“error“ošMŞccurs.‘³üAs“a“sp˜ecial“case,›Ôòif“Şn“İis“omitted,˜and“áw²!ord‘ÂİdoMŞes¡‘Gnot–Vkexpand“to“one“or“more“digits,‘fjthe“standard“output“and“standard“error“are“redirected“as¡‘GdescribMŞed‘¦fpreviously‘ÿe.Ÿ³ä‘Gë]3.6.7‘d(Opiening–íMFile“Descriptors“for“Reading“and“W‘şÄ£ritingŸ%‘!GİThe–¦fredirection“opMŞerator¦‘.ùœŞ[n]<>áw²!ord©%‘Gİcauses–¬ the“ le“whose“name“is“the“expansion“of“áw²!ord‘òİto“bšMŞe“op˜ened“for“b˜oth“reading“and¡‘Gwriting–ôon“ le“descriptor“Şnİ,‘€or“on“ le“descriptor“0“if“Şn“İis“not“spšMŞeci ed.‘ÆèIf“the“ le“do˜es“not¡‘Gexist,–¦fit“is“created.Ÿ"`İ‘GëT3.7‘™Executing‘f@CommandsŸ$³ä‘Gë]3.7.1‘d(Simple–íMCommand“ExpansionŸ%‘!GİWhen–Fda“simple“command“is“executed,›ncthe“shell“pMŞerforms“the“follo²!wing“expansions,˜as-¡‘Gsignmenš²!ts,–¦fand“redirections,“from“left“to“righ˜t.¦‘-1.‘'¿«The–—Awš²!ords“that“the“parser“has“mark˜ed“as“v‘ÿdDariable“assignmen˜ts“(those“preceding“the¡‘'¿«command–¦fname)“and“redirections“are“sa•²!v“ed–¦ffor“later“proMŞcessing.©à,‘-2.‘'¿«The–ÆŸwš²!ords“that“are“not“v‘ÿdDariable“assignmen˜ts“or“redirections“are“expanded“(see“Sec-¡‘'¿«tion–qr3.5“[Shell“Expansions],‘¤4page“15).‘?If“anš²!y“w˜ords“remain“after“expansion,‘¤4the“ rst¡‘'¿«wš²!ord–ÀÄis“tak˜en“to“bMŞe“the“name“of“the“command“and“the“remaining“w˜ords“are“the“argu-¡‘'¿«men²!ts.¦‘-3.‘'¿«Redirections–á³are“pšMŞerformed“as“describ˜ed“ab˜o•²!v“e–á³(see“Section“3.6“[Redirections],‘ page“22).¦‘-4.‘'¿«The–5text“after“the“`Ş=İ'“in“eacš²!h“v‘ÿdDariable“assignmen˜t“undergoMŞes“tilde“expansion,‘# parameter¡‘'¿«expansion,–ëBcommand›wsubstitution,“arithmetic˜expansion,“and˜quote˜remo²!v‘ÿdDal˜bMŞefore¡‘'¿«bMŞeing–¦fassigned“to“the“v‘ÿdDariable.Ÿ:‘!GIf–no“command“name“results,‘Fthe“v‘ÿdDariable“assignmenš²!ts“a ect“the“curren˜t“shell“en˜viron-¡‘Gmenš²!t.‘ªOtherwise,‘*%the– v‘ÿdDariables“are“added“to“the“en˜vironmen˜t“of“the“executed“command“and¡‘Gdo–)Nnot“a ect“the“currenš²!t“shell“en˜vironmen˜t.‘f–If“an˜y“of“the“assignmen˜ts“attempts“to“assign¡‘Ga–Ÿv›ÿdDalue“to“a“readonly“v˜ariable,›İ:an“error“oMŞccurs,˜and“the“command“exits“with“a“non-zero¡‘Gstatus.Ÿ%‘!GIf–Èno“command“name“results,› redirections“are“pMŞerformed,˜but“do“not“a ect“the“curren²!t¡‘Gshell›¦fen•²!vironmen“t.‘İİA˜redirection˜error˜causes˜the˜command˜to˜exit˜with˜a˜non-zero˜status.Œ‹2>Ÿò‘Gİ26’5»˜Bash–¦fReference“Man²!ual ƒ3* ı ÌÖ‘!GIf–Jqthere“is“a“command“name“left“after“expansion,‘\Õexecution“prošMŞceeds“as“describ˜ed“b˜elo²!w.¤ 33‘GOtherwise,‘«şthe–w­command“exits.‘Q±If“one“of“the“expansions“con²!tained“a“command“substitu-¡‘Gtion,‘Œ(the–^5exit“status“of“the“command“is“the“exit“status“of“the“last“command“substitution¡‘GpMŞerformed.‘¸³If–D­there“w²!ere“no“command“substitutions,‘l?the“command“exits“with“a“status“of¡‘Gzero.ŸW ‘Gë]3.7.2‘d(Command–íMSearc–áh“and“ExecutionŸúá‘!GİAfter–C~a“command“has“bMŞeen“split“inš²!to“w˜ords,‘jÃif“it“results“in“a“simple“command“and“an¡‘Goptional–¦flist“of“argumenš²!ts,“the“follo˜wing“actions“are“tak˜en.©úá‘-1.‘'¿«If–èùthe“command“name“con²!tains“no“slashes,‘Üthe“shell“attempts“to“loMŞcate“it.‘¹If“there“exists¡‘'¿«a–ğtshell“function“bš²!y“that“name,‘Øthat“function“is“in˜v˜ok˜ed“as“describMŞed“in“Section“3.3“[Shell¡‘'¿«F‘ÿeunctions],–¦fpage“12.¦‘-2.‘'¿«If–ø•the“name“doMŞes“not“matcš²!h“a“function,‘M the“shell“searc˜hes“for“it“in“the“list“of“shell¡‘'¿«builtins.‘İİIf–¦fa“matcš²!h“is“found,“that“builtin“is“in˜v˜ok˜ed.¦‘-3.‘'¿«If–Ùğthe“name“is“neither“a“shell“function“nor“a“builtin,›&Òand“con²!tains“no“slashes,˜Bash¡‘'¿«searc•²!hes›eac“h˜elemen“t˜of˜Ş$PATH˜İfor˜a˜directory˜con“taining˜an˜executable˜ le˜b“y˜that¡‘'¿«name.‘·+Bash–D+uses“a“hash“table“to“remem²!bMŞer“the“full“pathnames“of“executable“ les“to¡‘'¿«a•²!v“oid›Ísm“ultiple˜ŞPATH˜İsearc“hes˜(see˜the˜description˜of˜Şhash˜İin˜Section˜4.1˜[Bourne˜Shell¡‘'¿«Builtins],‘Uopage–2m31).‘óA‘2Ifull“searc²!h“of“the“directories“in“Ş$PATH“İis“pMŞerformed“only“if“the¡‘'¿«command–¹äis“not“found“in“the“hash“table.‘WIf“the“searcš²!h“is“unsuccessful,‘¾Ãthe“shell“prin˜ts¡‘'¿«an–¦ferror“message“and“returns“an“exit“status“of“127.¦‘-4.‘'¿«If–kthe“searcš²!h“is“successful,‘,or“if“the“command“name“con˜tains“one“or“more“slashes,‘,the¡‘'¿«shell–+zexecutes“the“named“program“in“a“separate“execution“en•²!vironmen“t.‘mArgumen“t‘+z0¡‘'¿«is–§qset“to“the“name“givš²!en,‘§´and“the“remaining“argumen˜ts“to“the“command“are“set“to“the¡‘'¿«argumenš²!ts–¦fsupplied,“if“an˜y‘ÿe.¦‘-5.‘'¿«If–J]this“execution“fails“bMŞecause“the“ le“is“not“in“executable“format,‘s[and“the“ le“is“not¡‘'¿«a–çdirectory‘ÿe,‘÷Hit“is“assumed“to“bšMŞe“a“áshell“script‘$İand“the“shell“executes“it“as“describ˜ed“in¡‘'¿«Section–¦f3.8“[Shell“Scripts],“page“29.¦‘-6.‘'¿«If–£Ëthe“command“wš²!as“not“bMŞegun“async˜hronously‘ÿe,‘ã#the“shell“w˜aits“for“the“command“to¡‘'¿«complete–¦fand“collects“its“exit“status.ŸW ‘Gë]3.7.3‘d(Command–íMExecution“En•–ávironmen“tŸúá‘!GİThe–¦fshell“has“an“áexecution“en•²!vironmen“tİ,›¦fwhic“h˜consists˜of˜the˜follo“wing:¦‘ Øæ‘'¿«İopMŞen–ç& les“inherited“bš²!y“the“shell“at“in˜v˜ošMŞcation,‘÷Vas“mo˜di ed“b²!y“redirections“supplied“to¡‘'¿«the–¦fŞexec“İbuiltin¦‘ Øæ‘'¿«İthe–dÅcurrenš²!t“w˜orking“directory“as“set“b˜y“Şcdİ,–qåŞpushdİ,“or›dÅŞpopdİ,“or˜inherited˜b²!y˜the˜shell˜at¡‘'¿«in•²!v“oMŞcation¦‘ Øæ‘'¿«İthe–¦f le“creation“moMŞde“mask“as“set“bš²!y“Şumask“İor“inherited“from“the“shell's“paren˜t¦‘ Øæ‘'¿«İcurrenš²!t–¦ftraps“set“b˜y“Ştrap¦‘ Øæ‘'¿«İshell–‰”parameters“that“are“set“bš²!y“v‘ÿdDariable“assignmen˜t“or“with“Şset“İor“inherited“from“the¡‘'¿«shell's–¦fparenš²!t“in“the“en˜vironmen˜t¦‘ Øæ‘'¿«İshell–?Qfunctions“de ned“during“execution“or“inherited“from“the“shell's“paren²!t“in“the¡‘'¿«en•²!vironmen“tŒ‹>§Ÿò‘GİChapter–¦f3:‘İİBasic“Shell“F‘ÿeeatures’gm27 ƒ3* ı ÌÖ‘ Øæ‘'¿«İoptions–÷îenabled“at“in•²!v“oMŞcation–÷î(either“bš²!y“default“or“with“command-line“argumen˜ts)“or© 33‘'¿«b²!y‘¦fŞset¤èõ‘ Øæ‘'¿«İoptions–¦fenabled“b²!y“Şshopt¡‘ Øæ‘'¿«İshell–¦faliases“de ned“with“Şalias“İ(see“Section“6.6“[Aliases],“page“67)¡‘ Øæ‘'¿«İv‘ÿdDarious–ü proMŞcess“ãidİs,‘‘including“those“of“bac²!kground“jobs“(see“Section“3.2.3“[Lists],¦‘'¿«page–¦f8),“the“v›ÿdDalue“of“Ş$$İ,“and“the“v˜alue“of“Ş$PPIDŸ·‘!GİWhen–a“simple“command“other“than“a“builtin“or“shell“function“is“to“bMŞe“executed,‘=×it“is¦‘Gin•²!v“ok“ed–Ştin“a“separate“execution“en•²!vironmen“t–Ştthat“consists“of“the“follo²!wing.‘›7Unless“otherwise¦‘Gnoted,–¦fthe“v‘ÿdDalues“are“inherited“from“the“shell.¡‘ Øæ‘'¿«İthe–¼Âshell's“opšMŞen“ les,‘ÂZplus“an²!y“mo˜di cations“and“additions“sp˜eci ed“b²!y“redirections“to¦‘'¿«the‘¦fcommand¡‘ Øæ‘'¿«İthe–¦fcurrenš²!t“w˜orking“directory¡‘ Øæ‘'¿«İthe–¦f le“creation“moMŞde“mask¡‘ Øæ‘'¿«İshell–>ãv›ÿdDariables“mark²!ed“for“expMŞort,‘¥along“with“v˜ariables“expMŞorted“for“the“command,¦‘'¿«passed–¦fin“the“en•²!vironmen“t–¦f(see“Section“3.7.4“[En•²!vironmen“t],–¦fpage“27)¡‘ Øæ‘'¿«İtraps–½xcaughš²!t“b˜y“the“shell“are“reset“to“the“v‘ÿdDalues“inherited“from“the“shell's“paren˜t,‘ÃThe“en•²!vironmen“t‘Æ¡inherited¦‘Gb•²!y›¸œan“y˜executed˜command˜consists˜of˜the˜shell's˜initial˜en“vironmen“t,‘½)whose˜v‘ÿdDalues˜ma“y˜bMŞe¦‘GmoMŞdi ed–6Ãin“the“shell,‘Mless“anš²!y“pairs“remo˜v˜ed“b˜y“the“Şunset“İand“`Şexport‘¦f-nİ'“commands,‘Mplus¦‘Gan²!y–¦fadditions“via“the“Şexport“İand“`Şdeclare“-xİ'“commands.¡‘!GThe›Êen•²!vironmen“t˜for˜an“y˜simple˜command˜or˜function˜ma“y˜bMŞe˜augmen“ted˜tempMŞorarily¦‘Gbš²!y–®§pre xing“it“with“parameter“assignmen˜ts,‘°·as“describMŞed“in“Section“3.4“[Shell“P˜arameters],¦‘Gpage–†13.‘ÓThese“assignmenš²!t“statemen˜ts“a ect“only“the“en˜vironmen˜t“seen“b˜y“that“command.Œ‹LÓŸò‘Gİ28’5»˜Bash–¦fReference“Man²!ual ƒ3* ı ÌÖ‘!GIf–ßæthe“`Ş-kİ'“option“is“set“(see“Section“4.3“[The“Set“Builtin],›îEpage“46),˜then“all“parameter¤ 33‘Gassignmenš²!ts–óare“placed“in“the“en˜vironmen˜t“for“a“command,‘•=not“just“those“that“precede“the¡‘Gcommand‘¦fname.©µ‘!GWhen––ˆBash“in•²!v“ok“es––ˆan“external“command,‘™´the“v‘ÿdDariable“`Ş$_İ'“is“set“to“the“full“path“name¡‘Gof–¦fthe“command“and“passed“to“that“command“in“its“en•²!vironmen“t.Ÿ‘Gë]3.7.5‘d(Exit‘íMStatusŸµ‘!GİF‘ÿeor–Ğbthe“shell's“purpMŞoses,‘Úáa“command“whic²!h“exits“with“a“zero“exit“status“has“succeeded.¡‘GA‘€‘non-zero–€›exit“status“indicates“failure.‘ÑDThis“seemingly“coun•²!ter-in“tuitiv“e›€›sc“heme˜is˜used˜so¡‘Gthere–¼is“one“wš²!ell-de ned“w˜a˜y“to“indicate“success“and“a“v‘ÿdDariet˜y“of“w˜a˜ys“to“indicate“v‘ÿdDarious¡‘Gfailure–‰.mošMŞdes.‘†4When“a“command“terminates“on“a“fatal“signal“whose“n•²!um“b˜er–‰.is“áNİ,“Bash¡‘Guses–¦fthe“v‘ÿdDalue“128Ş+áN‘Öİas“the“exit“status.¦‘!GIf–Qca“command“is“not“found,‘|"the“c²!hild“proMŞcess“created“to“execute“it“returns“a“status“of¡‘G127.‘İİIf–¦fa“command“is“found“but“is“not“executable,“the“return“status“is“126.¦‘!GIf–ûa“command“fails“bMŞecause“of“an“error“during“expansion“or“redirection,‘×the“exit“status¡‘Gis–¦fgreater“than“zero.¦‘!GThe–Åexit“status“is“used“b²!y“the“Bash“conditional“commands“(see“Section“3.2.5“[Conditional¡‘GConstructs],–¦fpage“10)“and“some“of“the“list“constructs“(see“Section“3.2.3“[Lists],“page“8).¦‘!GAll–Ñ"of“the“Bash“builtins“return“an“exit“status“of“zero“if“they“succeed“and“a“non-zero¡‘Gstatus–Ìon“failure,‘!eso“they“maš²!y“bMŞe“used“b˜y“the“conditional“and“list“constructs.‘All“builtins¡‘Greturn–¦fan“exit“status“of“2“to“indicate“incorrect“usage.Ÿ‘Gë]3.7.6‘d(SignalsŸµ‘!GİWhen–]ÊBash“is“in•²!teractiv“e,›lPin–]Êthe“absence“of“an²!y“traps,˜it“ignores“ŞSIGTERM“İ(so“that“`Şkill¡‘G0İ'–öèdoMŞes“not“kill“an“in•²!teractiv“e–öèshell),‘ and“ŞSIGINT“İis“caugh²!t“and“handled“(so“that“the“Şwait¡‘Gİbuiltin–ğais“inš²!terruptible).‘¡1When“Bash“receiv˜es“a“ŞSIGINTİ,‘Èit“breaks“out“of“an˜y“executing“loMŞops.¡‘GIn–Ë…all“cases,‘ÔÍBash“ignores“ŞSIGQUITİ.‘M;If“job“conš²!trol“is“in“e ect“(see“Chapter“7“[Job“Con˜trol],¡‘Gpage–¦f75),“Bash“ignores“ŞSIGTTINİ,“ŞSIGTTOUİ,“and“ŞSIGTSTPİ.¦‘!GCommands–h!started“bš²!y“Bash“ha˜v˜e“signal“handlers“set“to“the“v‘ÿdDalues“inherited“b˜y“the¡‘Gshell–¥/from“its“parenš²!t.‘Ú7When“job“con˜trol“is“not“in“e ect,‘äàasync˜hronous“commands“ignore¡‘GŞSIGINT–%İand“ŞSIGQUIT“İas“w²!ell.‘YáCommands“run“as“a“result“of“command“substitution“ignore¡‘Gthe–¦fkš²!eybMŞoard-generated“job“con˜trol“signals“ŞSIGTTINİ,“ŞSIGTTOUİ,“and“ŞSIGTSTPİ.¦‘!GThe–À®shell“exits“bš²!y“default“upMŞon“receipt“of“a“ŞSIGHUPİ.‘,¶Before“exiting,‘Ç@an“in˜teractiv˜e“shell¡‘Gresends–Ğthe“ŞSIGHUP“İto“all“jobs,‘ujrunning“or“stopp•MŞed.‘ 5Stopp“ed–Ğjobs“are“sen²!t“ŞSIGCONT“İto¡‘Gensure–òSthat“they“receivš²!e“the“ŞSIGHUPİ.‘Á¥T‘ÿeo“prev˜en˜t“the“shell“from“sending“the“ŞSIGHUP“İsignal¡‘Gto–êqa“particular“job,‘ûtit“should“bMŞe“remo•²!v“ed–êqfrom“the“jobs“table“with“the“Şdisown“İbuiltin“(see¡‘GSection– Ã7.2“[Job“Conš²!trol“Builtins],‘¡äpage“76)“or“mark˜ed“to“not“receiv˜e“ŞSIGHUP“İusing“Şdisown¡‘G-hİ.¦‘!GIf–Õšthe“Şhuponexit“İshell“option“has“bMŞeen“set“with“Şshopt“İ(see“Section“4.2“[Bash“Builtins],¡‘Gpage–¦f36),“Bash“sends“a“ŞSIGHUP“İto“all“jobs“when“an“in•²!teractiv“e–¦flogin“shell“exits.¦‘!GWhen–iBash“receivš²!es“a“signal“for“whic˜h“a“trap“has“bMŞeen“set“while“w˜aiting“for“a“command¡‘Gto–c0complete,‘’bthe“trap“will“not“bMŞe“executed“un²!til“the“command“completes.‘the“shell,›—àreturning“a“status“of“án“İto“the“shell's“paren²!t.‘×ĞIf“án“İis“omitted,˜the¡‘Kâ:exit–0Šstatus“is“that“of“the“last“command“executed.‘¶”An²!y“trap“on“ŞEXIT“İis“executed¡‘Kâ:bMŞefore–¦fthe“shell“terminates.¦‘GŞexportŸ¨º‘hÊexport–¿ª[-fn]“[-p]“[áname–Ş[=áv‘ÿdDalue“Ş]]Ÿ[í‘Kâ:İMark–Äõeacš²!h“áname‘aüİto“bMŞe“passed“to“c˜hild“proMŞcesses“in“the“en˜vironmen˜t.‘9ŠIf“the¡‘Kâ:`Ş-fİ'–‹@option“is“supplied,‘®the“áname‘İs“refer“to“shell“functions;‘”Lotherwise“the“names¡‘Kâ:refer–d}to“shell“v‘ÿdDariables.‘#The“`Ş-nİ'“option“means“to“no“longer“mark“eac²!h“áname¡‘Kâ:İfor–«expMŞort.‘í/If“no“ánames‘İare“supplied,›ìÈor“if“the“`Ş-pİ'“option“is“giv²!en,˜a“list“of¡‘Kâ:expMŞorted–fcnames“is“displa•²!y“ed.‘ÔThe–fc`Ş-pİ'“option“displa²!ys“output“in“a“form“that¡‘Kâ:maš²!y–:ìbMŞe“reused“as“input.‘›nThe“return“status“is“zero“unless“an“in˜v‘ÿdDalid“option“is¡‘Kâ:supplied,‘_9one–Mnof“the“names“is“not“a“v›ÿdDalid“shell“v˜ariable“name,‘_9or“`Ş-fİ'“is“supplied¡‘Kâ:with–¦fa“name“that“is“not“a“shell“function.¦‘GŞgetoptsŒ‹!†:Ÿò‘GİChapter–¦f4:‘İİShell“Builtin“Commands’ù[ 33 ƒ3* ı ÌÖ‘hÊŞgetopts‘¿ªáoptstring‘¯Âname‘\±Ş[áargss‚Ş]©Z•‘Kâ:getopts–¡İis“used“b²!y“shell“scripts“to“parse“pMŞositional“parameters.‘Úñáoptstring‘¹İcon-¤ 33‘Kâ:tains–ıthe“option“cš²!haracters“to“bMŞe“recognized;‘¨zif“a“c˜haracter“is“follo˜w˜ed“b˜y“a¡‘Kâ:colon,›Ú¶the–Ğ@option“is“expMŞected“to“ha•²!v“e–Ğ@an“argumen•²!t,˜whic“h–Ğ@should“bMŞe“separated¡‘Kâ:from–úit“bš²!y“white“space.‘p˜The“colon“(`Ş:İ')“and“question“mark“(`Ş?İ')“ma˜y“not“bMŞe¡‘Kâ:used–Ÿ"as“option“c•²!haracters.‘ÈEac“h–Ÿ"time“it“is“in•²!v“ok“ed,‘İQŞgetopts–Ÿ"İplaces“the“next¡‘Kâ:option–q»in“the“shell“v‘ÿdDariable“ánameİ,›|Dinitializing“áname‘Âİif“it“doMŞes“not“exist,˜and“the¡‘Kâ:index–ÿof“the“next“argumen²!t“to“bšMŞe“pro˜cessed“in²!to“the“v‘ÿdDariable“ŞOPTINDİ.‘é.ŞOPTIND¡‘Kâ:İis–íinitialized“to“1“eacš²!h“time“the“shell“or“a“shell“script“is“in˜v˜ok˜ed.‘±İWhen“an¡‘Kâ:option–9*requires“an“argumenš²!t,‘]ÛŞgetopts“İplaces“that“argumen˜t“in˜to“the“v‘ÿdDariable¡‘Kâ:ŞOPTARGİ.‘¿DThe–FŞshell“došMŞes“not“reset“ŞOPTIND“İautomatically;‘—it“m²!ust“b˜e“man²!ually¡‘Kâ:reset›d§bMŞet•²!w“een˜m“ultiple˜calls˜to˜Şgetopts˜İwithin˜the˜same˜shell˜in“v“oMŞcation˜if˜a¡‘Kâ:new–¦fset“of“parameters“is“to“bMŞe“used.¦‘Kâ:When–ùSthe“end“of“options“is“encoun²!tered,‘N Şgetopts“İexits“with“a“return“v‘ÿdDalue¡‘Kâ:greater–¦€than“zero.‘Ş*ŞOPTIND“İis“set“to“the“index“of“the“ rst“non-option“argumen²!t,¡‘Kâ:and–¦fŞname“İis“set“to“`Ş?İ'.¦‘Kâ:Şgetopts–‚Ìİnormally“parses“the“pMŞositional“parameters,‘‰ëbut“if“more“argumen²!ts“are¡‘Kâ:giv²!en–¦fin“áargsİ,“Şgetopts“İparses“those“instead.¦‘Kâ:Şgetopts–âİcan“repMŞort“errors“in“t•²!w“o›âw“a“ys.‘QIf˜the˜ rst˜c“haracter˜of˜áoptstring‘øúİis˜a¡‘Kâ:colon,‘:vásilen²!t‘YÚİerror–ÚrepšMŞorting“is“used.‘A8In“normal“op˜eration“diagnostic“messages¡‘Kâ:are–€bprinš²!ted“when“in˜v‘ÿdDalid“options“or“missing“option“argumen˜ts“are“encoun˜tered.¡‘Kâ:If–ˆthe“v‘ÿdDariable“ŞOPTERR“İis“set“to“0,›3Ğno“error“messages“will“bMŞe“displa•²!y“ed,˜ev“en‘ˆif¡‘Kâ:the–¦f rst“c²!haracter“of“Şoptstring“İis“not“a“colon.¦‘Kâ:If–Ëan“inš²!v‘ÿdDalid“option“is“seen,‘BŞgetopts“İplaces“`Ş?İ'“in˜to“áname‘hİand,‘Bif“not“silen˜t,¡‘Kâ:prinš²!ts–©an“error“message“and“unsets“ŞOPTARGİ.‘2¦If“Şgetopts“İis“silen˜t,‘ ¹the“option¡‘Kâ:cš²!haracter–¦ffound“is“placed“in“ŞOPTARG“İand“no“diagnostic“message“is“prin˜ted.¦‘Kâ:If–?ta“required“argumenš²!t“is“not“found,‘T and“Şgetopts“İis“not“silen˜t,‘T a“question“mark¡‘Kâ:(`Ş?İ')–Jgis“placed“in“ánameİ,›\ÍŞOPTARG“İis“unset,˜and“a“diagnostic“message“is“prin²!ted.‘¿3If¡‘Kâ:Şgetopts–Jİis“silen²!t,‘’Othen“a“colon“(`Ş:İ')“is“placed“in“áname‘*Qİand“ŞOPTARG“İis“set“to“the¡‘Kâ:option–¦fc²!haracter“found.Ÿ÷‘GŞhashŸ§b‘hÊhash–¿ª[-r]“[-p“á lename›Ş]“[-t]“[áname˜Ş]¦‘Kâ:İRemem²!bšMŞer–Y²the“full“pathnames“of“commands“sp˜eci ed“as“áname‘ö¹İargumen²!ts,‘†„so¡‘Kâ:they–€need“not“bMŞe“searcš²!hed“for“on“subsequen˜t“in˜v˜oMŞcations.‘I,The“commands“are¡‘Kâ:found–ß.bš²!y“searc˜hing“through“the“directories“listed“in“Ş$PATHİ.‘ˆ6The“`Ş-pİ'“option¡‘Kâ:inhibits–9Qthe“path“searc²!h,‘O"and“á lename‘ÖXİis“used“as“the“loMŞcation“of“ánameİ.‘¹The“`Ş-rİ'¡‘Kâ:option–fòcauses“the“shell“to“forget“all“remem²!bšMŞered“lo˜cations.‘€If“the“`Ş-tİ'“option¡‘Kâ:is–Påsupplied,‘{…the“full“pathname“to“whicš²!h“eac˜h“áname‘íìİcorrespMŞonds“is“prin˜ted.‘İZIf¡‘Kâ:m•²!ultiple›V}áname‘ó„İargumen“ts˜are˜supplied˜with˜`Ş-tİ'˜the˜áname‘ó„İis˜prin“ted˜bMŞefore˜the¡‘Kâ:hashed–\òfull“pathname.‘€If“no“argumenš²!ts“are“giv˜en,‘Š”information“abMŞout“remem-¡‘Kâ:bMŞered–Ğ`commands“is“prin²!ted.‘[ÌThe“return“status“is“zero“unless“a“áname‘mgİis“not¡‘Kâ:found–¦for“an“in²!v‘ÿdDalid“option“is“supplied.Ÿ÷‘GŞpwdŸ§b‘hÊpwd‘¿ª[-LP]Œ‹"’íŸò‘Gİ34’5»˜Bash–¦fReference“Man²!ual ƒ3* ı ÌÖ‘Kâ:Prinš²!t–ïÅthe“absolute“pathname“of“the“curren˜t“w˜orking“directory‘ÿe.‘ ıIf“the“`Ş-Pİ'“option¤ 33‘Kâ:is–Cßsupplied,‘k=the“pathname“prinš²!ted“will“not“con˜tain“sym˜bMŞolic“links.‘¶IIf“the“`Ş-Lİ'¡‘Kâ:option–A$is“supplied,‘§Óthe“pathname“prinš²!ted“ma˜y“con˜tain“sym˜bMŞolic“links.‘ ®The¡‘Kâ:return–Ağstatus“is“zero“unless“an“error“is“encoun²!tered“while“determining“the“name¡‘Kâ:of–¦fthe“currenš²!t“directory“or“an“in˜v‘ÿdDalid“option“is“supplied.©°£‘GŞreadonlyŸ>¸‘hÊreadonly–¿ª[-apf]“[áname‘Ş]“...Ÿñë‘Kâ:İMark–ößeacš²!h“áname‘“æİas“readonly‘ÿe.‘ÏGThe“v‘ÿdDalues“of“these“names“ma˜y“not“bMŞe“c˜hanged¡‘Kâ:b•²!y›/‘subsequen“t˜assignmen“t.‘y]If˜the˜`Ş-fİ'˜option˜is˜supplied,‘QÛeac“h˜áname‘̘İrefers˜to¡‘Kâ:a–¾Jshell“function.‘%ˆThe“`Ş-aİ'“option“means“eacš²!h“áname‘[Qİrefers“to“an“arra˜y“v‘ÿdDariable.¡‘Kâ:If–Dùno“áname‘âİargumenš²!ts“are“giv˜en,›lor“if“the“`Ş-pİ'“option“is“supplied,˜a“list“of“all¡‘Kâ:readonly–ÒŸnames“is“prinš²!ted.‘b‡The“`Ş-pİ'“option“causes“output“to“bMŞe“displa˜y˜ed“in“a¡‘Kâ:format–Fºthat“maš²!y“bMŞe“reused“as“input.‘½ùThe“return“status“is“zero“unless“an“in˜v‘ÿdDalid¡‘Kâ:option–5’is“supplied,‘Y]one“of“the“áname‘Ò™İargumen²!ts“is“not“a“v›ÿdDalid“shell“v˜ariable“or¡‘Kâ:function–]Jname,‘‹or“the“`Ş-fİ'“option“is“supplied“with“a“name“that“is“not“a“shell¡‘Kâ:function.¦‘GŞreturnŸ>¸‘hÊreturn‘¿ª[ánŞ]Ÿñë‘Kâ:İCause–™¡a“shell“function“to“exit“with“the“return“v‘ÿdDalue“ánİ.‘Ù›If“án“İis“not“supplied,‘œ/the¡‘Kâ:return–W4v‘ÿdDalue“is“the“exit“status“of“the“last“command“executed“in“the“function.¡‘Kâ:This–£ßma²!y“also“bšMŞe“used“to“terminate“execution“of“a“script“b˜eing“executed“with“the¡‘Kâ:Ş.–A‚İ(or“Şsourceİ)“builtin,‘U¯returning“either“án“İor“the“exit“status“of“the“last“command¡‘Kâ:executed–’within“the“script“as“the“exit“status“of“the“script.‘×The“return“status“is¡‘Kâ:non-zero–_ßif“Şreturn“İis“used“outside“a“function“and“not“during“the“execution“of“a¡‘Kâ:script–¦fb²!y“Ş.“İor“Şsourceİ.¦‘GŞshiftŸ>¸‘hÊshift‘¿ª[ánŞ]Ÿñë‘Kâ:İShift–÷»the“pšMŞositional“parameters“to“the“left“b²!y“ánİ.‘ÑÛThe“p˜ositional“parameters¡‘Kâ:from–L>ánŞ+İ1‘ö".–§‘.“.›KŞ$#“İare“renamed“to“Ş$1‘ö"İ.–§‘.“.˜Ş$#İ-ánŞ+İ1.‘¿ĞPš²!arameters“represen˜ted“b˜y“the¡‘Kâ:n•²!um“bšMŞers–?NŞ$#“İto“ánŞ+İ1“are“unset.‘¨•án“İm²!ust“b˜e“a“non-negativš²!e“n˜um˜bMŞer“less“than“or¡‘Kâ:equal–ñkto“Ş$#İ.‘¾ìIf“án“İis“zero“or“greater“than“Ş$#İ,‘,the“pMŞositional“parameters“are“not¡‘Kâ:c²!hanged.›©If–ê%án“İis“not“supplied,‘ûit“is“assumed“to“bMŞe“1.˜The“return“status“is“zero¡‘Kâ:unless–¦fán“İis“greater“than“Ş$#“İor“less“than“zero,“non-zero“otherwise.¦‘GŞtest¡‘G[‘4IİEv‘ÿdDaluate–®äa“conditional“expression“áexprİ.‘÷XEac²!h“opšMŞerator“and“op˜erand“m²!ust“b˜e“a¡‘Kâ:separate–"Ñargumen²!t.‘²Expressions“are“compšMŞosed“of“the“primaries“describ˜ed“b˜elo²!w¡‘Kâ:in–¦fSection“6.4“[Bash“Conditional“Expressions],“page“64.¤ñë‘Kâ:When–¦fthe“Ş[“İform“is“used,“the“last“argumenš²!t“to“the“command“m˜ust“bMŞe“a“Ş]İ.¡‘Kâ:Expressions–Ñšmaš²!y“bMŞe“com˜bined“using“the“follo˜wing“opMŞerators,‘ü)listed“in“decreasing¤ 33‘Kâ:order–¦fof“precedence.¦‘Kâ:Ş!–¦fáexpr‘fJİT‘ÿerue“if“áexpr‘oİis“false.¦‘Kâ:Ş(‘¦fáexpr‘oŞ)‘7İReturns–ëÇthe“v‘ÿdDalue“of“áexprİ.‘Ÿ¨This“maš²!y“bMŞe“used“to“o˜v˜erride“the“normal¡’…³-precedence–¦fof“opMŞerators.Œ‹#¢_Ÿò‘GİChapter–¦f4:‘İİShell“Builtin“Commands’ù[ 35 ƒ3* ı ÌÖ‘Kâ:áexpr1‘…ŸŞ-a‘¦fáexpr2¤ 33’…³-İT‘ÿerue–¦fif“bMŞoth“áexpr1›…Ÿİand“áexpr2˜İare“true.©5m‘Kâ:áexpr1‘…ŸŞ-o‘¦fáexpr2¡’…³-İT‘ÿerue–¦fif“either“áexpr1›…Ÿİor“áexpr2˜İis“true.¦‘Kâ:The–xÃŞtest“İand“Ş[“İbuiltins“ev‘ÿdDaluate“conditional“expressions“using“a“set“of“rules¡‘Kâ:based–¦fon“the“n•²!um“bMŞer–¦fof“argumen²!ts.¦‘Kâ:0‘¦fargumen²!ts¡’…³-The–¦fexpression“is“false.¦‘Kâ:1‘¦fargumen²!t¡’…³-The–¦fexpression“is“true“if“and“only“if“the“argumenš²!t“is“not“n˜ull.¦‘Kâ:2‘¦fargumen²!ts¡’…³-If–²the“ rst“argumen²!t“is“`Ş!İ',‘µthe“expression“is“true“if“and“only“if“the¡’…³-second–Fargumenš²!t“is“n˜ull.‘ı}If“the“ rst“argumen˜t“is“one“of“the“unary¡’…³-conditional–áopMŞerators“(see“Section“6.4“[Bash“Conditional“Expres-¡’…³-sions],–Qpage›ïï64),“the˜expression˜is˜true˜if˜the˜unary˜test˜is˜true.‘ºwIf¡’…³-the–ÿA rst“argumen²!t“is“not“a“v‘ÿdDalid“unary“opMŞerator,‘wthe“expression“is¡’…³-false.¦‘Kâ:3‘¦fargumen²!ts¡’…³-If–5÷the“second“argumen²!t“is“one“of“the“binary“conditional“opMŞerators¡’…³-(see– *Section“6.4“[Bash“Conditional“Expressions],›Ôœpage“64),˜the“result¡’…³-of–PPthe“expression“is“the“result“of“the“binary“test“using“the“ rst¡’…³-and–gthird“argumenš²!ts“as“opMŞerands.‘àIf“the“ rst“argumen˜t“is“`Ş!İ',‘*çthe¡’…³-v‘ÿdDalue–ùIf“no“argumen²!ts“are“supplied,¡‘Kâ:or–¾Õonly“`Ş-pİ'“is“givš²!en,‘ñŞtrap“İprin˜ts“the“list“of“commands“assoMŞciated“with“eac˜h¡‘Kâ:signal›­Ûn•²!um“bMŞer˜in˜a˜form˜that˜ma“y˜bMŞe˜reused˜as˜shell˜input.‘ôİRemo“v“e˜an“y˜curren“t˜binding˜for˜ák“eyseqİ.¡‘Kâ:Ş-x‘¦fák²!eyseq:shell-command¦’…³-İCause–¦fáshell-command‘¸İto“bMŞe“executed“whenevš²!er“ák˜eyseq‘çLİis“en˜tered.¡‘Kâ:The–,²return“status“is“zero“unless“an“in²!v‘ÿdDalid“option“is“supplied“or“an“error“oMŞccurs.¡‘GŞbuiltinŸ ~‘hÊbuiltin–¿ª[áshell-builtin“Ş[áargss‚Ş]]ŸS±‘Kâ:İRun–]a“shell“builtin,›ŠÌpassing“it“áargsİ,˜and“return“its“exit“status.‘This“is“useful¦‘Kâ:when–¤de ning“a“shell“function“with“the“same“name“as“a“shell“builtin,‘¤Šretaining¦‘Kâ:the–òfunctionalit²!y“of“the“builtin“within“the“function.‘€The“return“status“is“non-¦‘Kâ:zero–¦fif“áshell-builtin“İis“not“a“shell“builtin“command.¡‘GŞcommandŸ ~‘hÊcommand–¿ª[-pVv]“ácommand‘-üŞ[áargumen²!ts‘3,Ş...‘r+]¤S±‘Kâ:İRuns–÷ácommand‘eVİwith“áargumenš²!ts‘j†İignoring“an˜y“shell“function“named“ácommandİ.¦‘Kâ:Only–Îmshell“builtin“commands“or“commands“found“bš²!y“searc˜hing“the“ŞPATH“İare¦‘Kâ:executed.‘•¤If–ͺthere“is“a“shell“function“named“Şlsİ,‘ùrunning“`Şcommand‘¦flsİ'“within“the¦‘Kâ:function–şNwill“execute“the“external“command“Şls“İinstead“of“calling“the“function¦‘Kâ:recursiv²!ely‘ÿe.‘ úTThe–Z`Ş-pİ'“option“means“to“use“a“default“v‘ÿdDalue“for“ŞPATH“İthat“is¦‘Kâ:guaran²!teed– Ìto“ nd“all“of“the“standard“utilities.‘The“return“status“in“this“case¦‘Kâ:is–l127“if“ácommand‘ÚSİcannot“bšMŞe“found“or“an“error“o˜ccurred,‘w¯and“the“exit“status“of¦‘Kâ:ácommand‘¸İotherwise.¡‘Kâ:If–yeither“the“`Ş-Vİ'“or“`Ş-vİ'“option“is“supplied,‘$Ûa“description“of“ácommand‘rËİis“prin²!ted.¦‘Kâ:The–\Ö`Ş-vİ'“option“causes“a“single“w²!ord“indicating“the“command“or“ le“name“used¦‘Kâ:to›1òin•²!v“ok“e˜ácommand‘ Dİto˜bMŞe˜displa“y“ed;‘w¹the˜`Ş-Vİ'˜option˜proMŞduces˜a˜more˜v“erbMŞose¦‘Kâ:description.‘LQIn–uâthis“case,›©Áthe“return“status“is“zero“if“ácommand‘ä4İis“found,˜and¦‘Kâ:non-zero–¦fif“not.Ÿt/‘GŞdeclareŸ ~‘hÊdeclare–¿ª[-afFrxi]“[-p]“[áname–Ş[=áv‘ÿdDalue“Ş]]¡‘Kâ:İDeclare–Cv‘ÿdDariables“and“givš²!e“them“attributes.‘¼ÃIf“no“áname‘İs“are“giv˜en,‘Vôthen“displa˜y¦‘Kâ:the–¦fv›ÿdDalues“of“v˜ariables“instead.¡‘Kâ:The–bU`Ş-pİ'“option“will“displaš²!y“the“attributes“and“v‘ÿdDalues“of“eac˜h“ánameİ.‘Ç-When“`Ş-pİ'¦‘Kâ:is–Úiused,‘çjadditional“options“are“ignored.‘yæThe“`Ş-Fİ'“option“inhibits“the“displa²!y“of¦‘Kâ:function–™ude nitions;‘üonly“the“function“name“and“attributes“are“prin²!ted.‘· `Ş-Fİ'¦‘Kâ:implies–ëx`Ş-fİ'.‘­The“follo²!wing“options“can“bMŞe“used“to“restrict“output“to“v‘ÿdDariables¦‘Kâ:with–¦fthe“spMŞeci ed“attributes“or“to“giv²!e“v‘ÿdDariables“attributes:¤t/‘Kâ:Ş-a‘.QŸİEacš²!h–áname‘İis“an“arra˜y“v‘ÿdDariable“(see“Section“6.7“[Arra˜ys],‘ˆ‡page“68).¡‘Kâ:Ş-f‘.QŸİUse–¦ffunction“names“only‘ÿe.¡‘Kâ:Ş-i‘.QŸİThe–]v›ÿdDariable“is“to“bMŞe“treated“as“an“in²!teger;‘¸varithmetic“ev˜aluation¦’…³-(see–TÛSection“6.5“[Shell“Arithmetic],‘e*page“66)“is“pMŞerformed“when“the¦’…³-v›ÿdDariable–¦fis“assigned“a“v˜alue.Œ‹'ÕYŸò‘GİChapter–¦f4:‘İİShell“Builtin“Commands’ù[ 39 ƒ3* ı ÌÖ‘Kâ:Ş-r‘.QŸİMak²!e–Ğáname‘İs“readonly‘ÿe.‘–›These“names“cannot“then“bMŞe“assigned“v‘ÿdDalues¤ 33’…³-b•²!y›¦fsubsequen“t˜assignmen“t˜statemen“ts˜or˜unset.©F7‘Kâ:Ş-x‘.QŸİMark–“eacš²!h“áname‘0İfor“expMŞort“to“subsequen˜t“commands“via“the“en˜vi-¡’…³-ronmen²!t.¦‘Kâ:Using–`Ş+İ'“instead“of“`Ş-İ'“turns“o “the“attribute“instead.‘¦kWhen“used“in“a“function,¡‘Kâ:Şdeclare–¦fİmakš²!es“eac˜h“áname‘CmİloMŞcal,“as“with“the“Şlocal“İcommand.Ÿ<µ‘Kâ:The–DÊreturn“status“is“zero“unless“an“inš²!v‘ÿdDalid“option“is“encoun˜tered,‘lcan“attempt¡‘Kâ:is–Òmade“to“de ne“a“function“using“`Ş-f‘¦ffoo=barİ',‘Üèan“attempt“is“made“to“assign¡‘Kâ:a–|v›ÿdDalue“to“a“readonly“v˜ariable,‘iÁan“attempt“is“made“to“assign“a“v˜alue“to“an¡‘Kâ:arraš²!y–ˆóv‘ÿdDariable“without“using“the“compMŞound“assignmen˜t“syn˜tax“(see“Section“6.7¡‘Kâ:[Arra²!ys],–‡¯page›'n68),“one˜of˜the˜ánames‘šğİis˜not˜a˜v–ÿdDalid˜shell˜v“ariable˜name,‘‡¯an¡‘Kâ:attempt–A†is“made“to“turn“o “readonly“status“for“a“readonly“v‘ÿdDariable,‘U³an“attempt¡‘Kâ:is–eímade“to“turn“o “arraš²!y“status“for“an“arra˜y“v‘ÿdDariable,‘rÒor“an“attempt“is“made“to¡‘Kâ:displaš²!y–¦fa“non-existen˜t“function“with“`Ş-fİ'.¦‘GŞechoŸ‰‚‘hÊecho–¿ª[-neE]“[áarg‘¯ÂŞ...‘îÁ]Ÿ<µ‘Kâ:İOutput–æŸthe“áarg‘ğİs,›ö­separated“b²!y“spaces,˜terminated“with“a“newline.‘ˆThe“return¡‘Kâ:status–¬áis“alw•²!a“ys–¬á0.›ñNIf“`Ş-nİ'“is“spMŞeci ed,‘®€the“trailing“newline“is“suppressed.˜If“the¡‘Kâ:`Ş-eİ'–ÔÛoption“is“giv•²!en,‘şÃin“terpretation–ÔÛof“the“folloš²!wing“bac˜kslash-escapMŞed“c˜haracters¡‘Kâ:is–ğÉenabled.‘½The“`Ş-Eİ'“option“disables“the“inš²!terpretation“of“these“escapMŞe“c˜harac-¡‘Kâ:ters,‘~evš²!en–Æzon“systems“where“they“are“in˜terpreted“b˜y“default.‘>The“Şxpg_echo¡‘Kâ:İshell–—èoption“ma²!y“bMŞe“used“to“dynamically“determine“whether“or“not“Şecho“İex-¡‘Kâ:pands–»ğthese“escapMŞe“cš²!haracters“b˜y“default.‘zŞecho“İin˜terprets“the“follo˜wing“escapMŞe¡‘Kâ:sequences:¦‘Kâ:Ş\a‘.QŸİalert‘¦f(bMŞell)¦‘Kâ:Ş\b‘.QŸİbac²!kspace¦‘Kâ:Ş\c‘.QŸİsuppress–¦ftrailing“newline¦‘Kâ:Ş\e‘.QŸİescapMŞe¦‘Kâ:Ş\f‘.QŸİform‘¦ffeed¦‘Kâ:Ş\n‘.QŸİnew‘¦fline¦‘Kâ:Ş\r‘.QŸİcarriage‘¦freturn¦‘Kâ:Ş\t‘.QŸİhorizon²!tal‘¦ftab¦‘Kâ:Ş\v‘.QŸİv²!ertical‘¦ftab¦‘Kâ:Ş\\‘.QŸİbac²!kslash¦‘Kâ:Ş\ánnn‘!ÑGİthe–$«eighš²!t-bit“c˜haracter“whose“v›ÿdDalue“is“the“oMŞctal“v˜alue“ánnn“İ(one“to¡’…³-three‘¦fdigits)¦‘Kâ:Ş\xáHH‘äÑİthe–¹Úeighš²!t-bit“c˜haracter“whose“v›ÿdDalue“is“the“hexadecimal“v˜alue“áHH¡’…³-İ(one–¦for“t•²!w“o–¦fhex“digits)¦‘GŞenableŒ‹(âŸò‘Gİ40’5»˜Bash–¦fReference“Man²!ual ƒ3* ı ÌÖ‘hÊŞenable–¿ª[-n]“[-p]“[-f“á lename‘Ş]“[-ads]“[áname‘\±Ş...‘›°]©Øı‘Kâ:İEnable–Pand“disable“builtin“shell“commands.‘Ú¸Disabling“a“builtin“allo²!ws“a“disk¤ 33‘Kâ:command–whic²!h“has“the“same“name“as“a“shell“builtin“to“bMŞe“executed“without¡‘Kâ:spMŞecifying–;Òa“full“pathname,‘Q#evš²!en“though“the“shell“normally“searc˜hes“for“builtins¡‘Kâ:bšMŞefore–Ùûdisk“commands.‘x›If“`Ş-nİ'“is“used,‘æàthe“áname‘İs“b˜ecome“disabled.‘x›Otherwise¡‘Kâ:áname‘İs–Qºare“enabled.‘ ßÚF‘ÿeor“example,‘¼to“use“the“Ştest“İbinary“found“via“Ş$PATH¡‘Kâ:İinstead–¦fof“the“shell“builtin“vš²!ersion,“t˜ypMŞe“`Şenable“-n“testİ'.¦‘Kâ:If–the“`Ş-pİ'“option“is“supplied,›xEor“no“áname‘¸ İargumen²!ts“appMŞear,˜a“list“of“shell¡‘Kâ:builtins–Šèis“prinš²!ted.‘‹cWith“no“other“argumen˜ts,‘Äthe“list“consists“of“all“enabled¡‘Kâ:shell–évbuiltins.‘§ The“`Ş-aİ'“option“means“to“list“eac²!h“builtin“with“an“indication“of¡‘Kâ:whether–¦for“not“it“is“enabled.¦‘Kâ:The–ÑŒ`Ş-fİ'“option“means“to“load“the“new“builtin“command“áname‘n“İfrom“shared¡‘Kâ:ob‘›»ject–"_á lenameİ,‘<Çon“systems“that“suppMŞort“dynamic“loading.‘±ÛThe“`Ş-dİ'“option“will¡‘Kâ:delete–¦fa“builtin“loaded“with“`Ş-fİ'.¦‘Kâ:If–¹åthere“are“no“options,‘¾Äa“list“of“the“shell“builtins“is“displa•²!y“ed.‘YThe–¹å`Ş-sİ'“option¡‘Kâ:restricts–itŞenable“İto“the“ãposix“İspMŞecial“builtins.‘ÉIf“`Ş-sİ'“is“used“with“`Ş-fİ',‘u¥the“new¡‘Kâ:builtin–¦fbšMŞecomes“a“sp˜ecial“builtin“(see“Section“4.4“[Sp˜ecial“Builtins],“page“49).¦‘Kâ:The–"return“status“is“zero“unless“a“áname‘¿İis“not“a“shell“builtin“or“there“is“an“error¡‘Kâ:loading–¦fa“new“builtin“from“a“shared“ob‘›»ject.Ÿ~Ç‘GŞhelpŸ%Ê‘hÊhelp–¿ª[-s]“[ápatternŞ]¦‘Kâ:İDispla²!y–¬qhelpful“information“abšMŞout“builtin“commands.‘ïıIf“ápattern“İis“sp˜eci ed,¡‘Kâ:Şhelp–w¬İgivš²!es“detailed“help“on“all“commands“matc˜hing“ápatternİ,‘otherwise“a“list“of¡‘Kâ:the–Jbuiltins“is“prinš²!ted.‘ÈÁThe“`Ş-sİ'“option“restricts“the“information“displa˜y˜ed“to¡‘Kâ:a–Øshort“usage“synopsis.‘r«The“return“status“is“zero“unless“no“command“matc²!hes¡‘Kâ:ápatternİ.Ÿ~Ç‘GŞletŸ%Ê‘hÊlet–¿ªáexpression“Ş[áexpressionŞ]¦‘Kâ:İThe–ı¹Şlet“İbuiltin“allo²!ws“arithmetic“to“bšMŞe“p˜erformed“on“shell“v‘ÿdDariables.‘ã×Eac²!h¡‘Kâ:áexpression–¶İis“ev‘ÿdDaluated“according“to“the“rules“givš²!en“bMŞelo˜w“in“Section“6.5“[Shell¡‘Kâ:Arithmetic],›êpage–vz66.‘ NIf“the“last“áexpression“İev‘ÿdDaluates“to“0,˜Şlet“İreturns“1;¡‘Kâ:otherwise–¦f0“is“returned.Ÿ~Ç‘GŞlocalŸ%Ê‘hÊlocal–¿ª[áoptionŞ]“áname–Ş[=áv‘ÿdDalue“Ş]¦‘Kâ:İF‘ÿeor–reacš²!h“argumen˜t,›5¢a“loMŞcal“v‘ÿdDariable“named“áname‘¶yİis“created,˜and“assigned“áv‘ÿdDalueİ.¡‘Kâ:The–}ğáoption“İcan“bMŞe“anš²!y“of“the“options“accepted“b˜y“Şdeclareİ.‘d{Şlocal“İcan“only¡‘Kâ:bMŞe–zused“within“a“function;‘Äit“makš²!es“the“v‘ÿdDariable“áname‘¬İha˜v˜e“a“visible“scopMŞe¡‘Kâ:restricted–˜qto“that“function“and“its“c²!hildren.‘³şThe“return“status“is“zero“unless¡‘Kâ:Şlocal–ÖÏİis“used“outside“a“function,›"éan“in²!v‘ÿdDalid“áname‘sÖİis“supplied,˜or“áname‘sÖİis“a¡‘Kâ:readonly‘¦fv‘ÿdDariable.Ÿ~Ç‘GŞlogoutŸ%Ê‘hÊlogout‘¿ª[ánŞ]¦‘Kâ:İExit–¦fa“login“shell,“returning“a“status“of“án“İto“the“shell's“paren²!t.Œ‹)ìŸò‘GİChapter–¦f4:‘İİShell“Builtin“Commands’ù[ 41 ƒ3* ı ÌÖ‘GŞprintfŸ±Ú‘hÊprintf‘¿ªáformat‘üªŞ[áargumen²!tss‚Ş]©e ‘Kâ:İW‘ÿerite–[the“formatted“áargumenš²!ts‘‘İİto“the“standard“output“under“the“con˜trol“of“the¤ 33‘Kâ:áformatİ.‘Î$The–w;áformat‘´;İis“a“cš²!haracter“string“whic˜h“con˜tains“three“t˜ypMŞes“of“ob‘›»jects:¡‘Kâ:plain›n”c•²!haracters,‘y¾whic“h˜are˜simply˜copied˜to˜standard˜output,‘y¾c“haracter˜escapMŞe¡‘Kâ:sequences,‘†/whicš²!h–~!are“con˜v˜erted“and“copied“to“the“standard“output,‘†/and“format¡‘Kâ:spMŞeci cations,‘‰†eacš²!h–\of“whic˜h“causes“prin˜ting“of“the“next“successiv˜e“áargumen˜tİ.¡‘Kâ:In–Ñvaddition“to“the“standard“Şprintf(1)“İformats,‘Ü:`Ş%bİ'“causes“Şprintf“İto“expand¡‘Kâ:bac²!kslash–krescapšMŞe“sequences“in“the“corresp˜onding“áargumen²!tİ,‘ܵand“`Ş%qİ'“causes¡‘Kâ:Şprintf–êİto“output“the“correspšMŞonding“áargumen²!t‘'İin“a“format“that“can“b˜e“reused¡‘Kâ:as–¦fshell“input.¦‘Kâ:The–ÂÌáformat‘ÿÌİis“reused“as“necessary“to“consume“all“of“the“áargumen²!tsİ.‘3If“the“áfor-¡‘Kâ:mat‘XÂİrequires–Âmore“áargumen²!ts‘Dİthan“are“supplied,‘7|the“extra“format“spMŞeci cations¡‘Kâ:bMŞeha•²!v“e–k‚as“if“a“zero“v‘ÿdDalue“or“n²!ull“string,›wIas“appropriate,˜had“bMŞeen“supplied.‘ÊThe“prompt“is“displa˜y˜ed“only“if“input“is“coming¡’…³-from–¦fa“terminal.¦‘Kâ:Ş-r‘.QŸİIf––Æthis“option“is“giv•²!en,‘Íbac“kslash––ÆdošMŞes“not“act“as“an“escap˜e“c²!haracter.¡’…³-The–¸bac²!kslash“is“considered“to“bMŞe“part“of“the“line.‘ğIn“particular,‘¼ƒa¡’…³-bacš²!kslash-newline–¦fpair“ma˜y“not“bMŞe“used“as“a“line“con˜tin˜uation.Œ‹*ùãŸò‘Gİ42’5»˜Bash–¦fReference“Man²!ual ƒ3* ı ÌÖ‘Kâ:Ş-s‘.QŸİSilenš²!t–NRmoMŞde.‘ÀIf“input“is“coming“from“a“terminal,‘_ïc˜haracters“are“not¤ 33’…³-ec²!hoMŞed.©—‘Kâ:Ş-t‘¦fátimeout¡’…³-İCause– óŞread“İto“time“out“and“return“failure“if“a“complete“line“of¡’…³-input–Ais“not“read“within“átimeout‘~İseconds.‘¼This“option“has“no“e ect¡’…³-if–¦fŞread“İis“not“reading“input“from“the“terminal“or“a“pipMŞe.¦‘GŞshoptŸ²-‘hÊshopt–¿ª[-pqsu]“[-o]“[áoptname‘\±Ş...‘›°]Ÿe`‘Kâ:İT‘ÿeoggle–]*the“v›ÿdDalues“of“v˜ariables“conš²!trolling“optional“shell“bMŞeha˜vior.‘ *With“no¡‘Kâ:options,›Ãor–½¹with“the“`Ş-pİ'“option,˜a“list“of“all“settable“options“is“displa•²!y“ed,˜with¡‘Kâ:an–(nindication“of“whether“or“not“eac²!h“is“set.‘cõThe“`Ş-pİ'“option“causes“output“to¡‘Kâ:bMŞe›\€displa•²!y“ed˜in˜a˜form˜that˜ma“y˜bMŞe˜reused˜as˜input.‘+Other˜options˜ha“v“e˜the¡‘Kâ:follo²!wing‘¦fmeanings:¦‘Kâ:Ş-s‘.QŸİEnable–¦f(set)“eac²!h“áoptnameİ.¦‘Kâ:Ş-u‘.QŸİDisable–¦f(unset)“eac²!h“áoptnameİ.¦‘Kâ:Ş-q‘.QŸİSuppresses–knormal“output;‘—the“return“status“indicates“whether“the¡’…³-áoptname›_[İis–ÂTset“or“unset.‘1¨If“m²!ultiple“áoptname˜İargumenš²!ts“are“giv˜en¡’…³-with–)°`Ş-qİ',‘Š‚the“return“status“is“zero“if“all“áoptnames‘2İare“enabled;¡’…³-non-zero‘¦fotherwise.¦‘Kâ:Ş-o‘.QŸİRestricts–û the“v‘ÿdDalues“of“áoptname‘˜İto“bMŞe“those“de ned“for“the“`Ş-oİ'¡’…³-option–}³to“the“Şset“İbuiltin“(see“Section“4.3“[The“Set“Builtin],‘¹ page“46).¦‘Kâ:If–˜ßeither“`Ş-sİ'“or“`Ş-uİ'“is“used“with“no“áoptname‘5æİargumenš²!ts,‘›“the“displa˜y“is“limited¡‘Kâ:to–¦fthose“options“whicš²!h“are“set“or“unset,“respMŞectiv˜ely‘ÿe.¤e`‘Kâ:Unless–¦fotherwise“noted,“the“Şshopt“İoptions“are“disabled“(o ‘Ú)“b²!y“default.¡‘Kâ:The–MËreturn“status“when“listing“options“is“zero“if“all“áoptnames‘ÁMİare“enabled,‘_„non-¤ 33‘Kâ:zero–¬otherwise.‘îºWhen“setting“or“unsetting“options,‘ílthe“return“status“is“zero¡‘Kâ:unless–¦fan“áoptname‘Cmİis“not“a“v‘ÿdDalid“shell“option.Ÿe`‘Kâ:The–¦flist“of“Şshopt“İoptions“is:¦‘Kâ:Şcdable_vars¡’…³-İIf–1çthis“is“set,‘TÆan“argumen²!t“to“the“Şcd“İbuiltin“command“that“is“not¡’…³-a–­6directory“is“assumed“to“bMŞe“the“name“of“a“v›ÿdDariable“whose“v˜alue“is¡’…³-the–¦fdirectory“to“c²!hange“to.¦‘Kâ:Şcdspell‘“MİIf–A¦set,‘UÌminor“errors“in“the“spšMŞelling“of“a“directory“comp˜onen²!t“in“a“Şcd¡’…³-İcommand–­¿will“bšMŞe“corrected.‘óçThe“errors“c•²!hec“k“ed–­¿for“are“transp˜osed¡’…³-cš²!haracters,‘T„a–şmissing“c˜haracter,‘T„and“a“c˜haracter“toMŞo“man˜y‘ÿe.‘æ'If“a¡’…³-correction–Ǧis“found,›ô2the“corrected“path“is“prin²!ted,˜and“the“command¡’…³-proMŞceeds.‘İİThis–¦foption“is“only“used“bš²!y“in˜teractiv˜e“shells.¦‘Kâ:Şcheckhash¡’…³-İIf–’this“is“set,‘–†Bash“c•²!hec“ks–’that“a“command“found“in“the“hash“table¡’…³-exists–ëbMŞefore“trying“to“execute“it.‘­/If“a“hashed“command“no“longer¡’…³-exists,–¦fa“normal“path“searc²!h“is“pMŞerformed.Œ‹+=Ÿò‘GİChapter–¦f4:‘İİShell“Builtin“Commands’ù[ 43 ƒ3* ı ÌÖ‘Kâ:Şcheckwinsize¤ 33’…³-İIf–ù5set,‘MèBash“c•²!hec“ks–ù5the“windoš²!w“size“after“eac˜h“command“and,‘Mèif¡’…³-necessary‘ÿe,–¦fupMŞdates“the“v‘ÿdDalues“of“ŞLINES“İand“ŞCOLUMNSİ.©fg‘Kâ:Şcmdhist‘“MİIf–¶set,‘0JBash“attempts“to“sa•²!v“e–¶all“lines“of“a“m²!ultiple-line“command¡’…³-in–´Ethe“same“history“enš²!try‘ÿe.‘zThis“allo˜ws“easy“re-editing“of“m˜ulti-line¡’…³-commands.¦‘Kâ:Şdotglob‘“MİIf–Vîset,‘fÓBash“includes“ lenames“bMŞeginning“with“a“`.'‘Ã`in“the“results“of¡’…³- lename‘¦fexpansion.¦‘Kâ:Şexecfail‘ Ó£İIf–ó+this“is“set,‘a“non-in•²!teractiv“e–ó+shell“will“not“exit“if“it“cannot“execute¡’…³-the–]˜ le“spMŞeci ed“as“an“argumen²!t“to“the“Şexec“İbuiltin“command.‘ŘAn¡’…³-in•²!teractiv“e–¦fshell“doMŞes“not“exit“if“Şexec“İfails.¦‘Kâ:Şexpand_aliases¡’…³-İIf–Ø^set,‘äÛaliases“are“expanded“as“describšMŞed“b˜elo²!w“under“Aliases,‘äÛSec-¡’…³-tion–À6.6“[Aliases],‘ÈÖpage“67.‘–ìThis“option“is“enabled“b²!y“default“for¡’…³-in•²!teractiv“e‘¦fshells.¦‘Kâ:Şextglob‘“MİIf–-‚set,‘E¯the“extended“pattern“matc²!hing“features“describšMŞed“ab˜o•²!v“e‘-‚(see¡’…³-Section–¦f3.5.8.1“[Pš²!attern“Matc˜hing],“page“21)“are“enabled.¦‘Kâ:Şhistappend¡’…³-İIf–Zpset,‘i¡the“history“list“is“appMŞended“to“the“ le“named“b²!y“the“v‘ÿdDalue“of¡’…³-the– !ŞHISTFILE“İv‘ÿdDariable“when“the“shell“exits,‘)brather“than“o•²!v“erwriting¡’…³-the‘¦f le.¦‘Kâ:Şhistreedit¡’…³-İIf–ûúset,›^and“Readline“is“bMŞeing“used,˜a“user“is“givš²!en“the“oppMŞortunit˜y¡’…³-to–¦fre-edit“a“failed“history“substitution.¦‘Kâ:Şhistverify¡’…³-İIf–9standard“(see“Section“6.11“[Bash“POSIX‘=ĞMoMŞde],¡’¿„ page–(Œ72).‘dPThis“is“inš²!tended“to“mak˜e“Bash“bMŞeha˜v˜e“as“a¡’¿„ strict–¦fsupMŞerset“of“that“standard.© a’…³-Şprivileged¡’¿„ İSame–¦fas“Ş-pİ.¦’…³-Şverbose‘“MİSame–¦fas“Ş-vİ.¦’…³-Şvi‘.QŸİUse–¦fa“Şviİ-stš²!yle“line“editing“in˜terface.¦’…³-Şxtrace‘R÷İSame–¦fas“Ş-xİ.¦‘Kâ:Ş-p‘.QŸİT‘ÿeurn–ûon“privileged“mošMŞde.‘;›In“this“mo˜de,‘8 the“Ş$BASH_ENV“İand“Ş$ENV¡’…³-İ les–‚;are“not“proMŞcessed,‘¹0shell“functions“are“not“inherited“from“the¡’…³-en•²!vironmen“t,›/õand–sthe“ŞSHELLOPTS“İv‘ÿdDariable,˜if“it“appMŞears“in“the“en-¡’…³-vironmenš²!t,‘ {is–Ÿignored.‘ÛfIf“the“shell“is“started“with“the“e ectiv˜e“user¡’…³-(group)–švid“not“equal“to“the“real“user“(group)“id,‘œÚand“the“Ş-p“İoption¡’…³-is–Ñ«not“supplied,‘|these“actions“are“takš²!en“and“the“e ectiv˜e“user“id¡’…³-is–`set“to“the“real“user“id.‘ ®If“the“Ş-p“İoption“is“supplied“at“startup,¡’…³-the–ƒe ectiv²!e“user“id“is“not“reset.‘ÒET‘ÿeurning“this“option“o “causes“the¡’…³-e ectiv²!e–quser“and“group“ids“to“bMŞe“set“to“the“real“user“and“group“ids.¦‘Kâ:Ş-t‘.QŸİExit–¦fafter“reading“and“executing“one“command.¦‘Kâ:Ş-u‘.QŸİT‘ÿereat–lÚunset“v‘ÿdDariables“as“an“error“when“pMŞerforming“parameter“ex-¡’…³-pansion.‘ûÅAn–[ error“message“will“bMŞe“written“to“the“standard“error,¡’…³-and–¦fa“non-in•²!teractiv“e–¦fshell“will“exit.¦‘Kâ:Ş-v‘.QŸİPrin²!t–¦fshell“input“lines“as“they“are“read.¦‘Kâ:Ş-x‘.QŸİPrinš²!t–ïa“trace“of“simple“commands“and“their“argumen˜ts“after“they¡’…³-are–¦fexpanded“and“bMŞefore“they“are“executed.¦‘Kâ:Ş-B‘.QŸİThe–î¡shell“will“pMŞerform“brace“expansion“(see“Section“3.5.1“[Brace¡’…³-Expansion],–¦fpage“15).‘İİThis“option“is“on“b²!y“default.¦‘Kâ:Ş-C‘.QŸİPrev•²!en“t–Òáoutput“redirection“using“`Ş>İ',–ı/`Ş>&İ',“and–Òá`Ş<>İ'“from“o•²!v“erwriting¡’…³-existing‘¦f les.¦‘Kâ:Ş-H‘.QŸİEnable–+`Ş!İ'“st²!yle“history“substitution“(see“Section“9.3“[History“In-¡’…³-teraction],‘cpage–=I105).‘¢†This“option“is“on“bš²!y“default“for“in˜teractiv˜e¡’…³-shells.¦‘Kâ:Ş-P‘.QŸİIf–-Pset,‘ do“not“folloš²!w“sym˜bšMŞolic“links“when“p˜erforming“commands¡’…³-sucš²!h–‰…as“Şcd“İwhic˜h“c˜hange“the“curren˜t“directory‘ÿe.‘Ô=The“ph˜ysical“direc-¡’…³-tory–*is“used“instead.‘!)By“default,‘-Bash“folloš²!ws“the“logical“c˜hain“of¡’…³-directories–h_when“pMŞerforming“commands“whicš²!h“c˜hange“the“curren˜t¡’…³-directory‘ÿe.ŸŸJ’…³-F‘ÿeor–šcexample,‘œÊif“`Ş/usr/sysİ'“is“a“sym²!bMŞolic“link“to“`Ş/usr/local/sysİ'¡’…³-then:Œ‹1GşŸò‘GİChapter–¦f4:‘İİShell“Builtin“Commands’ù[ 49 ƒ3* ı ÌÖ’¢›‚Ş$–¿ªcd“/usr/sys;“echo“$PWD¤ €’¢›‚/usr/sys¡’¢›‚$–¿ªcd“..;“pwd¡’¢›‚/usrŸ33’…³-İIf–¦fŞset“-P“İis“on,“then:Ÿ€’¢›‚Ş$–¿ªcd“/usr/sys;“echo“$PWD¡’¢›‚/usr/local/sys¡’¢›‚$–¿ªcd“..;“pwd¡’¢›‚/usr/local©33‘Kâ:--‘.QŸİIf–Êéno“argumenš²!ts“follo˜w“this“option,‘Ô then“the“pMŞositional“parameters¤ 33’…³-are–·unset.‘øÏOtherwise,‘Jthe“pMŞositional“parameters“are“set“to“the“áar-¡’…³-gumen•²!tsİ,›¦fev“en˜if˜some˜of˜them˜bMŞegin˜with˜a˜`Ş-İ'.¦‘Kâ:Ş-‘4IİSignal–`/the“end“of“options,‘Πcause“all“remaining“áargumen²!ts‘Ó±İto“bMŞe¡’…³-assigned–”…to“the“pMŞositional“parameters.‘¨9The“`Ş-xİ'“and“`Ş-vİ'“options¡’…³-are–ô‰turned“o .‘¢“If“there“are“no“argumen²!ts,‘the“pMŞositional“parameters¡’…³-remain‘¦func²!hanged.¦‘Kâ:Using–De`Ş+İ'“rather“than“`Ş-İ'“causes“these“options“to“bMŞe“turned“o .‘½2The“options“can¡‘Kâ:also–9óbšMŞe“used“up˜on“in•²!v“o˜cation–9óof“the“shell.‘˜ƒThe“currenš²!t“