mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-07-14 07:30:49 +02:00
minor updates for 5.3-rc1 release
This commit is contained in:
+149
-146
@@ -1,7 +1,7 @@
|
||||
%!PS-Adobe-2.0
|
||||
%%Creator: dvips(k) 2024.1 (TeX Live 2024) Copyright 2024 Radical Eye Software
|
||||
%%Title: bashref.dvi
|
||||
%%CreationDate: Mon Feb 24 21:25:43 2025
|
||||
%%CreationDate: Mon Mar 31 14:31:21 2025
|
||||
%%Pages: 214
|
||||
%%PageOrder: Ascend
|
||||
%%BoundingBox: 0 0 612 792
|
||||
@@ -12,7 +12,7 @@
|
||||
%DVIPSWebPage: (www.radicaleye.com)
|
||||
%DVIPSCommandLine: dvips -D 600 -t letter -o bashref.ps bashref.dvi
|
||||
%DVIPSParameters: dpi=600
|
||||
%DVIPSSource: TeX output 2025.02.24:1625
|
||||
%DVIPSSource: TeX output 2025.03.31:1028
|
||||
%%BeginProcSet: tex.pro 0 0
|
||||
%!
|
||||
/TeXDict 300 dict def TeXDict begin/N{def}def/B{bind def}N/S{exch}N/X{S
|
||||
@@ -8911,115 +8911,117 @@ b(return)f(status)h(is)h(the)f(exit)h(status)g(of)f(the)g(last)h
|
||||
Fu(,)c(or)g(zero)g(if)f(none)g(w)m(as)h(executed.)150
|
||||
2130 y Ft(for)336 b Fu(The)30 b(syn)m(tax)h(of)f(the)h
|
||||
Ft(for)e Fu(command)i(is:)870 2263 y Ft(for)47 b Fj(name)g
|
||||
Ft([)g([in)g([)p Fj(words)f Ft(...)o(])i(])f(;)h(])f(do)g
|
||||
Fj(commands)p Ft(;)e(done)630 2397 y Fu(Expand)31 b Fr(w)m(ords)k
|
||||
Fu(\(see)e(Section)g(3.5)h([Shell)e(Expansions],)g(page)h(24\),)h(and)e
|
||||
(then)g(execute)630 2506 y Fr(commands)41 b Fu(once)d(for)g(eac)m(h)h
|
||||
(w)m(ord)e(in)g(the)h(resultan)m(t)g(list,)j(with)c Fr(name)43
|
||||
b Fu(b)s(ound)35 b(to)k(the)630 2616 y(curren)m(t)44
|
||||
b(w)m(ord.)81 b(If)44 b(`)p Ft(in)30 b Fj(words)p Fu(')42
|
||||
b(is)i(not)h(presen)m(t,)i(the)e Ft(for)e Fu(command)g(executes)j(the)
|
||||
630 2725 y Fr(commands)39 b Fu(once)e(for)f(eac)m(h)h(p)s(ositional)g
|
||||
(parameter)f(that)h(is)f(set,)i(as)e(if)g(`)p Ft(in)30
|
||||
b("$@")p Fu(')36 b(had)630 2835 y(b)s(een)30 b(sp)s(eci\014ed)f(\(see)j
|
||||
(Section)f(3.4.2)h([Sp)s(ecial)f(P)m(arameters],)h(page)f(23\).)630
|
||||
2968 y(The)c(return)f(status)h(is)g(the)h(exit)g(status)f(of)g(the)h
|
||||
(last)g(command)e(that)i(executes.)41 b(If)27 b(there)630
|
||||
3078 y(are)38 b(no)f(items)g(in)g(the)h(expansion)f(of)g
|
||||
Fr(w)m(ords)p Fu(,)i(no)e(commands)g(are)g(executed,)j(and)d(the)630
|
||||
3187 y(return)29 b(status)i(is)f(zero.)630 3320 y(An)g(alternate)i
|
||||
(form)e(of)h(the)f Ft(for)g Fu(command)g(is)g(also)h(supp)s(orted:)870
|
||||
3454 y Ft(for)47 b(\(\()g Fj(expr1)f Ft(;)i Fj(expr2)e
|
||||
Ft(;)i Fj(expr3)e Ft(\)\))h(;)h(do)f Fj(commands)e Ft(;)j(done)630
|
||||
3587 y Fu(First,)28 b(ev)-5 b(aluate)27 b(the)g(arithmetic)g
|
||||
(expression)f Fr(expr1)33 b Fu(according)27 b(to)g(the)f(rules)g
|
||||
(describ)s(ed)630 3696 y(b)s(elo)m(w)i(\(see)g(Section)g(6.5)g([Shell)g
|
||||
(Arithmetic],)h(page)f(107\).)41 b(Then,)28 b(rep)s(eatedly)f(ev)-5
|
||||
b(aluate)630 3806 y(the)41 b(arithmetic)g(expression)g
|
||||
Ft([)g([in)g Fj(words)f Ft(...)o(])i(;)f(])h(do)f Fj(commands)p
|
||||
Ft(;)e(done)630 2397 y Fu(Expand)31 b Fr(w)m(ords)k Fu(\(see)e(Section)
|
||||
g(3.5)h([Shell)e(Expansions],)g(page)h(24\),)h(and)e(then)g(execute)630
|
||||
2506 y Fr(commands)41 b Fu(once)d(for)g(eac)m(h)h(w)m(ord)e(in)g(the)h
|
||||
(resultan)m(t)g(list,)j(with)c Fr(name)43 b Fu(b)s(ound)35
|
||||
b(to)k(the)630 2616 y(curren)m(t)44 b(w)m(ord.)81 b(If)44
|
||||
b(`)p Ft(in)30 b Fj(words)p Fu(')42 b(is)i(not)h(presen)m(t,)i(the)e
|
||||
Ft(for)e Fu(command)g(executes)j(the)630 2725 y Fr(commands)39
|
||||
b Fu(once)e(for)f(eac)m(h)h(p)s(ositional)g(parameter)f(that)h(is)f
|
||||
(set,)i(as)e(if)g(`)p Ft(in)30 b("$@")p Fu(')36 b(had)630
|
||||
2835 y(b)s(een)30 b(sp)s(eci\014ed)f(\(see)j(Section)f(3.4.2)h([Sp)s
|
||||
(ecial)f(P)m(arameters],)h(page)f(23\).)630 2968 y(The)c(return)f
|
||||
(status)h(is)g(the)h(exit)g(status)f(of)g(the)h(last)g(command)e(that)i
|
||||
(executes.)41 b(If)27 b(there)630 3078 y(are)38 b(no)f(items)g(in)g
|
||||
(the)h(expansion)f(of)g Fr(w)m(ords)p Fu(,)i(no)e(commands)g(are)g
|
||||
(executed,)j(and)d(the)630 3187 y(return)29 b(status)i(is)f(zero.)630
|
||||
3320 y(There)45 b(is)g(an)g(alternate)i(form)e(of)h(the)f
|
||||
Ft(for)g Fu(command)g(whic)m(h)g(is)g(similar)h(to)g(the)f(C)630
|
||||
3430 y(language:)870 3563 y Ft(for)i(\(\()g Fj(expr1)f
|
||||
Ft(;)i Fj(expr2)e Ft(;)i Fj(expr3)e Ft(\)\))h([;])g(do)g
|
||||
Fj(commands)f Ft(;)h(done)630 3696 y Fu(First,)28 b(ev)-5
|
||||
b(aluate)27 b(the)g(arithmetic)g(expression)f Fr(expr1)33
|
||||
b Fu(according)27 b(to)g(the)f(rules)g(describ)s(ed)630
|
||||
3806 y(b)s(elo)m(w)i(\(see)g(Section)g(6.5)g([Shell)g(Arithmetic],)h
|
||||
(page)f(107\).)41 b(Then,)28 b(rep)s(eatedly)f(ev)-5
|
||||
b(aluate)630 3916 y(the)41 b(arithmetic)g(expression)g
|
||||
Fr(expr2)47 b Fu(un)m(til)41 b(it)g(ev)-5 b(aluates)42
|
||||
b(to)g(zero.)71 b(Eac)m(h)42 b(time)f Fr(expr2)630 3916
|
||||
b(to)g(zero.)71 b(Eac)m(h)42 b(time)f Fr(expr2)630 4025
|
||||
y Fu(ev)-5 b(aluates)35 b(to)g(a)f(non-zero)g(v)-5 b(alue,)35
|
||||
b(execute)g Fr(commands)i Fu(and)c(ev)-5 b(aluate)36
|
||||
b(the)e(arithmetic)630 4025 y(expression)g Fr(expr3)p
|
||||
b(the)e(arithmetic)630 4135 y(expression)g Fr(expr3)p
|
||||
Fu(.)50 b(If)34 b(an)m(y)g(expression)f(is)h(omitted,)i(it)e(b)s(eha)m
|
||||
(v)m(es)h(as)f(if)g(it)g(ev)-5 b(aluates)35 b(to)630
|
||||
4135 y(1.)49 b(The)32 b(return)g(v)-5 b(alue)33 b(is)g(the)g(exit)h
|
||||
4244 y(1.)49 b(The)32 b(return)g(v)-5 b(alue)33 b(is)g(the)g(exit)h
|
||||
(status)f(of)g(the)g(last)h(command)f(in)f Fr(commands)k
|
||||
Fu(that)630 4244 y(is)30 b(executed,)i(or)e(non-zero)h(if)g(an)m(y)f
|
||||
Fu(that)630 4354 y(is)30 b(executed,)i(or)e(non-zero)h(if)g(an)m(y)f
|
||||
(of)h(the)f(expressions)g(is)h(in)m(v)-5 b(alid.)275
|
||||
4401 y(Use)31 b(the)h Ft(break)e Fu(and)h Ft(continue)e
|
||||
4511 y(Use)31 b(the)h Ft(break)e Fu(and)h Ft(continue)e
|
||||
Fu(builtins)i(\(see)h(Section)h(4.1)f([Bourne)g(Shell)f(Builtins],)i
|
||||
(page)f(52\))150 4511 y(to)f(con)m(trol)h(lo)s(op)e(execution.)150
|
||||
4707 y Fk(3.2.5.2)63 b(Conditional)42 b(Constructs)150
|
||||
4878 y Ft(if)384 b Fu(The)30 b(syn)m(tax)h(of)f(the)h
|
||||
Ft(if)f Fu(command)g(is:)870 5011 y Ft(if)47 b Fj(test-commands)p
|
||||
Ft(;)d(then)965 5121 y Fj(consequent-commands)p Ft(;)870
|
||||
5230 y([elif)i Fj(more-test-commands)p Ft(;)d(then)965
|
||||
5340 y Fj(more-consequents)p Ft(;])p eop end
|
||||
(page)f(52\))150 4620 y(to)f(con)m(trol)h(lo)s(op)e(execution.)150
|
||||
4817 y Fk(3.2.5.2)63 b(Conditional)42 b(Constructs)150
|
||||
4988 y Ft(if)384 b Fu(The)30 b(syn)m(tax)h(of)f(the)h
|
||||
Ft(if)f Fu(command)g(is:)870 5121 y Ft(if)47 b Fj(test-commands)p
|
||||
Ft(;)d(then)965 5230 y Fj(consequent-commands)p Ft(;)870
|
||||
5340 y([elif)i Fj(more-test-commands)p Ft(;)d(then)p
|
||||
eop end
|
||||
%%Page: 13 19
|
||||
TeXDict begin 13 18 bop 150 -116 a Fu(Chapter)30 b(3:)41
|
||||
b(Basic)32 b(Shell)e(F)-8 b(eatures)2246 b(13)870 299
|
||||
y Ft([else)46 b Fj(alternate-consequents)p Ft(;])870
|
||||
408 y(fi)630 555 y Fu(The)53 b Fr(test-commands)58 b
|
||||
Fu(list)c(is)g(executed,)60 b(and)53 b(if)g(its)h(return)e(status)i(is)
|
||||
f(zero,)61 b(the)630 664 y Fr(consequen)m(t-commands)44
|
||||
b Fu(list)d(is)f(executed.)70 b(If)40 b Fr(test-commands)k
|
||||
Fu(returns)39 b(a)h(non-zero)630 774 y(status,)45 b(eac)m(h)e
|
||||
Ft(elif)d Fu(list)i(is)g(executed)h(in)e(turn,)j(and)d(if)g(its)h(exit)
|
||||
h(status)f(is)f(zero,)46 b(the)630 883 y(corresp)s(onding)37
|
||||
b Fr(more-consequen)m(ts)42 b Fu(is)c(executed)g(and)f(the)h(command)g
|
||||
(completes.)63 b(If)630 993 y(`)p Ft(else)29 b Fj
|
||||
b(Basic)32 b(Shell)e(F)-8 b(eatures)2246 b(13)965 299
|
||||
y Fj(more-consequents)p Ft(;])870 408 y([else)46 b Fj
|
||||
(alternate-consequents)p Ft(;])870 518 y(fi)630 652 y
|
||||
Fu(The)53 b Fr(test-commands)58 b Fu(list)c(is)g(executed,)60
|
||||
b(and)53 b(if)g(its)h(return)e(status)i(is)f(zero,)61
|
||||
b(the)630 762 y Fr(consequen)m(t-commands)44 b Fu(list)d(is)f
|
||||
(executed.)70 b(If)40 b Fr(test-commands)k Fu(returns)39
|
||||
b(a)h(non-zero)630 871 y(status,)45 b(eac)m(h)e Ft(elif)d
|
||||
Fu(list)i(is)g(executed)h(in)e(turn,)j(and)d(if)g(its)h(exit)h(status)f
|
||||
(is)f(zero,)46 b(the)630 981 y(corresp)s(onding)37 b
|
||||
Fr(more-consequen)m(ts)42 b Fu(is)c(executed)g(and)f(the)h(command)g
|
||||
(completes.)63 b(If)630 1090 y(`)p Ft(else)29 b Fj
|
||||
(alternate-consequents)p Fu(')c(is)30 b(presen)m(t,)h(and)f(the)g
|
||||
(\014nal)g(command)g(in)g(the)g(\014nal)630 1103 y Ft(if)44
|
||||
(\014nal)g(command)g(in)g(the)g(\014nal)630 1200 y Ft(if)44
|
||||
b Fu(or)g Ft(elif)f Fu(clause)i(has)f(a)h(non-zero)g(exit)g(status,)j
|
||||
(then)c Fr(alternate-consequen)m(ts)51 b Fu(is)630 1212
|
||||
(then)c Fr(alternate-consequen)m(ts)51 b Fu(is)630 1310
|
||||
y(executed.)k(The)34 b(return)g(status)h(is)f(the)h(exit)h(status)f(of)
|
||||
g(the)g(last)g(command)g(executed,)630 1322 y(or)30 b(zero)i(if)e(no)g
|
||||
(condition)h(tested)g(true.)150 1504 y Ft(case)288 b
|
||||
g(the)g(last)g(command)g(executed,)630 1419 y(or)30 b(zero)i(if)e(no)g
|
||||
(condition)h(tested)g(true.)150 1577 y Ft(case)288 b
|
||||
Fu(The)30 b(syn)m(tax)h(of)f(the)h Ft(case)e Fu(command)h(is:)870
|
||||
1650 y Ft(case)47 b Fj(word)f Ft(in)1061 1760 y([)h([\(])g
|
||||
1711 y Ft(case)47 b Fj(word)f Ft(in)1061 1821 y([)h([\(])g
|
||||
Fj(pattern)f Ft([|)h Fj(pattern)p Ft(]...)m(\))h Fj(command-list)c
|
||||
Ft(;;]...)870 1870 y(esac)630 2016 y(case)20 b Fu(will)i(selectiv)m
|
||||
Ft(;;]...)870 1931 y(esac)630 2064 y(case)20 b Fu(will)i(selectiv)m
|
||||
(ely)j(execute)e(the)e Fr(command-list)k Fu(corresp)s(onding)20
|
||||
b(to)i(the)g(\014rst)f Fr(pattern)630 2125 y Fu(that)36
|
||||
b(to)i(the)g(\014rst)f Fr(pattern)630 2174 y Fu(that)36
|
||||
b(matc)m(hes)h Fr(w)m(ord)p Fu(,)g(pro)s(ceeding)e(from)g(the)h
|
||||
(\014rst)f(pattern)h(to)g(the)g(last.)57 b(The)35 b(matc)m(h)630
|
||||
2235 y(is)30 b(p)s(erformed)f(according)i(to)h(the)e(rules)g(describ)s
|
||||
2284 y(is)30 b(p)s(erformed)f(according)i(to)h(the)e(rules)g(describ)s
|
||||
(ed)f(b)s(elo)m(w)i(in)f(Section)h(3.5.8.1)i([P)m(attern)630
|
||||
2345 y(Matc)m(hing],)44 b(page)d(39.)70 b(If)40 b(the)g
|
||||
2393 y(Matc)m(hing],)44 b(page)d(39.)70 b(If)40 b(the)g
|
||||
Ft(nocasematch)c Fu(shell)41 b(option)f(\(see)h(the)f(description)g(of)
|
||||
630 2454 y Ft(shopt)34 b Fu(in)h(Section)h(4.3.2)h([The)e(Shopt)f
|
||||
630 2503 y Ft(shopt)34 b Fu(in)h(Section)h(4.3.2)h([The)e(Shopt)f
|
||||
(Builtin],)k(page)e(78\))g(is)g(enabled,)g(the)g(matc)m(h)g(is)630
|
||||
2564 y(p)s(erformed)29 b(without)i(regard)g(to)g(the)g(case)h(of)f
|
||||
2612 y(p)s(erformed)29 b(without)i(regard)g(to)g(the)g(case)h(of)f
|
||||
(alphab)s(etic)g(c)m(haracters.)44 b(The)30 b(`)p Ft(|)p
|
||||
Fu(')h(is)g(used)630 2673 y(to)g(separate)h(m)m(ultiple)f(patterns)g
|
||||
Fu(')h(is)g(used)630 2722 y(to)g(separate)h(m)m(ultiple)f(patterns)g
|
||||
(in)f(a)h(pattern)g(list,)h(and)e(the)g(`)p Ft(\))p Fu(')h(op)s(erator)
|
||||
g(terminates)630 2783 y(the)i(pattern)g(list.)49 b(A)33
|
||||
g(terminates)630 2832 y(the)i(pattern)g(list.)49 b(A)33
|
||||
b(pattern)g(list)h(and)e(an)h(asso)s(ciated)h Fr(command-list)i
|
||||
Fu(is)d(kno)m(wn)f(as)i(a)630 2892 y Fr(clause)p Fu(.)630
|
||||
3039 y(Eac)m(h)e(clause)h(m)m(ust)e(b)s(e)g(terminated)h(with)g(`)p
|
||||
Fu(is)d(kno)m(wn)f(as)i(a)630 2941 y Fr(clause)p Fu(.)630
|
||||
3075 y(Eac)m(h)e(clause)h(m)m(ust)e(b)s(e)g(terminated)h(with)g(`)p
|
||||
Ft(;;)p Fu(',)g(`)p Ft(;&)p Fu(',)g(or)g(`)p Ft(;;&)p
|
||||
Fu('.)44 b(The)31 b Fr(w)m(ord)k Fu(undergo)s(es)630
|
||||
3148 y(tilde)j(expansion,)i(parameter)e(expansion,)i(command)e
|
||||
(substitution,)h(pro)s(cess)e(substi-)630 3258 y(tution,)i(arithmetic)f
|
||||
3185 y(tilde)j(expansion,)i(parameter)e(expansion,)i(command)e
|
||||
(substitution,)h(pro)s(cess)e(substi-)630 3294 y(tution,)i(arithmetic)f
|
||||
(expansion,)h(and)e(quote)g(remo)m(v)-5 b(al)38 b(\(see)g(Section)g
|
||||
(3.5.3)h([Shell)e(P)m(a-)630 3367 y(rameter)d(Expansion],)g(page)g
|
||||
(3.5.3)h([Shell)e(P)m(a-)630 3404 y(rameter)d(Expansion],)g(page)g
|
||||
(27\))h(b)s(efore)e(the)h(shell)g(attempts)g(to)g(matc)m(h)h(the)f
|
||||
(pattern.)630 3477 y(Eac)m(h)g Fr(pattern)f Fu(undergo)s(es)g(tilde)h
|
||||
(pattern.)630 3513 y(Eac)m(h)g Fr(pattern)f Fu(undergo)s(es)g(tilde)h
|
||||
(expansion,)g(parameter)g(expansion,)g(command)f(sub-)630
|
||||
3587 y(stitution,)e(arithmetic)h(expansion,)f(pro)s(cess)e
|
||||
3623 y(stitution,)e(arithmetic)h(expansion,)f(pro)s(cess)e
|
||||
(substitution,)i(and)f(quote)h(remo)m(v)-5 b(al.)630
|
||||
3733 y(There)30 b(ma)m(y)g(b)s(e)f(an)h(arbitrary)g(n)m(um)m(b)s(er)f
|
||||
3757 y(There)30 b(ma)m(y)g(b)s(e)f(an)h(arbitrary)g(n)m(um)m(b)s(er)f
|
||||
(of)h Ft(case)f Fu(clauses,)i(eac)m(h)g(terminated)g(b)m(y)e(a)i(`)p
|
||||
Ft(;;)p Fu(',)630 3842 y(`)p Ft(;&)p Fu(',)c(or)e(`)p
|
||||
Ft(;;)p Fu(',)630 3867 y(`)p Ft(;&)p Fu(',)c(or)e(`)p
|
||||
Ft(;;&)p Fu('.)39 b(The)25 b(\014rst)g(pattern)h(that)g(matc)m(hes)h
|
||||
(determines)e(the)h(command-list)g(that)630 3952 y(is)35
|
||||
(determines)e(the)h(command-list)g(that)630 3976 y(is)35
|
||||
b(executed.)55 b(It's)35 b(a)g(common)g(idiom)g(to)g(use)g(`)p
|
||||
Ft(*)p Fu(')g(as)g(the)g(\014nal)f(pattern)h(to)h(de\014ne)e(the)630
|
||||
4061 y(default)d(case,)g(since)g(that)g(pattern)f(will)h(alw)m(a)m(ys)h
|
||||
(matc)m(h.)630 4208 y(Here)j(is)g(an)g(example)h(using)e
|
||||
4086 y(default)d(case,)g(since)g(that)g(pattern)f(will)h(alw)m(a)m(ys)h
|
||||
(matc)m(h.)630 4220 y(Here)j(is)g(an)g(example)h(using)e
|
||||
Ft(case)g Fu(in)g(a)h(script)g(that)h(could)f(b)s(e)f(used)g(to)h
|
||||
(describ)s(e)g(one)630 4317 y(in)m(teresting)d(feature)f(of)f(an)g
|
||||
(describ)s(e)g(one)630 4329 y(in)m(teresting)d(feature)f(of)f(an)g
|
||||
(animal:)870 4463 y Ft(echo)47 b(-n)g("Enter)f(the)h(name)f(of)i(an)f
|
||||
(animal:)f(")870 4573 y(read)h(ANIMAL)870 4682 y(echo)g(-n)g("The)f
|
||||
($ANIMAL)g(has)h(")870 4792 y(case)g($ANIMAL)e(in)965
|
||||
@@ -9998,26 +10000,25 @@ y(righ)m(t.)275 4053 y(Brace)37 b(expansions)f(ma)m(y)h(b)s(e)f
|
||||
(are)h(not)g(sorted;)150 4163 y(brace)31 b(expansion)f(preserv)m(es)g
|
||||
(left)h(to)h(righ)m(t)e(order.)41 b(F)-8 b(or)31 b(example,)390
|
||||
4313 y Ft(bash$)46 b(echo)h(a{d,c,b}e)390 4423 y(ade)g(ace)g(abe)275
|
||||
4573 y Fu(A)23 b(sequence)g(expression)g(tak)m(es)i(the)e(form)g
|
||||
Ft({)p Fj(x)p Ft(..)p Fj(y)p Ft([..)p Fj(incr)p Ft(]})p
|
||||
Fu(,)e(where)i Fr(x)29 b Fu(and)23 b Fr(y)30 b Fu(are)24
|
||||
b(either)g(in)m(tegers)150 4682 y(or)34 b(letters,)i(and)d
|
||||
Fr(incr)p Fu(,)h(an)g(optional)g(incremen)m(t,)i(is)d(an)h(in)m(teger.)
|
||||
52 b(When)33 b(in)m(tegers)i(are)f(supplied,)g(the)150
|
||||
4792 y(expression)40 b(expands)e(to)j(eac)m(h)g(n)m(um)m(b)s(er)d(b)s
|
||||
(et)m(w)m(een)j Fr(x)46 b Fu(and)39 b Fr(y)p Fu(,)j(inclusiv)m(e.)70
|
||||
b(If)39 b(either)h Fr(x)46 b Fu(or)40 b Fr(y)47 b Fu(b)s(egins)150
|
||||
4902 y(with)c(a)g(zero,)k(eac)m(h)d(generated)g(term)f(will)g(con)m
|
||||
(tain)h(the)f(same)g(n)m(um)m(b)s(er)f(of)h(digits,)k(zero-padding)150
|
||||
5011 y(where)e(necessary)-8 b(.)86 b(When)45 b(letters)i(are)f
|
||||
(supplied,)i(the)d(expression)g(expands)g(to)h(eac)m(h)g(c)m(haracter)
|
||||
150 5121 y(lexicographically)37 b(b)s(et)m(w)m(een)e
|
||||
Fr(x)40 b Fu(and)34 b Fr(y)p Fu(,)i(inclusiv)m(e,)g(using)e(the)g(C)g
|
||||
(lo)s(cale.)54 b(Note)36 b(that)f(b)s(oth)e Fr(x)41 b
|
||||
Fu(and)33 b Fr(y)150 5230 y Fu(m)m(ust)e(b)s(e)f(of)h(the)g(same)g(t)m
|
||||
(yp)s(e)g(\(in)m(teger)h(or)f(letter\).)43 b(When)31
|
||||
b(the)g(incremen)m(t)g(is)g(supplied,)f(it)h(is)g(used)f(as)150
|
||||
5340 y(the)h(di\013erence)f(b)s(et)m(w)m(een)h(eac)m(h)h(term.)41
|
||||
4573 y Fu(A)30 b(sequence)h(expression)g(tak)m(es)h(the)f(form)f
|
||||
Fj(x)p Ft(..)p Fj(y)p Ft([..)p Fj(incr)p Ft(])p Fu(,)d(where)j
|
||||
Fr(x)37 b Fu(and)30 b Fr(y)39 b Fu(are)31 b(either)g(in)m(tegers)150
|
||||
4682 y(or)j(letters,)i(and)d Fr(incr)p Fu(,)h(an)g(optional)g(incremen)
|
||||
m(t,)i(is)d(an)h(in)m(teger.)52 b(When)33 b(in)m(tegers)i(are)f
|
||||
(supplied,)g(the)150 4792 y(expression)40 b(expands)e(to)j(eac)m(h)g(n)
|
||||
m(um)m(b)s(er)d(b)s(et)m(w)m(een)j Fr(x)46 b Fu(and)39
|
||||
b Fr(y)p Fu(,)j(inclusiv)m(e.)70 b(If)39 b(either)h Fr(x)46
|
||||
b Fu(or)40 b Fr(y)47 b Fu(b)s(egins)150 4902 y(with)c(a)g(zero,)k(eac)m
|
||||
(h)d(generated)g(term)f(will)g(con)m(tain)h(the)f(same)g(n)m(um)m(b)s
|
||||
(er)f(of)h(digits,)k(zero-padding)150 5011 y(where)e(necessary)-8
|
||||
b(.)86 b(When)45 b(letters)i(are)f(supplied,)i(the)d(expression)g
|
||||
(expands)g(to)h(eac)m(h)g(c)m(haracter)150 5121 y(lexicographically)37
|
||||
b(b)s(et)m(w)m(een)e Fr(x)40 b Fu(and)34 b Fr(y)p Fu(,)i(inclusiv)m(e,)
|
||||
g(using)e(the)g(C)g(lo)s(cale.)54 b(Note)36 b(that)f(b)s(oth)e
|
||||
Fr(x)41 b Fu(and)33 b Fr(y)150 5230 y Fu(m)m(ust)e(b)s(e)f(of)h(the)g
|
||||
(same)g(t)m(yp)s(e)g(\(in)m(teger)h(or)f(letter\).)43
|
||||
b(When)31 b(the)g(incremen)m(t)g(is)g(supplied,)f(it)h(is)g(used)f(as)
|
||||
150 5340 y(the)h(di\013erence)f(b)s(et)m(w)m(een)h(eac)m(h)h(term.)41
|
||||
b(The)30 b(default)g(incremen)m(t)h(is)g(1)f(or)h(-1)g(as)f
|
||||
(appropriate.)p eop end
|
||||
%%Page: 26 32
|
||||
@@ -17337,90 +17338,92 @@ y(the)f(argumen)m(ts)f(as)h(k)m(ey)g(sequences)g(to)g(bind.)705
|
||||
(un)m(til)f(script)f(execution)i(completes.)p eop end
|
||||
%%Page: 125 131
|
||||
TeXDict begin 125 130 bop 3614 -116 a Fu(125)150 299
|
||||
y Fp(7)80 b(Job)54 b(Con)l(trol)150 551 y Fu(This)25
|
||||
y Fp(7)80 b(Job)54 b(Con)l(trol)150 511 y Fu(This)25
|
||||
b(c)m(hapter)i(discusses)f(what)g(job)f(con)m(trol)j(is,)f(ho)m(w)f(it)
|
||||
h(w)m(orks,)g(and)f(ho)m(w)g(Bash)g(allo)m(ws)h(y)m(ou)g(to)g(access)
|
||||
150 660 y(its)k(facilities.)150 910 y Fs(7.1)68 b(Job)45
|
||||
b(Con)l(trol)h(Basics)150 1069 y Fu(Job)27 b(con)m(trol)i(refers)e(to)h
|
||||
150 620 y(its)k(facilities.)150 852 y Fs(7.1)68 b(Job)45
|
||||
b(Con)l(trol)h(Basics)150 1012 y Fu(Job)27 b(con)m(trol)i(refers)e(to)h
|
||||
(the)g(abilit)m(y)h(to)f(selectiv)m(ely)j(stop)c(\(susp)s(end\))f(the)i
|
||||
(execution)h(of)e(pro)s(cesses)h(and)150 1179 y(con)m(tin)m(ue)38
|
||||
(execution)h(of)e(pro)s(cesses)h(and)150 1121 y(con)m(tin)m(ue)38
|
||||
b(\(resume\))g(their)f(execution)h(at)g(a)g(later)g(p)s(oin)m(t.)61
|
||||
b(A)37 b(user)g(t)m(ypically)i(emplo)m(ys)f(this)f(facilit)m(y)150
|
||||
1289 y(via)27 b(an)e(in)m(teractiv)m(e)k(in)m(terface)f(supplied)d
|
||||
1231 y(via)27 b(an)e(in)m(teractiv)m(e)k(in)m(terface)f(supplied)d
|
||||
(join)m(tly)h(b)m(y)g(the)h(op)s(erating)f(system)g(k)m(ernel's)h
|
||||
(terminal)f(driv)m(er)150 1398 y(and)k(Bash.)275 1539
|
||||
(terminal)f(driv)m(er)150 1341 y(and)k(Bash.)275 1471
|
||||
y(The)23 b(shell)i(asso)s(ciates)h(a)f Fr(job)h Fu(with)e(eac)m(h)i
|
||||
(pip)s(eline.)38 b(It)25 b(k)m(eeps)f(a)h(table)h(of)e(curren)m(tly)h
|
||||
(executing)g(jobs,)150 1648 y(whic)m(h)37 b(the)h Ft(jobs)e
|
||||
(executing)g(jobs,)150 1580 y(whic)m(h)37 b(the)h Ft(jobs)e
|
||||
Fu(command)i(will)f(displa)m(y)-8 b(.)63 b(Eac)m(h)38
|
||||
b(job)g(has)f(a)h Fr(job)f(n)m(um)m(b)s(er)p Fu(,)h(whic)m(h)f
|
||||
Ft(jobs)g Fu(displa)m(ys)150 1758 y(b)s(et)m(w)m(een)25
|
||||
Ft(jobs)g Fu(displa)m(ys)150 1690 y(b)s(et)m(w)m(een)25
|
||||
b(brac)m(k)m(ets.)40 b(Job)25 b(n)m(um)m(b)s(ers)e(start)i(at)g(1.)39
|
||||
b(When)24 b(Bash)h(starts)g(a)g(job)f(async)m(hronously)-8
|
||||
b(,)26 b(it)f(prin)m(ts)150 1867 y(a)31 b(line)f(that)h(lo)s(oks)g(lik)
|
||||
m(e:)390 2008 y Ft([1])47 b(25647)150 2148 y Fu(indicating)34
|
||||
b(,)26 b(it)f(prin)m(ts)150 1799 y(a)31 b(line)f(that)h(lo)s(oks)g(lik)
|
||||
m(e:)390 1929 y Ft([1])47 b(25647)150 2059 y Fu(indicating)34
|
||||
b(that)g(this)f(job)g(is)g(job)g(n)m(um)m(b)s(er)f(1)i(and)f(that)g
|
||||
(the)h(pro)s(cess)f Fm(id)g Fu(of)g(the)h(last)g(pro)s(cess)f(in)g(the)
|
||||
150 2258 y(pip)s(eline)42 b(asso)s(ciated)i(with)e(this)g(job)g(is)h
|
||||
150 2169 y(pip)s(eline)42 b(asso)s(ciated)i(with)e(this)g(job)g(is)h
|
||||
(25647.)78 b(All)43 b(of)g(the)g(pro)s(cesses)f(in)g(a)h(single)g(pip)s
|
||||
(eline)f(are)150 2367 y(mem)m(b)s(ers)30 b(of)g(the)h(same)f(job.)41
|
||||
(eline)f(are)150 2279 y(mem)m(b)s(ers)30 b(of)g(the)h(same)f(job.)41
|
||||
b(Bash)30 b(uses)g(the)h Fr(job)h Fu(abstraction)f(as)g(the)g(basis)f
|
||||
(for)g(job)g(con)m(trol.)275 2508 y(T)-8 b(o)37 b(facilitate)j(the)d
|
||||
(for)g(job)g(con)m(trol.)275 2409 y(T)-8 b(o)37 b(facilitate)j(the)d
|
||||
(implemen)m(tation)i(of)e(the)g(user)g(in)m(terface)h(to)g(job)f(con)m
|
||||
(trol,)j(eac)m(h)f(pro)s(cess)d(has)150 2617 y(a)h Fr(pro)s(cess)e
|
||||
(trol,)j(eac)m(h)f(pro)s(cess)d(has)150 2518 y(a)h Fr(pro)s(cess)e
|
||||
(group)h Fm(id)p Fu(,)i(and)d(the)i(op)s(erating)f(system)h(main)m
|
||||
(tains)g(the)f(notion)h(of)f(a)g(curren)m(t)g(terminal)150
|
||||
2727 y(pro)s(cess)28 b(group)g Fm(id)p Fu(.)41 b(Pro)s(cesses)28
|
||||
b(that)i(ha)m(v)m(e)f(the)g(same)g(pro)s(cess)g(group)f(ID)g(are)h
|
||||
(said)g(to)g(b)s(e)f(part)h(of)g(the)150 2837 y(same)38
|
||||
b Fr(pro)s(cess)f(group)p Fu(.)62 b(Mem)m(b)s(ers)38
|
||||
b(of)f(the)h(foreground)f(pro)s(cess)g(group)g(\(pro)s(cesses)h(whose)f
|
||||
(pro)s(cess)150 2946 y(group)28 b Fm(id)h Fu(is)g(equal)h(to)f(the)g
|
||||
(curren)m(t)g(terminal)g(pro)s(cess)g(group)f Fm(id)p
|
||||
Fu(\))h(receiv)m(e)i(k)m(eyb)s(oard-generated)f(sig-)150
|
||||
3056 y(nals)j(suc)m(h)g(as)g Ft(SIGINT)p Fu(.)47 b(Pro)s(cesses)33
|
||||
b(in)g(the)h(foreground)e(pro)s(cess)g(group)h(are)g(said)g(to)h(b)s(e)
|
||||
f(foreground)150 3165 y(pro)s(cesses.)50 b(Bac)m(kground)34
|
||||
b(pro)s(cesses)f(are)h(those)f(whose)h(pro)s(cess)f(group)f
|
||||
Fm(id)i Fu(di\013ers)f(from)g(the)g(termi-)150 3275 y(nal's;)c(suc)m(h)
|
||||
e(pro)s(cesses)g(are)g(imm)m(une)g(to)h(k)m(eyb)s(oard-generated)h
|
||||
(signals.)40 b(Only)27 b(foreground)f(pro)s(cesses)150
|
||||
3384 y(are)h(allo)m(w)m(ed)h(to)f(read)f(from)f(or,)j(if)e(the)g(user)g
|
||||
(so)g(sp)s(eci\014es)g(with)g Ft(stty)j(tostop)p Fu(,)c(write)i(to)g
|
||||
(the)f(terminal.)150 3494 y(Bac)m(kground)33 b(pro)s(cesses)g(whic)m(h)
|
||||
g(attempt)g(to)h(read)f(from)f(\(write)h(to)h(when)e
|
||||
Ft(tostop)f Fu(is)i(in)f(e\013ect\))j(the)150 3604 y(terminal)29
|
||||
b(are)f(sen)m(t)h(a)g Ft(SIGTTIN)d Fu(\()p Ft(SIGTTOU)p
|
||||
Fu(\))h(signal)i(b)m(y)f(the)h(k)m(ernel's)g(terminal)f(driv)m(er,)h
|
||||
(whic)m(h,)g(unless)150 3713 y(caugh)m(t,)j(susp)s(ends)c(the)i(pro)s
|
||||
(cess.)275 3854 y(If)k(the)i(op)s(erating)g(system)f(on)h(whic)m(h)f
|
||||
(Bash)g(is)h(running)d(supp)s(orts)h(job)h(con)m(trol,)j(Bash)e(con)m
|
||||
(tains)150 3963 y(facilities)30 b(to)f(use)f(it.)40 b(T)m(yping)28
|
||||
2628 y(pro)s(cess)23 b(group)g Fm(id)p Fu(.)39 b(This)22
|
||||
b(terminal)i(pro)s(cess)g(group)f Fm(id)g Fu(is)h(asso)s(ciated)h(with)
|
||||
e(the)h Fr(con)m(trolling)h(terminal)p Fu(.)275 2758
|
||||
y(Pro)s(cesses)32 b(that)g(ha)m(v)m(e)i(the)e(same)g(pro)s(cess)g
|
||||
(group)g(ID)g(are)g(said)g(to)h(b)s(e)f(part)f(of)i(the)f(same)g
|
||||
Fr(pro)s(cess)150 2868 y(group)p Fu(.)38 b(Mem)m(b)s(ers)25
|
||||
b(of)h(the)f(foreground)f(pro)s(cess)h(group)g(\(pro)s(cesses)g(whose)g
|
||||
(pro)s(cess)f(group)h Fm(id)g Fu(is)g(equal)150 2977
|
||||
y(to)e(the)f(curren)m(t)f(terminal)i(pro)s(cess)e(group)h
|
||||
Fm(id)p Fu(\))g(receiv)m(e)i(k)m(eyb)s(oard-generated)f(signals)g(suc)m
|
||||
(h)e(as)h Ft(SIGINT)p Fu(.)150 3087 y(Pro)s(cesses)28
|
||||
b(in)f(the)g(foreground)g(pro)s(cess)g(group)g(are)h(said)f(to)h(b)s(e)
|
||||
f(foreground)g(pro)s(cesses.)39 b(Bac)m(kground)150 3196
|
||||
y(pro)s(cesses)i(are)h(those)g(whose)g(pro)s(cess)f(group)g
|
||||
Fm(id)h Fu(di\013ers)f(from)g(the)h(con)m(trolling)h(terminal's;)48
|
||||
b(suc)m(h)150 3306 y(pro)s(cesses)24 b(are)g(imm)m(une)g(to)g(k)m(eyb)s
|
||||
(oard-generated)h(signals.)40 b(Only)23 b(foreground)g(pro)s(cesses)h
|
||||
(are)g(allo)m(w)m(ed)150 3416 y(to)k(read)g(from)f(or,)h(if)f(the)h
|
||||
(user)f(so)g(sp)s(eci\014es)g(with)h Ft(stty)h(tostop)p
|
||||
Fu(,)d(write)i(to)g(the)g(con)m(trolling)h(terminal.)150
|
||||
3525 y(The)34 b(system)h(sends)f(a)h Ft(SIGTTIN)d Fu(\()p
|
||||
Ft(SIGTTOU)p Fu(\))i(signal)h(to)g(bac)m(kground)g(pro)s(cesses)f(whic)
|
||||
m(h)g(attempt)i(to)150 3635 y(read)31 b(from)f(\(write)h(to)g(when)f
|
||||
Ft(tostop)f Fu(is)i(in)f(e\013ect\))i(the)f(terminal,)h(whic)m(h,)e
|
||||
(unless)g(caugh)m(t,)i(susp)s(ends)150 3744 y(the)f(pro)s(cess.)275
|
||||
3874 y(If)j(the)i(op)s(erating)g(system)f(on)h(whic)m(h)f(Bash)g(is)h
|
||||
(running)d(supp)s(orts)h(job)h(con)m(trol,)j(Bash)e(con)m(tains)150
|
||||
3984 y(facilities)30 b(to)f(use)f(it.)40 b(T)m(yping)28
|
||||
b(the)g Fr(susp)s(end)h Fu(c)m(haracter)h(\(t)m(ypically)g(`)p
|
||||
Ft(^Z)p Fu(',)f(Con)m(trol-Z\))g(while)f(a)g(pro)s(cess)150
|
||||
4073 y(is)40 b(running)e(stops)i(that)g(pro)s(cess)f(and)g(returns)g
|
||||
4094 y(is)40 b(running)e(stops)i(that)g(pro)s(cess)f(and)g(returns)g
|
||||
(con)m(trol)i(to)g(Bash.)69 b(T)m(yping)39 b(the)h Fr(dela)m(y)m(ed)h
|
||||
(susp)s(end)150 4182 y Fu(c)m(haracter)d(\(t)m(ypically)g(`)p
|
||||
(susp)s(end)150 4203 y Fu(c)m(haracter)d(\(t)m(ypically)g(`)p
|
||||
Ft(^Y)p Fu(',)f(Con)m(trol-Y\))h(causes)e(the)g(pro)s(cess)f(to)i(stop)
|
||||
f(when)f(it)h(attempts)h(to)g(read)150 4292 y(input)28
|
||||
f(when)f(it)h(attempts)h(to)g(read)150 4313 y(input)28
|
||||
b(from)g(the)i(terminal,)g(and)e(returns)g(con)m(trol)i(to)g(Bash.)40
|
||||
b(The)28 b(user)h(then)f(manipulates)h(the)h(state)150
|
||||
4402 y(of)36 b(this)f(job,)i(using)e(the)g Ft(bg)g Fu(command)h(to)g
|
||||
4422 y(of)36 b(this)f(job,)i(using)e(the)g Ft(bg)g Fu(command)h(to)g
|
||||
(con)m(tin)m(ue)h(it)f(in)f(the)h(bac)m(kground,)g(the)g
|
||||
Ft(fg)f Fu(command)g(to)150 4511 y(con)m(tin)m(ue)30
|
||||
Ft(fg)f Fu(command)g(to)150 4532 y(con)m(tin)m(ue)30
|
||||
b(it)f(in)f(the)g(foreground,)g(or)h(the)f Ft(kill)g
|
||||
Fu(command)g(to)h(kill)g(it.)41 b(The)28 b(susp)s(end)d(c)m(haracter)30
|
||||
b(tak)m(es)150 4621 y(e\013ect)g(immediately)-8 b(,)31
|
||||
b(tak)m(es)150 4641 y(e\013ect)g(immediately)-8 b(,)31
|
||||
b(and)d(has)g(the)h(additional)h(side)e(e\013ect)i(of)f(discarding)f
|
||||
(an)m(y)h(p)s(ending)e(output)i(and)150 4730 y(t)m(yp)s(eahead.)42
|
||||
(an)m(y)h(p)s(ending)e(output)i(and)150 4751 y(t)m(yp)s(eahead.)42
|
||||
b(If)30 b(y)m(ou)h(w)m(an)m(t)g(to)h(force)f(a)g(bac)m(kground)f(pro)s
|
||||
(cess)h(to)g(stop,)g(or)g(stop)f(a)h(pro)s(cess)f(that's)i(not)150
|
||||
4840 y(asso)s(ciated)g(with)e(y)m(our)g(terminal)h(session,)g(send)e
|
||||
4861 y(asso)s(ciated)g(with)e(y)m(our)g(terminal)h(session,)g(send)e
|
||||
(it)i(the)g Ft(SIGSTOP)d Fu(signal)j(using)f Ft(kill)p
|
||||
Fu(.)275 4980 y(There)i(are)g(a)h(n)m(um)m(b)s(er)e(of)i(w)m(a)m(ys)g
|
||||
Fu(.)275 4991 y(There)i(are)g(a)h(n)m(um)m(b)s(er)e(of)i(w)m(a)m(ys)g
|
||||
(to)h(refer)e(to)h(a)g(job)f(in)g(the)h(shell.)47 b(The)32
|
||||
b(`)p Ft(\045)p Fu(')h(c)m(haracter)h(in)m(tro)s(duces)150
|
||||
5090 y(a)d Fr(job)f(sp)s(eci\014cation)h Fu(\(jobsp)s(ec\).)275
|
||||
5100 y(a)d Fr(job)f(sp)s(eci\014cation)h Fu(\(jobsp)s(ec\).)275
|
||||
5230 y(Job)i(n)m(um)m(b)s(er)f Ft(n)h Fu(ma)m(y)h(b)s(e)e(referred)h
|
||||
(to)h(as)g(`)p Ft(\045n)p Fu('.)49 b(A)34 b(job)f(ma)m(y)h(also)g(b)s
|
||||
(e)f(referred)f(to)i(using)f(a)h(pre\014x)150 5340 y(of)i(the)g(name)g
|
||||
|
||||
Reference in New Issue
Block a user