commit bash-20041209 snapshot

This commit is contained in:
Chet Ramey
2011-12-03 13:41:01 -05:00
parent 76a8d78dfd
commit 8fed35894b
22 changed files with 2156 additions and 1525 deletions
+126 -123
View File
@@ -10,7 +10,7 @@
%DVIPSWebPage: (www.radicaleye.com)
%DVIPSCommandLine: dvips -D 600 -t letter -o bashref.ps bashref.dvi
%DVIPSParameters: dpi=600, compressed
%DVIPSSource: TeX output 2004.11.24:1549
%DVIPSSource: TeX output 2004.12.07:1057
%%BeginProcSet: texc.pro
%!
/TeXDict 300 dict def TeXDict begin/N{def}def/B{bind def}N/S{exch}N/X{S
@@ -4226,19 +4226,18 @@ letter
TeXDict begin 1 0 bop 150 1318 a Fu(Bash)64 b(Reference)j(Man)-5
b(ual)p 150 1385 3600 34 v 2361 1481 a Ft(Reference)31
b(Do)s(cumen)m(tation)i(for)d(Bash)1963 1589 y(Edition)h(3.1-dev)m(el,)
i(for)d Fs(Bash)f Ft(V)-8 b(ersion)31 b(3.1-dev)m(el.)3139
1697 y(No)m(v)m(em)m(b)s(er)g(2004)150 4935 y Fr(Chet)45
b(Ramey)-11 b(,)46 b(Case)g(W)-11 b(estern)46 b(Reserv)l(e)g(Univ)l
(ersit)l(y)150 5068 y(Brian)f(F)-11 b(o)l(x,)45 b(F)-11
b(ree)45 b(Soft)l(w)l(are)h(F)-11 b(oundation)p 150 5141
3600 17 v eop end
i(for)d Fs(Bash)f Ft(V)-8 b(ersion)31 b(3.1-dev)m(el.)3145
1697 y(Decem)m(b)s(er)g(2004)150 4935 y Fr(Chet)45 b(Ramey)-11
b(,)46 b(Case)g(W)-11 b(estern)46 b(Reserv)l(e)g(Univ)l(ersit)l(y)150
5068 y(Brian)f(F)-11 b(o)l(x,)45 b(F)-11 b(ree)45 b(Soft)l(w)l(are)h(F)
-11 b(oundation)p 150 5141 3600 17 v eop end
%%Page: 2 2
TeXDict begin 2 1 bop 150 2889 a Ft(This)35 b(text)h(is)g(a)g(brief)f
(description)h(of)f(the)h(features)g(that)g(are)g(presen)m(t)g(in)f
(the)h(Bash)f(shell)h(\(v)m(ersion)150 2999 y(3.1-dev)m(el,)d(24)e(No)m
(v)m(em)m(b)s(er)h(2004\).)150 3133 y(This)38 b(is)i(Edition)f(3.1-dev)
m(el,)44 b(last)c(up)s(dated)e(24)i(No)m(v)m(em)m(b)s(er)g(2004,)j(of)c
Fq(The)g(GNU)h(Bash)f(Reference)150 3243 y(Man)m(ual)p
(the)h(Bash)f(shell)h(\(v)m(ersion)150 2999 y(3.1-dev)m(el,)d(1)e
(Decem)m(b)s(er)g(2004\).)150 3133 y(This)42 b(is)h(Edition)g(3.1-dev)m
(el,)49 b(last)44 b(up)s(dated)e(1)h(Decem)m(b)s(er)h(2004,)k(of)43
b Fq(The)f(GNU)i(Bash)f(Reference)150 3243 y(Man)m(ual)p
Ft(,)32 b(for)e Fs(Bash)p Ft(,)f(V)-8 b(ersion)31 b(3.1-dev)m(el.)150
3377 y(Cop)m(yrigh)m(t)602 3374 y(c)577 3377 y Fp(\015)f
Ft(1988-2004)k(F)-8 b(ree)32 b(Soft)m(w)m(are)f(F)-8
@@ -5479,98 +5478,98 @@ p eop end
TeXDict begin 14 19 bop 150 -116 a Ft(14)2572 b(Bash)31
b(Reference)g(Man)m(ual)390 299 y Fs([)47 b(function)f(])h
Fj(name)58 b Fs(\(\))47 b Fj(compound-command)54 b Fs([)47
b Fj(redirections)55 b Fs(])275 450 y Ft(This)31 b(de\014nes)h(a)h
b Fj(redirections)55 b Fs(])275 436 y Ft(This)31 b(de\014nes)h(a)h
(shell)g(function)g(named)f Fq(name)p Ft(.)48 b(The)32
b(reserv)m(ed)h(w)m(ord)f Fs(function)f Ft(is)h(optional.)49
b(If)150 559 y(the)39 b Fs(function)f Ft(reserv)m(ed)h(w)m(ord)g(is)g
b(If)150 545 y(the)39 b Fs(function)f Ft(reserv)m(ed)h(w)m(ord)g(is)g
(supplied,)i(the)e(paren)m(theses)h(are)f(optional.)69
b(The)39 b Fq(b)s(o)s(dy)45 b Ft(of)40 b(the)150 669
b(The)39 b Fq(b)s(o)s(dy)45 b Ft(of)40 b(the)150 655
y(function)h(is)h(the)g(comp)s(ound)e(command)h Fq(comp)s(ound-command)
j Ft(\(see)e(Section)h(3.2.4)g([Comp)s(ound)150 778 y(Commands],)33
j Ft(\(see)e(Section)h(3.2.4)g([Comp)s(ound)150 765 y(Commands],)33
b(page)g(9\).)48 b(That)33 b(command)g(is)f(usually)h(a)g
Fq(list)i Ft(enclosed)e(b)s(et)m(w)m(een)h Fs({)e Ft(and)g
Fs(})p Ft(,)h(but)f(ma)m(y)150 888 y(b)s(e)27 b(an)m(y)h(comp)s(ound)e
Fs(})p Ft(,)h(but)f(ma)m(y)150 874 y(b)s(e)27 b(an)m(y)h(comp)s(ound)e
(command)h(listed)h(ab)s(o)m(v)m(e.)41 b Fq(comp)s(ound-command)30
b Ft(is)e(executed)g(whenev)m(er)g Fq(name)150 998 y
b Ft(is)e(executed)g(whenev)m(er)g Fq(name)150 984 y
Ft(is)37 b(sp)s(eci\014ed)g(as)g(the)h(name)f(of)g(a)h(command.)61
b(An)m(y)37 b(redirections)h(\(see)g(Section)g(3.6)g([Redirections],)
150 1107 y(page)31 b(24\))h(asso)s(ciated)g(with)e(the)g(shell)h
150 1093 y(page)31 b(24\))h(asso)s(ciated)g(with)e(the)g(shell)h
(function)f(are)h(p)s(erformed)d(when)i(the)g(function)g(is)h
(executed.)275 1258 y(The)26 b(exit)i(status)g(of)f(a)h(function)f
(executed.)275 1230 y(The)26 b(exit)i(status)g(of)f(a)h(function)f
(de\014nition)g(is)g(zero)h(unless)f(a)g(syn)m(tax)h(error)f(o)s(ccurs)
g(or)g(a)h(readonly)150 1367 y(function)k(with)f(the)i(same)f(name)g
g(or)g(a)h(readonly)150 1340 y(function)k(with)f(the)i(same)f(name)g
(already)h(exists.)46 b(When)32 b(executed,)h(the)f(exit)h(status)g(of)
f(a)g(function)150 1477 y(is)e(the)h(exit)g(status)g(of)f(the)h(last)g
f(a)g(function)150 1450 y(is)e(the)h(exit)g(status)g(of)f(the)h(last)g
(command)f(executed)i(in)e(the)g(b)s(o)s(dy)-8 b(.)275
1628 y(Note)22 b(that)f(for)f(historical)i(reasons,)h(in)e(the)g(most)g
1587 y(Note)22 b(that)f(for)f(historical)i(reasons,)h(in)e(the)g(most)g
(common)g(usage)g(the)g(curly)f(braces)h(that)g(surround)150
1737 y(the)38 b(b)s(o)s(dy)d(of)j(the)f(function)g(m)m(ust)g(b)s(e)g
1696 y(the)38 b(b)s(o)s(dy)d(of)j(the)f(function)g(m)m(ust)g(b)s(e)g
(separated)h(from)f(the)g(b)s(o)s(dy)f(b)m(y)h Fs(blank)p
Ft(s)f(or)h(newlines.)62 b(This)150 1847 y(is)38 b(b)s(ecause)g(the)h
Ft(s)f(or)h(newlines.)62 b(This)150 1806 y(is)38 b(b)s(ecause)g(the)h
(braces)f(are)h(reserv)m(ed)f(w)m(ords)g(and)f(are)i(only)f(recognized)
i(as)e(suc)m(h)g(when)f(they)i(are)150 1956 y(separated)e(b)m(y)g
i(as)e(suc)m(h)g(when)f(they)i(are)150 1915 y(separated)e(b)m(y)g
(whitespace.)61 b(Also,)39 b(when)d(using)g(the)h(braces,)i(the)e
Fq(list)j Ft(m)m(ust)c(b)s(e)g(terminated)i(b)m(y)f(a)150
2066 y(semicolon,)32 b(a)f(`)p Fs(&)p Ft(',)f(or)h(a)g(newline.)275
2217 y(When)h(a)i(function)f(is)g(executed,)i(the)e(argumen)m(ts)h(to)g
2025 y(semicolon,)32 b(a)f(`)p Fs(&)p Ft(',)f(or)h(a)g(newline.)275
2162 y(When)h(a)i(function)f(is)g(executed,)i(the)e(argumen)m(ts)h(to)g
(the)f(function)g(b)s(ecome)g(the)h(p)s(ositional)g(pa-)150
2326 y(rameters)42 b(during)e(its)i(execution)h(\(see)f(Section)g
2271 y(rameters)42 b(during)e(its)i(execution)h(\(see)f(Section)g
(3.4.1)h([P)m(ositional)h(P)m(arameters],)i(page)c(15\).)75
b(The)150 2436 y(sp)s(ecial)37 b(parameter)f(`)p Fs(#)p
b(The)150 2381 y(sp)s(ecial)37 b(parameter)f(`)p Fs(#)p
Ft(')g(that)h(expands)e(to)i(the)f(n)m(um)m(b)s(er)f(of)h(p)s
(ositional)h(parameters)f(is)g(up)s(dated)f(to)150 2545
(ositional)h(parameters)f(is)g(up)s(dated)f(to)150 2491
y(re\015ect)h(the)f(c)m(hange.)56 b(Sp)s(ecial)35 b(parameter)h
Fs(0)f Ft(is)g(unc)m(hanged.)54 b(The)35 b(\014rst)f(elemen)m(t)j(of)e
(the)g Fs(FUNCNAME)150 2655 y Ft(v)-5 b(ariable)27 b(is)g(set)g(to)h
(the)g Fs(FUNCNAME)150 2600 y Ft(v)-5 b(ariable)27 b(is)g(set)g(to)h
(the)f(name)f(of)h(the)g(function)f(while)h(the)g(function)f(is)h
(executing.)40 b(All)28 b(other)f(asp)s(ects)150 2765
(executing.)40 b(All)28 b(other)f(asp)s(ects)150 2710
y(of)32 b(the)g(shell)g(execution)i(en)m(vironmen)m(t)e(are)h(iden)m
(tical)g(b)s(et)m(w)m(een)g(a)f(function)g(and)f(its)i(caller)g(with)f
(the)150 2874 y(exception)26 b(that)g(the)f Fs(DEBUG)f
Ft(trap)h(b)s(elo)m(w\))h(is)f(not)h(inherited)e(unless)h(the)g
(function)g(has)g(b)s(een)g(giv)m(en)h(the)150 2984 y
Fs(trace)36 b Ft(attribute)h(using)g(the)g Fs(declare)e
Ft(builtin)h(or)h(the)g Fs(-o)30 b(functrace)35 b Ft(option)i(has)g(b)s
(een)f(enabled)150 3093 y(with)d(the)g Fs(set)g Ft(builtin,)h(\(in)f
(whic)m(h)g(case)h(all)g(functions)f(inherit)g(the)h
Fs(DEBUG)e Ft(trap\).)49 b(See)34 b(Section)g(4.1)150
3203 y([Bourne)c(Shell)h(Builtins],)g(page)g(33,)g(for)g(the)f
(description)h(of)f(the)h Fs(trap)e Ft(builtin.)275 3354
y(If)37 b(the)g(builtin)g(command)h Fs(return)d Ft(is)j(executed)g(in)g
(a)g(function,)h(the)e(function)h(completes)h(and)150
3463 y(execution)25 b(resumes)e(with)h(the)g(next)g(command)f(after)i
(the)150 2819 y(exception)h(that)f(the)g Fs(DEBUG)f Ft(and)g
Fs(RETURN)f Ft(traps)h(are)h(not)g(inherited)g(unless)f(the)h(function)
f(has)h(b)s(een)150 2929 y(giv)m(en)h(the)f Fs(trace)e
Ft(attribute)j(using)e(the)h Fs(declare)e Ft(builtin)h(or)h(the)g
Fs(-o)e(functrace)f Ft(option)j(has)g(b)s(een)150 3039
y(enabled)39 b(with)f(the)h Fs(set)e Ft(builtin,)k(\(in)e(whic)m(h)f
(case)i(all)f(functions)f(inherit)h(the)f Fs(DEBUG)g
Ft(and)g Fs(RETURN)150 3148 y Ft(traps\).)66 b(See)40
b(Section)f(4.1)h([Bourne)f(Shell)g(Builtins],)j(page)e(33,)i(for)d
(the)g(description)g(of)g(the)g Fs(trap)150 3258 y Ft(builtin.)275
3395 y(If)e(the)g(builtin)g(command)h Fs(return)d Ft(is)j(executed)g
(in)g(a)g(function,)h(the)e(function)h(completes)h(and)150
3504 y(execution)25 b(resumes)e(with)h(the)g(next)g(command)f(after)i
(the)f(function)f(call.)40 b(An)m(y)24 b(command)f(asso)s(ciated)150
3573 y(with)36 b(the)h Fs(RETURN)d Ft(trap)i(is)h(executed)g(b)s(efore)
3614 y(with)36 b(the)h Fs(RETURN)d Ft(trap)i(is)h(executed)g(b)s(efore)
f(execution)i(resumes.)57 b(When)37 b(a)f(function)g(completes,)150
3682 y(the)h(v)-5 b(alues)38 b(of)f(the)g(p)s(ositional)h(parameters)f
3724 y(the)h(v)-5 b(alues)38 b(of)f(the)g(p)s(ositional)h(parameters)f
(and)g(the)g(sp)s(ecial)h(parameter)f(`)p Fs(#)p Ft(')g(are)h(restored)
f(to)h(the)150 3792 y(v)-5 b(alues)26 b(they)f(had)g(prior)f(to)i(the)g
f(to)h(the)150 3833 y(v)-5 b(alues)26 b(they)f(had)g(prior)f(to)i(the)g
(function's)f(execution.)40 b(If)25 b(a)h(n)m(umeric)f(argumen)m(t)h
(is)f(giv)m(en)h(to)g Fs(return)p Ft(,)150 3902 y(that)j(is)g(the)f
(is)f(giv)m(en)h(to)g Fs(return)p Ft(,)150 3943 y(that)j(is)g(the)f
(function's)h(return)e(status;)j(otherwise)f(the)f(function's)h(return)
e(status)i(is)f(the)h(exit)h(status)150 4011 y(of)h(the)f(last)h
e(status)i(is)f(the)h(exit)h(status)150 4052 y(of)h(the)f(last)h
(command)f(executed)i(b)s(efore)e(the)g Fs(return)p Ft(.)275
4162 y(V)-8 b(ariables)31 b(lo)s(cal)g(to)f(the)g(function)f(ma)m(y)i
4189 y(V)-8 b(ariables)31 b(lo)s(cal)g(to)f(the)g(function)f(ma)m(y)i
(b)s(e)e(declared)h(with)f(the)h Fs(local)f Ft(builtin.)40
b(These)29 b(v)-5 b(ariables)150 4271 y(are)31 b(visible)g(only)f(to)h
b(These)29 b(v)-5 b(ariables)150 4299 y(are)31 b(visible)g(only)f(to)h
(the)g(function)f(and)g(the)g(commands)g(it)h(in)m(v)m(ok)m(es.)275
4422 y(F)-8 b(unction)38 b(names)f(and)g(de\014nitions)g(ma)m(y)i(b)s
4436 y(F)-8 b(unction)38 b(names)f(and)g(de\014nitions)g(ma)m(y)i(b)s
(e)e(listed)h(with)f(the)h(`)p Fs(-f)p Ft(')f(option)h(to)h(the)e
Fs(declare)f Ft(or)150 4532 y Fs(typeset)d Ft(builtin)h(commands)h
Fs(declare)f Ft(or)150 4545 y Fs(typeset)d Ft(builtin)h(commands)h
(\(see)h(Section)g(4.2)g([Bash)f(Builtins],)i(page)f(39\).)55
b(The)35 b(`)p Fs(-F)p Ft(')g(option)g(to)150 4641 y
b(The)35 b(`)p Fs(-F)p Ft(')g(option)g(to)150 4655 y
Fs(declare)f Ft(or)i Fs(typeset)e Ft(will)i(list)h(the)f(function)g
(names)g(only)g(\(and)g(optionally)h(the)f(source)g(\014le)h(and)150
4751 y(line)c(n)m(um)m(b)s(er,)g(if)f(the)h Fs(extdebug)e
4765 y(line)c(n)m(um)m(b)s(er,)g(if)f(the)h Fs(extdebug)e
Ft(shell)i(option)g(is)g(enabled\).)49 b(F)-8 b(unctions)33
b(ma)m(y)h(b)s(e)e(exp)s(orted)g(so)h(that)150 4861 y(subshells)f
b(ma)m(y)h(b)s(e)e(exp)s(orted)g(so)h(that)150 4874 y(subshells)f
(automatically)37 b(ha)m(v)m(e)d(them)g(de\014ned)e(with)h(the)g(`)p
Fs(-f)p Ft(')h(option)g(to)g(the)f Fs(export)f Ft(builtin)h(\(see)150
4970 y(Section)g(4.1)g([Bourne)f(Shell)g(Builtins],)i(page)f(33\).)47
4984 y(Section)g(4.1)g([Bourne)f(Shell)g(Builtins],)i(page)f(33\).)47
b(Note)33 b(that)g(shell)f(functions)g(and)f(v)-5 b(ariables)33
b(with)150 5080 y(the)d(same)g(name)g(ma)m(y)g(result)g(in)g(m)m
b(with)150 5093 y(the)d(same)g(name)g(ma)m(y)g(result)g(in)g(m)m
(ultiple)g(iden)m(tically-named)i(en)m(tries)f(in)e(the)h(en)m
(vironmen)m(t)g(passed)150 5189 y(to)h(the)g(shell's)f(c)m(hildren.)41
(vironmen)m(t)g(passed)150 5203 y(to)h(the)g(shell's)f(c)m(hildren.)41
b(Care)30 b(should)g(b)s(e)f(tak)m(en)j(in)e(cases)h(where)f(this)g(ma)
m(y)h(cause)g(a)g(problem.)275 5340 y(F)-8 b(unctions)30
b(ma)m(y)h(b)s(e)f(recursiv)m(e.)41 b(No)31 b(limit)g(is)g(placed)g(on)
@@ -7632,9 +7631,9 @@ b(alues)1110 4672 y(b)m(y)30 b(subsequen)m(t)g(assignmen)m(t)h
(statemen)m(ts)h(or)f(unset.)630 4842 y Fs(-t)384 b Ft(Giv)m(e)33
b(eac)m(h)h Fq(name)j Ft(the)32 b Fs(trace)f Ft(attribute.)46
b(T)-8 b(raced)32 b(functions)g(inherit)g(the)1110 4951
y Fs(DEBUG)21 b Ft(trap)h(from)h(the)f(calling)i(shell.)39
b(The)22 b(trace)h(attribute)h(has)e(no)g(sp)s(ecial)1110
5061 y(meaning)31 b(for)f(v)-5 b(ariables.)630 5230 y
y Fs(DEBUG)26 b Ft(and)h Fs(RETURN)f Ft(traps)h(from)g(the)h(calling)h
(shell.)40 b(The)27 b(trace)i(attribute)1110 5061 y(has)h(no)g(sp)s
(ecial)h(meaning)g(for)f(v)-5 b(ariables.)630 5230 y
Fs(-x)384 b Ft(Mark)30 b(eac)m(h)h Fq(name)k Ft(for)29
b(exp)s(ort)h(to)g(subsequen)m(t)f(commands)h(via)g(the)g(en)m(vi-)1110
5340 y(ronmen)m(t.)p eop end
@@ -8354,51 +8353,52 @@ b Ft(If)39 b(set,)j(an)m(y)e(trap)f(on)g Fs(ERR)g Ft(is)g(inherited)g
(b)m(y)g(shell)h(functions,)h(command)1110 408 y(substitutions,)35
b(and)e(commands)g(executed)i(in)f(a)g(subshell)f(en)m(vironmen)m(t.)
1110 518 y(The)d Fs(ERR)f Ft(trap)i(is)f(normally)h(not)f(inherited)g
(in)g(suc)m(h)g(cases.)630 735 y Fs(-H)384 b Ft(Enable)38
(in)g(suc)m(h)g(cases.)630 723 y Fs(-H)384 b Ft(Enable)38
b(`)p Fs(!)p Ft(')h(st)m(yle)h(history)e(substitution)g(\(see)h
(Section)h(9.3)f([History)g(In-)1110 845 y(teraction],)g(page)d(113\).)
(Section)h(9.3)f([History)g(In-)1110 833 y(teraction],)g(page)d(113\).)
57 b(This)34 b(option)i(is)f(on)g(b)m(y)h(default)f(for)g(in)m
(teractiv)m(e)1110 954 y(shells.)630 1172 y Fs(-P)384
(teractiv)m(e)1110 942 y(shells.)630 1147 y Fs(-P)384
b Ft(If)43 b(set,)k(do)c(not)g(follo)m(w)h(sym)m(b)s(olic)g(links)e
(when)g(p)s(erforming)g(commands)1110 1281 y(suc)m(h)29
(when)g(p)s(erforming)g(commands)1110 1257 y(suc)m(h)29
b(as)h Fs(cd)f Ft(whic)m(h)g(c)m(hange)h(the)g(curren)m(t)f(directory)
-8 b(.)42 b(The)28 b(ph)m(ysical)j(direc-)1110 1391 y(tory)j(is)g(used)
-8 b(.)42 b(The)28 b(ph)m(ysical)j(direc-)1110 1366 y(tory)j(is)g(used)
f(instead.)52 b(By)34 b(default,)h(Bash)f(follo)m(ws)h(the)f(logical)i
(c)m(hain)f(of)1110 1500 y(directories)j(when)d(p)s(erforming)h
(c)m(hain)f(of)1110 1476 y(directories)j(when)d(p)s(erforming)h
(commands)g(whic)m(h)g(c)m(hange)i(the)f(curren)m(t)1110
1610 y(directory)-8 b(.)1110 1773 y(F)g(or)31 b(example,)g(if)f(`)p
1586 y(directory)-8 b(.)1110 1743 y(F)g(or)31 b(example,)g(if)f(`)p
Fs(/usr/sys)p Ft(')e(is)i(a)g(sym)m(b)s(olic)h(link)f(to)g(`)p
Fs(/usr/local/sys)p Ft(')1110 1883 y(then:)1350 2046
y Fs($)47 b(cd)h(/usr/sys;)d(echo)i($PWD)1350 2156 y(/usr/sys)1350
2266 y($)g(cd)h(..;)f(pwd)1350 2375 y(/usr)1110 2539
y Ft(If)30 b Fs(set)f(-P)h Ft(is)h(on,)f(then:)1350 2702
y Fs($)47 b(cd)h(/usr/sys;)d(echo)i($PWD)1350 2812 y(/usr/local/sys)
1350 2921 y($)g(cd)h(..;)f(pwd)1350 3031 y(/usr/local)630
3248 y(-T)384 b Ft(If)31 b(set,)h(an)m(y)f(trap)g(on)g
Fs(DEBUG)e Ft(is)i(inherited)g(b)m(y)g(shell)g(functions,)g(command)
1110 3358 y(substitutions,)k(and)e(commands)g(executed)i(in)f(a)g
(subshell)f(en)m(vironmen)m(t.)1110 3467 y(The)d Fs(DEBUG)f
Ft(trap)h(is)g(normally)h(not)g(inherited)f(in)g(suc)m(h)g(cases.)630
3684 y Fs(--)384 b Ft(If)31 b(no)h(argumen)m(ts)f(follo)m(w)i(this)f
Fs(/usr/local/sys)p Ft(')1110 1853 y(then:)1350 2010
y Fs($)47 b(cd)h(/usr/sys;)d(echo)i($PWD)1350 2119 y(/usr/sys)1350
2229 y($)g(cd)h(..;)f(pwd)1350 2339 y(/usr)1110 2496
y Ft(If)30 b Fs(set)f(-P)h Ft(is)h(on,)f(then:)1350 2653
y Fs($)47 b(cd)h(/usr/sys;)d(echo)i($PWD)1350 2763 y(/usr/local/sys)
1350 2872 y($)g(cd)h(..;)f(pwd)1350 2982 y(/usr/local)630
3187 y(-T)384 b Ft(If)34 b(set,)j(an)m(y)e(trap)g(on)g
Fs(DEBUG)e Ft(and)i Fs(RETURN)e Ft(are)i(inherited)g(b)m(y)f(shell)i
(func-)1110 3297 y(tions,)k(command)d(substitutions,)h(and)f(commands)g
(executed)h(in)f(a)h(sub-)1110 3406 y(shell)33 b(en)m(vironmen)m(t.)49
b(The)32 b Fs(DEBUG)g Ft(and)g Fs(RETURN)f Ft(traps)h(are)i(normally)f
(not)1110 3516 y(inherited)d(in)g(suc)m(h)g(cases.)630
3721 y Fs(--)384 b Ft(If)31 b(no)h(argumen)m(ts)f(follo)m(w)i(this)f
(option,)g(then)f(the)h(p)s(ositional)h(parameters)1110
3794 y(are)h(unset.)49 b(Otherwise,)34 b(the)g(p)s(ositional)g
(parameters)g(are)g(set)g(to)g(the)g Fq(ar-)1110 3904
3830 y(are)h(unset.)49 b(Otherwise,)34 b(the)g(p)s(ositional)g
(parameters)g(are)g(set)g(to)g(the)g Fq(ar-)1110 3940
y(gumen)m(ts)p Ft(,)d(ev)m(en)g(if)f(some)h(of)g(them)f(b)s(egin)g
(with)g(a)h(`)p Fs(-)p Ft('.)630 4121 y Fs(-)432 b Ft(Signal)45
(with)g(a)h(`)p Fs(-)p Ft('.)630 4145 y Fs(-)432 b Ft(Signal)45
b(the)g(end)f(of)h(options,)k(cause)c(all)h(remaining)e
Fq(argumen)m(ts)49 b Ft(to)d(b)s(e)1110 4230 y(assigned)38
Fq(argumen)m(ts)49 b Ft(to)d(b)s(e)1110 4255 y(assigned)38
b(to)h(the)f(p)s(ositional)h(parameters.)65 b(The)37
b(`)p Fs(-x)p Ft(')h(and)g(`)p Fs(-v)p Ft(')g(options)1110
4340 y(are)25 b(turned)e(o\013.)40 b(If)24 b(there)h(are)g(no)f
4364 y(are)25 b(turned)e(o\013.)40 b(If)24 b(there)h(are)g(no)f
(argumen)m(ts,)i(the)f(p)s(ositional)h(parameters)1110
4450 y(remain)k(unc)m(hanged.)630 4667 y(Using)d(`)p
4474 y(remain)k(unc)m(hanged.)630 4679 y(Using)d(`)p
Fs(+)p Ft(')h(rather)f(than)g(`)p Fs(-)p Ft(')g(causes)h(these)f
(options)h(to)g(b)s(e)e(turned)g(o\013.)40 b(The)27 b(options)h(can)630
4776 y(also)36 b(b)s(e)f(used)f(up)s(on)g(in)m(v)m(o)s(cation)j(of)e
4788 y(also)36 b(b)s(e)f(used)f(up)s(on)g(in)m(v)m(o)s(cation)j(of)e
(the)g(shell.)56 b(The)34 b(curren)m(t)h(set)h(of)f(options)h(ma)m(y)g
(b)s(e)630 4886 y(found)29 b(in)h Fs($-)p Ft(.)630 5049
(b)s(e)630 4898 y(found)29 b(in)h Fs($-)p Ft(.)630 5055
y(The)43 b(remaining)h(N)f Fq(argumen)m(ts)48 b Ft(are)c(p)s(ositional)
g(parameters)g(and)f(are)h(assigned,)j(in)630 5159 y(order,)30
g(parameters)g(and)f(are)h(assigned,)j(in)630 5165 y(order,)30
b(to)h Fs($1)p Ft(,)f Fs($2)p Ft(,)36 b(.)22 b(.)g(.)42
b Fs($N)p Ft(.)e(The)30 b(sp)s(ecial)h(parameter)g Fs(#)f
Ft(is)g(set)h(to)g(N.)630 5322 y(The)f(return)f(status)i(is)f(alw)m(a)m
@@ -13278,73 +13278,76 @@ Fs(read)e Ft(to)i(time)330 737 y(out)c(if)g(input)f(do)s(es)g(not)h
(er)g(of)i(c)m(haracters)h(rather)e(than)g(a)h(full)f(line,)i(and)d
(the)i(`)p Fs(-d)p Ft(')330 956 y(option)j(will)g(read)f(un)m(til)g(a)h
(particular)g(c)m(haracter)h(rather)e(than)g(newline.)225
1096 y Fp(\017)60 b Ft(The)33 b Fs(return)e Ft(builtin)i(ma)m(y)g(b)s
1086 y Fp(\017)60 b Ft(The)33 b Fs(return)e Ft(builtin)i(ma)m(y)g(b)s
(e)g(used)f(to)i(ab)s(ort)f(execution)h(of)f(scripts)g(executed)h(with)
f(the)g Fs(.)g Ft(or)330 1205 y Fs(source)c Ft(builtins)g(\(see)j
f(the)g Fs(.)g Ft(or)330 1196 y Fs(source)c Ft(builtins)g(\(see)j
(Section)f(4.1)g([Bourne)g(Shell)f(Builtins],)h(page)g(33\).)225
1345 y Fp(\017)60 b Ft(Bash)43 b(includes)g(the)g Fs(shopt)f
1325 y Fp(\017)60 b Ft(Bash)43 b(includes)g(the)g Fs(shopt)f
Ft(builtin,)k(for)d(\014ner)f(con)m(trol)j(of)e(shell)h(optional)g
(capabilities)h(\(see)330 1455 y(Section)34 b(4.2)g([Bash)f(Builtins],)
(capabilities)h(\(see)330 1435 y(Section)34 b(4.2)g([Bash)f(Builtins],)
i(page)e(39\),)i(and)e(allo)m(ws)h(these)f(options)h(to)f(b)s(e)g(set)g
(and)g(unset)f(at)330 1564 y(shell)f(in)m(v)m(o)s(cation)h(\(see)f
(and)g(unset)f(at)330 1544 y(shell)f(in)m(v)m(o)s(cation)h(\(see)f
(Section)g(6.1)h([In)m(v)m(oking)f(Bash],)g(page)h(63\).)225
1704 y Fp(\017)60 b Ft(Bash)23 b(has)f(m)m(uc)m(h)g(more)h(optional)h
1674 y Fp(\017)60 b Ft(Bash)23 b(has)f(m)m(uc)m(h)g(more)h(optional)h
(b)s(eha)m(vior)e(con)m(trollable)j(with)d(the)h Fs(set)e
Ft(builtin)h(\(see)i(Section)f(4.3)330 1813 y([The)30
b(Set)h(Builtin],)g(page)g(50\).)225 1953 y Fp(\017)60
Ft(builtin)h(\(see)i(Section)f(4.3)330 1783 y([The)30
b(Set)h(Builtin],)g(page)g(50\).)225 1913 y Fp(\017)60
b Ft(The)31 b(`)p Fs(-x)p Ft(')g(\()p Fs(xtrace)p Ft(\))g(option)h
(displa)m(ys)f(commands)h(other)f(than)h(simple)f(commands)g(when)g(p)s
(er-)330 2062 y(forming)f(an)g(execution)i(trace)f(\(see)h(Section)f
(4.3)g([The)g(Set)f(Builtin],)h(page)h(50\).)225 2202
(er-)330 2022 y(forming)f(an)g(execution)i(trace)f(\(see)h(Section)f
(4.3)g([The)g(Set)f(Builtin],)h(page)h(50\).)225 2152
y Fp(\017)60 b Ft(The)28 b Fs(test)g Ft(builtin)h(\(see)h(Section)f
(4.1)h([Bourne)f(Shell)g(Builtins],)h(page)g(33\))g(is)f(sligh)m(tly)h
(di\013eren)m(t,)330 2311 y(as)23 b(it)g(implemen)m(ts)f(the)h
(di\013eren)m(t,)330 2262 y(as)23 b(it)g(implemen)m(ts)f(the)h
Fl(posix)f Ft(algorithm,)j(whic)m(h)d(sp)s(eci\014es)g(the)h(b)s(eha)m
(vior)f(based)g(on)h(the)f(n)m(um)m(b)s(er)330 2421 y(of)31
b(argumen)m(ts.)225 2560 y Fp(\017)60 b Ft(Bash)31 b(includes)g(the)h
(vior)f(based)g(on)h(the)f(n)m(um)m(b)s(er)330 2371 y(of)31
b(argumen)m(ts.)225 2501 y Fp(\017)60 b Ft(Bash)31 b(includes)g(the)h
Fs(caller)d Ft(builtin,)j(whic)m(h)f(displa)m(ys)g(the)g(con)m(text)i
(of)f(an)m(y)g(activ)m(e)h(subroutine)330 2670 y(call)28
(of)f(an)m(y)g(activ)m(e)h(subroutine)330 2610 y(call)28
b(\(a)f(shell)f(function)h(or)f(a)h(script)f(executed)h(with)f(the)h
Fs(.)f Ft(or)g Fs(source)f Ft(builtins\).)39 b(This)26
b(supp)s(orts)330 2780 y(the)31 b(bash)e(debugger.)225
2919 y Fp(\017)60 b Ft(The)42 b Fs(trap)f Ft(builtin)h(\(see)i(Section)
b(supp)s(orts)330 2720 y(the)31 b(bash)e(debugger.)225
2849 y Fp(\017)60 b Ft(The)42 b Fs(trap)f Ft(builtin)h(\(see)i(Section)
f(4.1)h([Bourne)e(Shell)g(Builtins],)47 b(page)c(33\))h(allo)m(ws)g(a)e
Fs(DEBUG)330 3029 y Ft(pseudo-signal)c(sp)s(eci\014cation,)i(similar)e
Fs(DEBUG)330 2959 y Ft(pseudo-signal)c(sp)s(eci\014cation,)i(similar)e
(to)g Fs(EXIT)p Ft(.)62 b(Commands)36 b(sp)s(eci\014ed)h(with)g(a)h
Fs(DEBUG)e Ft(trap)330 3138 y(are)k(executed)g(b)s(efore)f(ev)m(ery)h
Fs(DEBUG)e Ft(trap)330 3068 y(are)k(executed)g(b)s(efore)f(ev)m(ery)h
(simple)f(command,)j Fs(for)c Ft(command,)k Fs(case)c
Ft(command,)k Fs(select)330 3248 y Ft(command,)35 b(ev)m(ery)g
Ft(command,)k Fs(select)330 3178 y Ft(command,)35 b(ev)m(ery)g
(arithmetic)g Fs(for)e Ft(command,)i(and)f(b)s(efore)g(the)g(\014rst)f
(command)h(executes)h(in)330 3357 y(a)29 b(shell)g(function.)40
(command)h(executes)h(in)330 3288 y(a)29 b(shell)g(function.)40
b(The)28 b Fs(DEBUG)g Ft(trap)g(is)h(not)g(inherited)f(b)m(y)h(shell)g
(functions)f(unless)g(the)h(function)330 3467 y(has)35
(functions)f(unless)g(the)h(function)330 3397 y(has)35
b(b)s(een)g(giv)m(en)i(the)f Fs(trace)e Ft(attribute)i(or)g(the)g
Fs(functrace)d Ft(option)j(has)f(b)s(een)g(enabled)g(using)330
3577 y(the)28 b Fs(shopt)e Ft(builtin.)39 b(The)27 b
3507 y(the)28 b Fs(shopt)e Ft(builtin.)39 b(The)27 b
Fs(extdebug)f Ft(shell)i(option)g(has)f(additional)h(e\013ects)h(on)f
(the)g Fs(DEBUG)e Ft(trap.)330 3716 y(The)21 b Fs(trap)e
(the)g Fs(DEBUG)e Ft(trap.)330 3636 y(The)21 b Fs(trap)e
Ft(builtin)i(\(see)h(Section)g(4.1)g([Bourne)f(Shell)g(Builtins],)j
(page)e(33\))g(allo)m(ws)g(an)f Fs(ERR)f Ft(pseudo-)330
3826 y(signal)30 b(sp)s(eci\014cation,)h(similar)f(to)g
3746 y(signal)30 b(sp)s(eci\014cation,)h(similar)f(to)g
Fs(EXIT)f Ft(and)g Fs(DEBUG)p Ft(.)39 b(Commands)28 b(sp)s(eci\014ed)h
(with)g(an)g Fs(ERR)g Ft(trap)330 3935 y(are)40 b(executed)g(after)g(a)
(with)g(an)g Fs(ERR)g Ft(trap)330 3856 y(are)40 b(executed)g(after)g(a)
f(simple)h(command)f(fails,)j(with)d(a)h(few)f(exceptions.)68
b(The)39 b Fs(ERR)g Ft(trap)g(is)330 4045 y(not)g(inherited)f(b)m(y)h
b(The)39 b Fs(ERR)g Ft(trap)g(is)330 3965 y(not)g(inherited)f(b)m(y)h
(shell)g(functions)f(unless)g(the)h Fs(-o)29 b(errtrace)37
b Ft(option)i(to)g(the)g Fs(set)f Ft(builtin)g(is)330
4154 y(enabled.)330 4294 y(The)g Fs(trap)g Ft(builtin)h(\(see)g
4075 y(enabled.)330 4204 y(The)g Fs(trap)g Ft(builtin)h(\(see)g
(Section)h(4.1)g([Bourne)f(Shell)g(Builtins],)i(page)f(33\))g(allo)m
(ws)g(a)g Fs(RETURN)330 4403 y Ft(pseudo-signal)35 b(sp)s
(ws)g(a)g Fs(RETURN)330 4314 y Ft(pseudo-signal)35 b(sp)s
(eci\014cation,)j(similar)d(to)h Fs(EXIT)e Ft(and)g Fs(DEBUG)p
Ft(.)54 b(Commands)34 b(sp)s(eci\014ed)g(with)h(an)330
4513 y Fs(RETURN)k Ft(trap)i(are)g(executed)h(b)s(efore)e(execution)i
4423 y Fs(RETURN)k Ft(trap)i(are)g(executed)h(b)s(efore)e(execution)i
(resumes)e(after)h(a)g(shell)g(function)g(or)g(a)g(shell)330
4623 y(script)36 b(executed)g(with)g Fs(.)f Ft(or)h Fs(source)e
4533 y(script)36 b(executed)g(with)g Fs(.)f Ft(or)h Fs(source)e
Ft(returns.)56 b(The)35 b Fs(RETURN)f Ft(trap)i(is)g(not)g(inherited)f
(b)m(y)h(shell)330 4732 y(functions.)225 4872 y Fp(\017)60
(b)m(y)h(shell)330 4643 y(functions)k(unless)h(the)g(function)f(has)h
(b)s(een)f(giv)m(en)i(the)f Fs(trace)e Ft(attribute)j(or)e(the)h
Fs(functrace)330 4752 y Ft(option)31 b(has)f(b)s(een)g(enabled)g(using)
g(the)g Fs(shopt)f Ft(builtin.)225 4882 y Fp(\017)60
b Ft(The)30 b(Bash)g Fs(type)f Ft(builtin)h(is)g(more)g(extensiv)m(e)i
(and)d(giv)m(es)j(more)e(information)h(ab)s(out)f(the)g(names)330
4981 y(it)h(\014nds)e(\(see)i(Section)g(4.2)h([Bash)e(Builtins],)i
4991 y(it)h(\014nds)e(\(see)i(Section)g(4.2)h([Bash)e(Builtins],)i
(page)f(39\).)225 5121 y Fp(\017)60 b Ft(The)34 b(Bash)h
Fs(umask)e Ft(builtin)h(p)s(ermits)g(a)g(`)p Fs(-p)p
Ft(')h(option)g(to)g(cause)g(the)g(output)f(to)h(b)s(e)f(displa)m(y)m