commit bash-20040422 snapshot

This commit is contained in:
Chet Ramey
2011-12-03 12:56:49 -05:00
parent 1d7ecd770c
commit de8913bd20
51 changed files with 13071 additions and 634 deletions
+63 -61
View File
@@ -8,7 +8,7 @@
%DVIPSWebPage: (www.radicaleye.com)
%DVIPSCommandLine: dvips -D 600 -t letter -o bashref.ps bashref.dvi
%DVIPSParameters: dpi=600, compressed
%DVIPSSource: TeX output 2004.01.28:1550
%DVIPSSource: TeX output 2004.04.20:1526
%%BeginProcSet: texc.pro
%!
/TeXDict 300 dict def TeXDict begin/N{def}def/B{bind def}N/S{exch}N/X{S
@@ -2540,7 +2540,7 @@ letter
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)h
(for)e(Bash)2178 1589 y(Edition)f(3.0,)i(for)f Fs(Bash)g
Ft(V)-8 b(ersion)30 b(3.0-b)s(eta1.)3218 1697 y(Jan)m(uary)g(2004)150
Ft(V)-8 b(ersion)30 b(3.0-b)s(eta1.)3333 1697 y(April)e(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
@@ -2548,10 +2548,10 @@ b(oundation)p 150 5141 3600 17 v eop
%%Page: 2 2
2 1 bop 150 2889 a Ft(This)34 b(text)i(is)f(a)h(brief)e(description)g
(of)h(the)h(features)g(that)g(are)g(presen)m(t)g(in)e(the)i(Bash)f
(shell)f(\(v)m(ersion)150 2999 y(3.0-b)s(eta1,)f(28)e(Jan)m(uary)f
(2004\).)150 3133 y(This)i(is)g(Edition)f(3.0,)36 b(last)d(up)s(dated)f
(28)i(Jan)m(uary)f(2004,)j(of)d Fq(The)g(GNU)h(Bash)g(Reference)g(Man)m
(ual)p Ft(,)150 3243 y(for)c Fs(Bash)p Ft(,)g(V)-8 b(ersion)30
(shell)f(\(v)m(ersion)150 2999 y(3.0-b)s(eta1,)f(20)e(April)d(2004\).)
150 3133 y(This)k(is)h(Edition)e(3.0,)36 b(last)e(up)s(dated)e(20)j
(April)c(2004,)37 b(of)d Fq(The)f(GNU)h(Bash)g(Reference)g(Man)m(ual)p
Ft(,)h(for)150 3243 y Fs(Bash)p Ft(,)29 b(V)-8 b(ersion)30
b(3.0-b)s(eta1.)150 3377 y(Cop)m(yrigh)m(t)602 3374 y(c)577
3377 y Fp(\015)g Ft(1988-2003)k(F)-8 b(ree)32 b(Soft)m(w)m(are)f(F)-8
b(oundation,)31 b(Inc.)150 3512 y(P)m(ermission)f(is)i(gran)m(ted)h(to)
@@ -3828,21 +3828,21 @@ Fq(list)h Ft(m)m(ust)e(b)s(e)g(terminated)h(b)m(y)g(a)150
b(The)150 2436 y(sp)s(ecial)35 b(parameter)h(`)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)e(parameters)i(is)f(up)s(dated)g(to)150 2545
y(re\015ect)28 b(the)g(c)m(hange.)41 b(P)m(ositional)27
b(parameter)h Fs(0)f Ft(is)f(unc)m(hanged.)40 b(The)27
b(\014rst)g(elemen)m(t)h(of)f(the)h Fs(FUNCNAME)150 2655
y Ft(v)-5 b(ariable)25 b(is)h(set)h(to)h(the)f(name)f(of)h(the)g
(function)e(while)g(the)i(function)e(is)h(executing.)39
b(All)26 b(other)h(asp)s(ects)150 2765 y(of)32 b(the)g(shell)e
(execution)j(en)m(vironmen)m(t)e(are)i(iden)m(tical)d(b)s(et)m(w)m(een)
j(a)f(function)f(and)g(its)h(caller)f(with)g(the)150
2874 y(exception)25 b(that)h(the)f Fs(DEBUG)f Ft(trap)h(b)s(elo)m(w\))g
(is)f(not)i(inherited)c(unless)i(the)h(function)f(has)h(b)s(een)g(giv)m
(en)g(the)150 2984 y Fs(trace)36 b Ft(attribute)g(using)g(the)h
Fs(declare)e Ft(builtin)e(or)k(the)g Fs(-o)30 b(functrace)35
b Ft(option)h(has)h(b)s(een)f(enabled)150 3093 y(with)c(the)h
Fs(set)g Ft(builtin,)e(\(in)h(whic)m(h)g(case)i(all)e(functions)g
(inherit)f(the)j Fs(DEBUG)e Ft(trap\).)49 b(See)34 b(Section)f(4.1)150
y(re\015ect)h(the)f(c)m(hange.)56 b(Sp)s(ecial)33 b(parameter)j
Fs(0)f Ft(is)f(unc)m(hanged.)54 b(The)35 b(\014rst)f(elemen)m(t)i(of)f
(the)g Fs(FUNCNAME)150 2655 y Ft(v)-5 b(ariable)25 b(is)h(set)h(to)h
(the)f(name)f(of)h(the)g(function)e(while)g(the)i(function)e(is)h
(executing.)39 b(All)26 b(other)h(asp)s(ects)150 2765
y(of)32 b(the)g(shell)e(execution)j(en)m(vironmen)m(t)e(are)i(iden)m
(tical)d(b)s(et)m(w)m(een)j(a)f(function)f(and)g(its)h(caller)f(with)g
(the)150 2874 y(exception)25 b(that)h(the)f Fs(DEBUG)f
Ft(trap)h(b)s(elo)m(w\))g(is)f(not)i(inherited)c(unless)i(the)h
(function)f(has)h(b)s(een)g(giv)m(en)g(the)150 2984 y
Fs(trace)36 b Ft(attribute)g(using)g(the)h Fs(declare)e
Ft(builtin)e(or)k(the)g Fs(-o)30 b(functrace)35 b Ft(option)h(has)h(b)s
(een)f(enabled)150 3093 y(with)c(the)h Fs(set)g Ft(builtin,)e(\(in)h
(whic)m(h)g(case)i(all)e(functions)g(inherit)f(the)j
Fs(DEBUG)e Ft(trap\).)49 b(See)34 b(Section)f(4.1)150
3203 y([Bourne)d(Shell)f(Builtins],)f(page)j(33,)g(for)g(the)f
(description)f(of)h(the)h Fs(trap)e Ft(builtin.)275 3354
y(If)37 b(the)g(builtin)d(command)k Fs(return)d Ft(is)i(executed)h(in)f
@@ -7874,24 +7874,26 @@ Ft(and)h Fs(unalias)e Ft(builtin)f(commands.)p eop
72 77 bop 150 -116 a Ft(72)2572 b(Bash)31 b(Reference)g(Man)m(ual)275
299 y(The)e(\014rst)f(w)m(ord)i(of)f(eac)m(h)i(simple)d(command,)i(if)e
(unquoted,)h(is)g(c)m(hec)m(k)m(ed)i(to)g(see)f(if)f(it)g(has)g(an)g
(alias.)150 408 y(If)34 b(so,)i(that)f(w)m(ord)f(is)f(replaced)h(b)m(y)
g(the)h(text)g(of)g(the)f(alias.)52 b(The)34 b(alias)g(name)g(and)g
(the)g(replacemen)m(t)150 518 y(text)g(ma)m(y)f(con)m(tain)g(an)m(y)g
(v)-5 b(alid)31 b(shell)g(input,)h(including)d(shell)i(metac)m
(haracters,)36 b(with)c(the)h(exception)150 628 y(that)i(the)f(alias)f
(name)h(ma)m(y)h(not)g(con)m(tain)f(`)p Fs(=)p Ft('.)52
b(The)34 b(\014rst)f(w)m(ord)h(of)g(the)g(replacemen)m(t)h(text)g(is)e
(tested)150 737 y(for)26 b(aliases,)h(but)f(a)h(w)m(ord)f(that)h(is)f
(iden)m(tical)f(to)i(an)g(alias)e(b)s(eing)g(expanded)h(is)g(not)g
(expanded)g(a)h(second)150 847 y(time.)40 b(This)27 b(means)i(that)g
(one)g(ma)m(y)h(alias)e Fs(ls)g Ft(to)i Fs("ls)f(-F")p
Ft(,)g(for)f(instance,)i(and)e(Bash)h(do)s(es)f(not)h(try)g(to)150
956 y(recursiv)m(ely)j(expand)g(the)h(replacemen)m(t)g(text.)50
b(If)32 b(the)h(last)g(c)m(haracter)h(of)g(the)f(alias)f(v)-5
b(alue)32 b(is)g(a)h(space)150 1066 y(or)f(tab)g(c)m(haracter,)j(then)d
(the)g(next)g(command)g(w)m(ord)g(follo)m(wing)e(the)i(alias)g(is)f
(also)h(c)m(hec)m(k)m(ed)i(for)e(alias)150 1176 y(expansion.)275
1325 y(Aliases)27 b(are)h(created)i(and)d(listed)g(with)g(the)h
(alias.)150 408 y(If)24 b(so,)i(that)g(w)m(ord)e(is)g(replaced)g(b)m(y)
g(the)h(text)h(of)e(the)h(alias.)38 b(The)24 b(c)m(haracters)i(`)p
Fs(/)p Ft(',)h(`)p Fs($)p Ft(',)f(`)p Fs(`)p Ft(',)g(`)p
Fs(=)p Ft(')f(and)f(an)m(y)h(of)150 518 y(the)e(shell)e(metac)m
(haracters)k(or)e(quoting)f(c)m(haracters)i(listed)e(ab)s(o)m(v)m(e)i
(ma)m(y)f(not)g(app)s(ear)f(in)g(an)h(alias)f(name.)150
628 y(The)g(replacemen)m(t)g(text)h(ma)m(y)g(con)m(tain)g(an)m(y)f(v)-5
b(alid)21 b(shell)f(input,)i(including)d(shell)h(metac)m(haracters.)40
b(The)150 737 y(\014rst)35 b(w)m(ord)g(of)h(the)g(replacemen)m(t)h
(text)f(is)f(tested)i(for)e(aliases,)i(but)e(a)h(w)m(ord)g(that)g(is)f
(iden)m(tical)g(to)h(an)150 847 y(alias)30 b(b)s(eing)g(expanded)g(is)g
(not)h(expanded)f(a)h(second)g(time.)42 b(This)29 b(means)i(that)g(one)
g(ma)m(y)h(alias)e Fs(ls)g Ft(to)150 956 y Fs("ls)f(-F")p
Ft(,)36 b(for)f(instance,)h(and)e(Bash)h(do)s(es)g(not)g(try)g(to)g
(recursiv)m(ely)f(expand)g(the)h(replacemen)m(t)h(text.)150
1066 y(If)31 b(the)h(last)g(c)m(haracter)h(of)f(the)g(alias)f(v)-5
b(alue)31 b(is)g(a)h(space)g(or)g(tab)g(c)m(haracter,)i(then)d(the)h
(next)g(command)150 1176 y(w)m(ord)e(follo)m(wing)f(the)h(alias)g(is)f
(also)i(c)m(hec)m(k)m(ed)h(for)e(alias)g(expansion.)275
1325 y(Aliases)d(are)h(created)i(and)d(listed)g(with)g(the)h
Fs(alias)f Ft(command,)h(and)g(remo)m(v)m(ed)h(with)e(the)h
Fs(unalias)150 1434 y Ft(command.)275 1583 y(There)44
b(is)g(no)h(mec)m(hanism)f(for)g(using)g(argumen)m(ts)h(in)e(the)i
@@ -8512,28 +8514,28 @@ Fs(set)f Ft(builtin)e(is)i(enabled,)h(Bash)g(rep)s(orts)f(suc)m(h)h(c)m
(hanges)150 1228 y(immediately)j(\(see)i(Section)f(4.3)h([The)f(Set)h
(Builtin],)d(page)j(50\).)42 b(An)m(y)29 b(trap)g(on)g
Fs(SIGCHLD)f Ft(is)g(executed)150 1338 y(for)i(eac)m(h)i(c)m(hild)c
(pro)s(cess)i(that)h(exits.)275 1474 y(If)e(an)g(attempt)i(to)g(exit)e
(Bash)h(is)f(while)f(jobs)h(are)h(stopp)s(ed,)f(the)h(shell)e(prin)m
(ts)g(a)i(message)h(w)m(arning)150 1583 y(that)f(there)g(are)g(stopp)s
(ed)f(jobs.)40 b(The)30 b Fs(jobs)e Ft(command)i(ma)m(y)g(then)f(b)s(e)
h(used)f(to)h(insp)s(ect)f(their)f(status.)150 1693 y(If)i(a)h(second)g
(attempt)g(to)h(exit)e(is)g(made)g(without)g(an)g(in)m(terv)m(ening)g
(command,)h(Bash)f(do)s(es)h(not)f(prin)m(t)150 1802
y(another)h(w)m(arning,)e(and)h(the)g(stopp)s(ed)g(jobs)g(are)g
(terminated.)150 2063 y Fr(7.2)68 b(Job)45 b(Con)l(trol)h(Builtins)150
2308 y Fs(bg)870 2443 y(bg)h([)p Fj(jobspec)11 b Fs(])630
2578 y Ft(Resume)28 b(the)g(susp)s(ended)d(job)j Fq(jobsp)s(ec)k
Ft(in)27 b(the)h(bac)m(kground,)h(as)f(if)f(it)g(had)g(b)s(een)g
(started)630 2688 y(with)k(`)p Fs(&)p Ft('.)45 b(If)31
b Fq(jobsp)s(ec)37 b Ft(is)31 b(not)h(supplied,)d(the)j(curren)m(t)g
(job)f(is)g(used.)45 b(The)31 b(return)g(status)630 2797
y(is)h(zero)h(unless)e(it)h(is)g(run)f(when)h(job)g(con)m(trol)h(is)f
(not)h(enabled,)g(or,)g(when)f(run)f(with)g(job)630 2907
y(con)m(trol)37 b(enabled,)h(if)e Fq(jobsp)s(ec)42 b
Ft(w)m(as)37 b(not)h(found)d(or)i Fq(jobsp)s(ec)42 b
Ft(sp)s(eci\014es)36 b(a)h(job)g(that)h(w)m(as)630 3017
y(started)31 b(without)e(job)h(con)m(trol.)150 3177 y
Fs(fg)870 3312 y(fg)47 b([)p Fj(jobspec)11 b Fs(])630
(pro)s(cess)i(that)h(exits.)275 1474 y(If)k(an)h(attempt)h(to)g(exit)f
(Bash)h(is)e(made)h(while)e(jobs)i(are)g(stopp)s(ed,)h(the)f(shell)f
(prin)m(ts)f(a)j(message)150 1583 y(w)m(arning)25 b(that)i(there)f(are)
g(stopp)s(ed)g(jobs.)38 b(The)26 b Fs(jobs)f Ft(command)h(ma)m(y)h
(then)e(b)s(e)h(used)f(to)i(insp)s(ect)e(their)150 1693
y(status.)57 b(If)35 b(a)h(second)g(attempt)g(to)h(exit)e(is)g(made)h
(without)e(an)i(in)m(terv)m(ening)f(command,)h(Bash)g(do)s(es)150
1802 y(not)31 b(prin)m(t)e(another)h(w)m(arning,)g(and)f(the)i(stopp)s
(ed)e(jobs)h(are)h(terminated.)150 2063 y Fr(7.2)68 b(Job)45
b(Con)l(trol)h(Builtins)150 2308 y Fs(bg)870 2443 y(bg)h([)p
Fj(jobspec)11 b Fs(])630 2578 y Ft(Resume)28 b(the)g(susp)s(ended)d
(job)j Fq(jobsp)s(ec)k Ft(in)27 b(the)h(bac)m(kground,)h(as)f(if)f(it)g
(had)g(b)s(een)g(started)630 2688 y(with)k(`)p Fs(&)p
Ft('.)45 b(If)31 b Fq(jobsp)s(ec)37 b Ft(is)31 b(not)h(supplied,)d(the)
j(curren)m(t)g(job)f(is)g(used.)45 b(The)31 b(return)g(status)630
2797 y(is)h(zero)h(unless)e(it)h(is)g(run)f(when)h(job)g(con)m(trol)h
(is)f(not)h(enabled,)g(or,)g(when)f(run)f(with)g(job)630
2907 y(con)m(trol)37 b(enabled,)h(if)e Fq(jobsp)s(ec)42
b Ft(w)m(as)37 b(not)h(found)d(or)i Fq(jobsp)s(ec)42
b Ft(sp)s(eci\014es)36 b(a)h(job)g(that)h(w)m(as)630
3017 y(started)31 b(without)e(job)h(con)m(trol.)150 3177
y Fs(fg)870 3312 y(fg)47 b([)p Fj(jobspec)11 b Fs(])630
3448 y Ft(Resume)43 b(the)g(job)g Fq(jobsp)s(ec)48 b
Ft(in)42 b(the)h(foreground)g(and)f(mak)m(e)j(it)d(the)i(curren)m(t)f
(job.)78 b(If)630 3557 y Fq(jobsp)s(ec)41 b Ft(is)36