mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-07-01 17:39:56 +02:00
fix for race condition with process creation and terminal process group; changes to printf builtin for multibyte characters
This commit is contained in:
+146
-137
@@ -1,7 +1,7 @@
|
||||
%!PS-Adobe-2.0
|
||||
%%Creator: dvips(k) 2021.1 Copyright 2021 Radical Eye Software
|
||||
%%Title: bashref.dvi
|
||||
%%CreationDate: Wed Aug 16 14:12:07 2023
|
||||
%%CreationDate: Sun Sep 10 21:14:23 2023
|
||||
%%Pages: 203
|
||||
%%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 2023.08.16:1012
|
||||
%DVIPSSource: TeX output 2023.09.10:1714
|
||||
%%BeginProcSet: tex.pro 0 0
|
||||
%!
|
||||
/TeXDict 300 dict def TeXDict begin/N{def}def/B{bind def}N/S{exch}N/X{S
|
||||
@@ -7630,9 +7630,9 @@ b(oundation)p 150 5141 3600 17 v eop end
|
||||
%%Page: 2 2
|
||||
TeXDict begin 2 1 bop 150 4279 a Fu(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 4389 y(5.3,)c(15)f(August)f
|
||||
(the)h(Bash)f(shell)h(\(v)m(ersion)150 4389 y(5.3,)c(31)f(August)f
|
||||
(2023\).)150 4523 y(This)e(is)g(Edition)h(5.3,)h(last)f(up)s(dated)e
|
||||
(15)i(August)f(2023,)j(of)e Fr(The)f(GNU)h(Bash)f(Reference)h(Man)m
|
||||
(31)i(August)f(2023,)j(of)e Fr(The)f(GNU)h(Bash)f(Reference)h(Man)m
|
||||
(ual)p Fu(,)h(for)150 4633 y Ft(Bash)p Fu(,)f(V)-8 b(ersion)31
|
||||
b(5.3.)150 4767 y(Cop)m(yrigh)m(t)602 4764 y(c)577 4767
|
||||
y Fq(\015)f Fu(1988{2023)35 b(F)-8 b(ree)31 b(Soft)m(w)m(are)h(F)-8
|
||||
@@ -15463,123 +15463,130 @@ Fr(optname)47 b Fu(is)41 b(enabled.)73 b(The)41 b(list)h(of)f(options)h
|
||||
(app)s(ears)e(in)630 518 y(the)33 b(description)h(of)f(the)g
|
||||
Ft(-o)g Fu(option)g(to)h(the)g Ft(set)e Fu(builtin)h(\(see)h(Section)g
|
||||
(4.3.1)h([The)e(Set)630 628 y(Builtin],)e(page)g(69\).)150
|
||||
783 y Ft(-v)f Fj(varname)630 892 y Fu(T)-8 b(rue)30 b(if)g(the)h(shell)
|
||||
f(v)-5 b(ariable)32 b Fr(v)-5 b(arname)35 b Fu(is)30
|
||||
b(set)h(\(has)g(b)s(een)e(assigned)i(a)g(v)-5 b(alue\).)150
|
||||
1047 y Ft(-R)30 b Fj(varname)630 1157 y Fu(T)-8 b(rue)30
|
||||
b(if)g(the)h(shell)f(v)-5 b(ariable)32 b Fr(v)-5 b(arname)35
|
||||
b Fu(is)30 b(set)h(and)f(is)h(a)f(name)h(reference.)150
|
||||
1312 y Ft(-z)f Fj(string)66 b Fu(T)-8 b(rue)30 b(if)g(the)h(length)g
|
||||
(of)f Fr(string)38 b Fu(is)31 b(zero.)150 1467 y Ft(-n)f
|
||||
Fj(string)150 1576 y(string)192 b Fu(T)-8 b(rue)30 b(if)g(the)h(length)
|
||||
g(of)f Fr(string)38 b Fu(is)31 b(non-zero.)150 1731 y
|
||||
Fj(string1)d Ft(==)i Fj(string2)150 1841 y(string1)e
|
||||
Ft(=)i Fj(string2)630 1951 y Fu(T)-8 b(rue)43 b(if)h(the)g(strings)g
|
||||
772 y Ft(-v)f Fj(varname)630 882 y Fu(T)-8 b(rue)24 b(if)h(the)g(shell)
|
||||
g(v)-5 b(ariable)26 b Fr(v)-5 b(arname)30 b Fu(is)25
|
||||
b(set)g(\(has)g(b)s(een)f(assigned)h(a)h(v)-5 b(alue\).)39
|
||||
b(If)25 b Fr(v)-5 b(arname)630 991 y Fu(is)37 b(an)g(indexed)g(arra)m
|
||||
(y)h(v)-5 b(ariable)38 b(name)f(subscripted)f(b)m(y)h(`)p
|
||||
Ft(@)p Fu(')g(or)h(`)p Ft(*)p Fu(',)h(this)e(returns)f(true)630
|
||||
1101 y(if)g(the)f(arra)m(y)h(has)g(an)m(y)f(set)i(elemen)m(ts.)57
|
||||
b(If)35 b Fr(v)-5 b(arname)41 b Fu(is)35 b(an)h(asso)s(ciativ)m(e)i
|
||||
(arra)m(y)e(v)-5 b(ariable)630 1210 y(name)32 b(subscripted)e(b)m(y)h
|
||||
(`)p Ft(@)p Fu(')h(or)g(`)p Ft(*)p Fu(',)g(this)f(returns)g(true)g(if)h
|
||||
(an)f(elemen)m(t)i(with)e(that)i(k)m(ey)f(is)630 1320
|
||||
y(set.)150 1464 y Ft(-R)e Fj(varname)630 1574 y Fu(T)-8
|
||||
b(rue)30 b(if)g(the)h(shell)f(v)-5 b(ariable)32 b Fr(v)-5
|
||||
b(arname)35 b Fu(is)30 b(set)h(and)f(is)h(a)f(name)h(reference.)150
|
||||
1718 y Ft(-z)f Fj(string)66 b Fu(T)-8 b(rue)30 b(if)g(the)h(length)g
|
||||
(of)f Fr(string)38 b Fu(is)31 b(zero.)150 1862 y Ft(-n)f
|
||||
Fj(string)150 1972 y(string)192 b Fu(T)-8 b(rue)30 b(if)g(the)h(length)
|
||||
g(of)f Fr(string)38 b Fu(is)31 b(non-zero.)150 2116 y
|
||||
Fj(string1)d Ft(==)i Fj(string2)150 2226 y(string1)e
|
||||
Ft(=)i Fj(string2)630 2336 y Fu(T)-8 b(rue)43 b(if)h(the)g(strings)g
|
||||
(are)g(equal.)82 b(When)44 b(used)f(with)g(the)h Ft([[)g
|
||||
Fu(command,)j(this)d(p)s(er-)630 2060 y(forms)d(pattern)g(matc)m(hing)i
|
||||
Fu(command,)j(this)d(p)s(er-)630 2445 y(forms)d(pattern)g(matc)m(hing)i
|
||||
(as)f(describ)s(ed)e(ab)s(o)m(v)m(e)j(\(see)f(Section)g(3.2.5.2)i
|
||||
([Conditional)630 2170 y(Constructs],)30 b(page)h(12\).)630
|
||||
2302 y(`)p Ft(=)p Fu(')g(should)e(b)s(e)h(used)f(with)h(the)h
|
||||
([Conditional)630 2555 y(Constructs],)30 b(page)h(12\).)630
|
||||
2682 y(`)p Ft(=)p Fu(')g(should)e(b)s(e)h(used)f(with)h(the)h
|
||||
Ft(test)e Fu(command)h(for)g Fm(posix)g Fu(conformance.)150
|
||||
2457 y Fj(string1)e Ft(!=)i Fj(string2)630 2567 y Fu(T)-8
|
||||
2826 y Fj(string1)e Ft(!=)i Fj(string2)630 2936 y Fu(T)-8
|
||||
b(rue)30 b(if)g(the)h(strings)f(are)h(not)f(equal.)150
|
||||
2722 y Fj(string1)e Ft(<)i Fj(string2)630 2831 y Fu(T)-8
|
||||
3080 y Fj(string1)e Ft(<)i Fj(string2)630 3189 y Fu(T)-8
|
||||
b(rue)30 b(if)g Fr(string1)38 b Fu(sorts)31 b(b)s(efore)f
|
||||
Fr(string2)38 b Fu(lexicographically)-8 b(.)150 2986
|
||||
y Fj(string1)28 b Ft(>)i Fj(string2)630 3096 y Fu(T)-8
|
||||
Fr(string2)38 b Fu(lexicographically)-8 b(.)150 3334
|
||||
y Fj(string1)28 b Ft(>)i Fj(string2)630 3443 y Fu(T)-8
|
||||
b(rue)30 b(if)g Fr(string1)38 b Fu(sorts)31 b(after)g
|
||||
Fr(string2)38 b Fu(lexicographically)-8 b(.)150 3251
|
||||
y Fj(arg1)29 b Ft(OP)h Fj(arg2)630 3361 y Ft(OP)j Fu(is)h(one)g(of)h(`)
|
||||
Fr(string2)38 b Fu(lexicographically)-8 b(.)150 3588
|
||||
y Fj(arg1)29 b Ft(OP)h Fj(arg2)630 3697 y Ft(OP)j Fu(is)h(one)g(of)h(`)
|
||||
p Ft(-eq)p Fu(',)f(`)p Ft(-ne)p Fu(',)h(`)p Ft(-lt)p
|
||||
Fu(',)g(`)p Ft(-le)p Fu(',)f(`)p Ft(-gt)p Fu(',)h(or)f(`)p
|
||||
Ft(-ge)p Fu('.)51 b(These)34 b(arithmetic)h(binary)630
|
||||
3470 y(op)s(erators)h(return)e(true)i(if)f Fr(arg1)44
|
||||
3807 y(op)s(erators)h(return)e(true)i(if)f Fr(arg1)44
|
||||
b Fu(is)36 b(equal)g(to,)i(not)e(equal)g(to,)i(less)e(than,)h(less)f
|
||||
(than)f(or)630 3580 y(equal)29 b(to,)g(greater)h(than,)e(or)g(greater)i
|
||||
(than)f(or)630 3916 y(equal)29 b(to,)g(greater)h(than,)e(or)g(greater)i
|
||||
(than)d(or)i(equal)f(to)h Fr(arg2)p Fu(,)h(resp)s(ectiv)m(ely)-8
|
||||
b(.)42 b Fr(Arg1)36 b Fu(and)630 3689 y Fr(arg2)41 b
|
||||
b(.)42 b Fr(Arg1)36 b Fu(and)630 4026 y Fr(arg2)41 b
|
||||
Fu(ma)m(y)34 b(b)s(e)f(p)s(ositiv)m(e)h(or)f(negativ)m(e)j(in)m
|
||||
(tegers.)50 b(When)33 b(used)g(with)g(the)g Ft([[)g Fu(command,)630
|
||||
3799 y Fr(Arg1)41 b Fu(and)33 b Fr(Arg2)41 b Fu(are)33
|
||||
4136 y Fr(Arg1)41 b Fu(and)33 b Fr(Arg2)41 b Fu(are)33
|
||||
b(ev)-5 b(aluated)35 b(as)e(arithmetic)i(expressions)d(\(see)j(Section)
|
||||
f(6.5)g([Shell)630 3908 y(Arithmetic],)e(page)f(101\).)150
|
||||
4145 y Fs(6.5)68 b(Shell)45 b(Arithmetic)150 4304 y Fu(The)26
|
||||
f(6.5)g([Shell)630 4245 y(Arithmetic],)e(page)f(101\).)150
|
||||
4471 y Fs(6.5)68 b(Shell)45 b(Arithmetic)150 4630 y Fu(The)26
|
||||
b(shell)h(allo)m(ws)h(arithmetic)f(expressions)g(to)g(b)s(e)f(ev)-5
|
||||
b(aluated,)29 b(as)d(one)h(of)g(the)g(shell)f(expansions)h(or)f(b)m(y)
|
||||
150 4414 y(using)h(the)g Ft(\(\()g Fu(comp)s(ound)e(command,)j(the)g
|
||||
150 4740 y(using)h(the)g Ft(\(\()g Fu(comp)s(ound)e(command,)j(the)g
|
||||
Ft(let)e Fu(builtin,)i(or)f(the)g Ft(-i)g Fu(option)h(to)f(the)h
|
||||
Ft(declare)d Fu(builtin.)275 4546 y(Ev)-5 b(aluation)27
|
||||
Ft(declare)d Fu(builtin.)275 4867 y(Ev)-5 b(aluation)27
|
||||
b(is)g(done)f(in)g(\014xed-width)g(in)m(tegers)i(with)e(no)h(c)m(hec)m
|
||||
(k)h(for)e(o)m(v)m(er\015o)m(w,)j(though)d(division)h(b)m(y)150
|
||||
4656 y(0)g(is)g(trapp)s(ed)f(and)h(\015agged)g(as)h(an)f(error.)39
|
||||
4976 y(0)g(is)g(trapp)s(ed)f(and)h(\015agged)g(as)h(an)f(error.)39
|
||||
b(The)26 b(op)s(erators)h(and)g(their)g(precedence,)h(asso)s(ciativit)m
|
||||
(y)-8 b(,)32 b(and)150 4765 y(v)-5 b(alues)35 b(are)h(the)f(same)g(as)h
|
||||
(y)-8 b(,)32 b(and)150 5086 y(v)-5 b(alues)35 b(are)h(the)f(same)g(as)h
|
||||
(in)e(the)h(C)g(language.)56 b(The)35 b(follo)m(wing)h(list)g(of)f(op)s
|
||||
(erators)g(is)g(group)s(ed)f(in)m(to)150 4875 y(lev)m(els)27
|
||||
(erators)g(is)g(group)s(ed)f(in)m(to)150 5196 y(lev)m(els)27
|
||||
b(of)f(equal-precedence)i(op)s(erators.)39 b(The)25 b(lev)m(els)j(are)e
|
||||
(listed)h(in)e(order)h(of)g(decreasing)g(precedence.)150
|
||||
5030 y Fj(id)p Ft(++)j Fj(id)p Ft(--)67 b Fu(v)-5 b(ariable)31
|
||||
b(p)s(ost-incremen)m(t)g(and)f(p)s(ost-decremen)m(t)150
|
||||
5185 y Ft(++)p Fj(id)f Ft(--)p Fj(id)67 b Fu(v)-5 b(ariable)31
|
||||
b(pre-incremen)m(t)g(and)f(pre-decremen)m(t)150 5340
|
||||
y Ft(-)g(+)354 b Fu(unary)29 b(min)m(us)h(and)g(plus)p
|
||||
5340 y Fj(id)p Ft(++)j Fj(id)p Ft(--)67 b Fu(v)-5 b(ariable)31
|
||||
b(p)s(ost-incremen)m(t)g(and)f(p)s(ost-decremen)m(t)p
|
||||
eop end
|
||||
%%Page: 102 108
|
||||
TeXDict begin 102 107 bop 150 -116 a Fu(Chapter)30 b(6:)41
|
||||
b(Bash)30 b(F)-8 b(eatures)2439 b(102)150 299 y Ft(!)30
|
||||
b(~)354 b Fu(logical)33 b(and)d(bit)m(wise)h(negation)150
|
||||
482 y Ft(**)384 b Fu(exp)s(onen)m(tiation)150 664 y Ft(*)30
|
||||
b(/)g(\045)276 b Fu(m)m(ultiplication,)33 b(division,)d(remainder)150
|
||||
847 y Ft(+)g(-)354 b Fu(addition,)31 b(subtraction)150
|
||||
1030 y Ft(<<)f(>>)258 b Fu(left)31 b(and)f(righ)m(t)h(bit)m(wise)g
|
||||
(shifts)150 1213 y Ft(<=)f(>=)g(<)g(>)102 b Fu(comparison)150
|
||||
1395 y Ft(==)30 b(!=)258 b Fu(equalit)m(y)32 b(and)e(inequalit)m(y)150
|
||||
1578 y Ft(&)432 b Fu(bit)m(wise)31 b(AND)150 1761 y Ft(^)432
|
||||
b Fu(bit)m(wise)31 b(exclusiv)m(e)h(OR)150 1944 y Ft(|)432
|
||||
b Fu(bit)m(wise)31 b(OR)150 2126 y Ft(&&)384 b Fu(logical)33
|
||||
b(AND)150 2309 y Ft(||)384 b Fu(logical)33 b(OR)150 2492
|
||||
y Ft(expr)c(?)h(if-true-expr)d(:)j(if-false-expr)630
|
||||
2601 y Fu(conditional)i(op)s(erator)150 2784 y Ft(=)e(*=)g(/=)g(\045=)f
|
||||
(+=)h(-=)g(<<=)f(>>=)h(&=)g(^=)f(|=)630 2894 y Fu(assignmen)m(t)150
|
||||
3076 y Ft(expr1)g(,)h(expr2)630 3186 y Fu(comma)275 3380
|
||||
b(Bash)30 b(F)-8 b(eatures)2439 b(102)150 299 y Ft(++)p
|
||||
Fj(id)29 b Ft(--)p Fj(id)67 b Fu(v)-5 b(ariable)31 b(pre-incremen)m(t)g
|
||||
(and)f(pre-decremen)m(t)150 463 y Ft(-)g(+)354 b Fu(unary)29
|
||||
b(min)m(us)h(and)g(plus)150 627 y Ft(!)g(~)354 b Fu(logical)33
|
||||
b(and)d(bit)m(wise)h(negation)150 791 y Ft(**)384 b Fu(exp)s(onen)m
|
||||
(tiation)150 955 y Ft(*)30 b(/)g(\045)276 b Fu(m)m(ultiplication,)33
|
||||
b(division,)d(remainder)150 1119 y Ft(+)g(-)354 b Fu(addition,)31
|
||||
b(subtraction)150 1283 y Ft(<<)f(>>)258 b Fu(left)31
|
||||
b(and)f(righ)m(t)h(bit)m(wise)g(shifts)150 1447 y Ft(<=)f(>=)g(<)g(>)
|
||||
102 b Fu(comparison)150 1611 y Ft(==)30 b(!=)258 b Fu(equalit)m(y)32
|
||||
b(and)e(inequalit)m(y)150 1775 y Ft(&)432 b Fu(bit)m(wise)31
|
||||
b(AND)150 1939 y Ft(^)432 b Fu(bit)m(wise)31 b(exclusiv)m(e)h(OR)150
|
||||
2103 y Ft(|)432 b Fu(bit)m(wise)31 b(OR)150 2267 y Ft(&&)384
|
||||
b Fu(logical)33 b(AND)150 2431 y Ft(||)384 b Fu(logical)33
|
||||
b(OR)150 2595 y Ft(expr)c(?)h(if-true-expr)d(:)j(if-false-expr)630
|
||||
2704 y Fu(conditional)i(op)s(erator)150 2868 y Ft(=)e(*=)g(/=)g(\045=)f
|
||||
(+=)h(-=)g(<<=)f(>>=)h(&=)g(^=)f(|=)630 2978 y Fu(assignmen)m(t)150
|
||||
3142 y Ft(expr1)g(,)h(expr2)630 3252 y Fu(comma)275 3418
|
||||
y(Shell)38 b(v)-5 b(ariables)39 b(are)g(allo)m(w)m(ed)i(as)e(op)s
|
||||
(erands;)i(parameter)e(expansion)g(is)f(p)s(erformed)g(b)s(efore)g(the)
|
||||
150 3490 y(expression)g(is)g(ev)-5 b(aluated.)66 b(Within)38
|
||||
150 3528 y(expression)g(is)g(ev)-5 b(aluated.)66 b(Within)38
|
||||
b(an)h(expression,)h(shell)e(v)-5 b(ariables)39 b(ma)m(y)g(also)g(b)s
|
||||
(e)f(referenced)g(b)m(y)150 3600 y(name)31 b(without)f(using)g(the)h
|
||||
(e)f(referenced)g(b)m(y)150 3637 y(name)31 b(without)f(using)g(the)h
|
||||
(parameter)g(expansion)f(syn)m(tax.)42 b(A)31 b(shell)f(v)-5
|
||||
b(ariable)32 b(that)f(is)f(n)m(ull)h(or)f(unset)150 3709
|
||||
b(ariable)32 b(that)f(is)f(n)m(ull)h(or)f(unset)150 3747
|
||||
y(ev)-5 b(aluates)41 b(to)f(0)g(when)e(referenced)h(b)m(y)g(name)h
|
||||
(without)f(using)g(the)g(parameter)h(expansion)f(syn)m(tax.)150
|
||||
3819 y(The)c(v)-5 b(alue)37 b(of)f(a)h(v)-5 b(ariable)36
|
||||
3856 y(The)c(v)-5 b(alue)37 b(of)f(a)h(v)-5 b(ariable)36
|
||||
b(is)g(ev)-5 b(aluated)38 b(as)e(an)g(arithmetic)h(expression)f(when)f
|
||||
(it)h(is)g(referenced,)i(or)150 3928 y(when)27 b(a)h(v)-5
|
||||
(it)h(is)g(referenced,)i(or)150 3966 y(when)27 b(a)h(v)-5
|
||||
b(ariable)29 b(whic)m(h)e(has)h(b)s(een)f(giv)m(en)i(the)f
|
||||
Ft(integer)e Fu(attribute)i(using)g(`)p Ft(declare)g(-i)p
|
||||
Fu(')g(is)g(assigned)150 4038 y(a)33 b(v)-5 b(alue.)49
|
||||
Fu(')g(is)g(assigned)150 4075 y(a)33 b(v)-5 b(alue.)49
|
||||
b(A)33 b(n)m(ull)g(v)-5 b(alue)34 b(ev)-5 b(aluates)34
|
||||
b(to)g(0.)49 b(A)33 b(shell)g(v)-5 b(ariable)34 b(need)e(not)i(ha)m(v)m
|
||||
(e)g(its)f Ft(integer)e Fu(attribute)150 4148 y(turned)e(on)h(to)i(b)s
|
||||
(e)d(used)h(in)g(an)g(expression.)275 4305 y(In)m(teger)41
|
||||
(e)g(its)f Ft(integer)e Fu(attribute)150 4185 y(turned)e(on)h(to)i(b)s
|
||||
(e)d(used)h(in)g(an)g(expression.)275 4324 y(In)m(teger)41
|
||||
b(constan)m(ts)g(follo)m(w)h(the)e(C)g(language)i(de\014nition,)g
|
||||
(without)f(su\016xes)e(or)h(c)m(haracter)i(con-)150 4415
|
||||
(without)f(su\016xes)e(or)h(c)m(haracter)i(con-)150 4434
|
||||
y(stan)m(ts.)f(Constan)m(ts)31 b(with)f(a)g(leading)h(0)f(are)h(in)m
|
||||
(terpreted)f(as)g(o)s(ctal)i(n)m(um)m(b)s(ers.)39 b(A)30
|
||||
b(leading)h(`)p Ft(0x)p Fu(')f(or)g(`)p Ft(0X)p Fu(')150
|
||||
4525 y(denotes)g(hexadecimal.)42 b(Otherwise,)30 b(n)m(um)m(b)s(ers)f
|
||||
4543 y(denotes)g(hexadecimal.)42 b(Otherwise,)30 b(n)m(um)m(b)s(ers)f
|
||||
(tak)m(e)i(the)f(form)g([)p Fr(base)5 b Ft(#)p Fu(])p
|
||||
Fr(n)p Fu(,)30 b(where)f(the)i(optional)g Fr(base)150
|
||||
4634 y Fu(is)e(a)h(decimal)g(n)m(um)m(b)s(er)e(b)s(et)m(w)m(een)h(2)h
|
||||
4653 y Fu(is)e(a)h(decimal)g(n)m(um)m(b)s(er)e(b)s(et)m(w)m(een)h(2)h
|
||||
(and)e(64)i(represen)m(ting)g(the)f(arithmetic)i(base,)e(and)g
|
||||
Fr(n)g Fu(is)g(a)g(n)m(um)m(b)s(er)150 4744 y(in)g(that)i(base.)40
|
||||
Fr(n)g Fu(is)g(a)g(n)m(um)m(b)s(er)150 4763 y(in)g(that)i(base.)40
|
||||
b(If)30 b Fr(base)5 b Ft(#)30 b Fu(is)f(omitted,)i(then)f(base)g(10)g
|
||||
(is)g(used.)40 b(When)30 b(sp)s(ecifying)f Fr(n)p Fu(,)h(if)f(a)i
|
||||
(non-digit)f(is)150 4853 y(required,)k(the)g(digits)h(greater)g(than)e
|
||||
(non-digit)f(is)150 4872 y(required,)k(the)g(digits)h(greater)g(than)e
|
||||
(9)i(are)f(represen)m(ted)g(b)m(y)f(the)h(lo)m(w)m(ercase)j(letters,)f
|
||||
(the)e(upp)s(ercase)150 4963 y(letters,)26 b(`)p Ft(@)p
|
||||
(the)e(upp)s(ercase)150 4982 y(letters,)26 b(`)p Ft(@)p
|
||||
Fu(',)g(and)d(`)p Ft(_)p Fu(',)i(in)e(that)i(order.)38
|
||||
b(If)23 b Fr(base)29 b Fu(is)23 b(less)h(than)g(or)f(equal)h(to)h(36,)h
|
||||
(lo)m(w)m(ercase)g(and)d(upp)s(ercase)150 5073 y(letters)32
|
||||
(lo)m(w)m(ercase)g(and)d(upp)s(ercase)150 5091 y(letters)32
|
||||
b(ma)m(y)f(b)s(e)e(used)h(in)m(terc)m(hangeably)i(to)f(represen)m(t)g
|
||||
(n)m(um)m(b)s(ers)e(b)s(et)m(w)m(een)i(10)g(and)f(35.)275
|
||||
5230 y(Op)s(erators)44 b(are)h(ev)-5 b(aluated)46 b(in)f(order)f(of)h
|
||||
@@ -15754,108 +15761,110 @@ y(The)j(`)p Ft(+=)p Fu(')g(op)s(erator)h(will)g(app)s(end)e(to)i(an)g
|
||||
([Shell)e(P)m(arameters],)i(page)g(21,)f(ab)s(o)m(v)m(e.)275
|
||||
5011 y(An)m(y)d(elemen)m(t)h(of)g(an)f(arra)m(y)g(ma)m(y)h(b)s(e)f
|
||||
(referenced)g(using)g Ft(${)p Fj(name)p Ft([)p Fj(subscript)p
|
||||
Ft(]})p Fu(.)35 b(The)27 b(braces)i(are)150 5121 y(required)f(to)j(a)m
|
||||
(v)m(oid)f(con\015icts)g(with)f(the)h(shell's)f(\014lename)h(expansion)
|
||||
f(op)s(erators.)41 b(If)28 b(the)i Fr(subscript)g Fu(is)150
|
||||
5230 y(`)p Ft(@)p Fu(')f(or)h(`)p Ft(*)p Fu(',)f(the)h(w)m(ord)f
|
||||
(expands)f(to)i(all)g(mem)m(b)s(ers)e(of)i(the)f(arra)m(y)h
|
||||
Fr(name)p Fu(.)40 b(These)29 b(subscripts)f(di\013er)h(only)150
|
||||
5340 y(when)36 b(the)g(w)m(ord)g(app)s(ears)g(within)g(double)g
|
||||
(quotes.)60 b(If)36 b(the)h(w)m(ord)f(is)g(double-quoted,)j
|
||||
Ft(${)p Fj(name)p Ft([*]})p eop end
|
||||
Ft(]})p Fu(.)35 b(The)27 b(braces)i(are)150 5121 y(required)35
|
||||
b(to)i(a)m(v)m(oid)g(con\015icts)g(with)f(the)g(shell's)g(\014lename)g
|
||||
(expansion)g(op)s(erators.)58 b(If)35 b(the)h Fr(subscript)150
|
||||
5230 y Fu(is)g(`)p Ft(@)p Fu(')h(or)f(`)p Ft(*)p Fu(',)i(the)f(w)m(ord)
|
||||
f(expands)f(to)j(all)f(mem)m(b)s(ers)e(of)i(the)f(arra)m(y)h
|
||||
Fr(name)p Fu(,)h(unless)e(otherwise)h(noted)150 5340
|
||||
y(in)g(the)h(description)g(of)g(a)g(builtin)g(or)f(w)m(ord)h
|
||||
(expansion.)63 b(These)37 b(subscripts)g(di\013er)g(only)h(when)f(the)p
|
||||
eop end
|
||||
%%Page: 105 111
|
||||
TeXDict begin 105 110 bop 150 -116 a Fu(Chapter)30 b(6:)41
|
||||
b(Bash)30 b(F)-8 b(eatures)2439 b(105)150 299 y(expands)25
|
||||
b(to)h(a)g(single)h(w)m(ord)e(with)g(the)h(v)-5 b(alue)26
|
||||
b(of)g(eac)m(h)h(arra)m(y)f(mem)m(b)s(er)f(separated)h(b)m(y)g(the)f
|
||||
(\014rst)g(c)m(harac-)150 408 y(ter)j(of)g(the)h Ft(IFS)e
|
||||
Fu(v)-5 b(ariable,)29 b(and)f Ft(${)p Fj(name)p Ft([@]})d
|
||||
Fu(expands)i(eac)m(h)i(elemen)m(t)h(of)e Fr(name)33 b
|
||||
Fu(to)c(a)f(separate)h(w)m(ord.)150 518 y(When)j(there)h(are)f(no)g
|
||||
(arra)m(y)h(mem)m(b)s(ers,)f Ft(${)p Fj(name)p Ft([@]})e
|
||||
Fu(expands)h(to)i(nothing.)47 b(If)31 b(the)i(double-quoted)150
|
||||
628 y(expansion)39 b(o)s(ccurs)h(within)f(a)h(w)m(ord,)i(the)d
|
||||
(expansion)h(of)g(the)f(\014rst)g(parameter)h(is)g(joined)f(with)h(the)
|
||||
150 737 y(b)s(eginning)29 b(part)g(of)h(the)f(original)i(w)m(ord,)e
|
||||
(and)g(the)h(expansion)f(of)h(the)f(last)i(parameter)e(is)h(joined)f
|
||||
(with)150 847 y(the)g(last)h(part)f(of)g(the)g(original)h(w)m(ord.)40
|
||||
b(This)28 b(is)h(analogous)h(to)f(the)h(expansion)e(of)h(the)g(sp)s
|
||||
(ecial)h(param-)150 956 y(eters)g(`)p Ft(@)p Fu(')f(and)g(`)p
|
||||
Ft(*)p Fu('.)41 b Ft(${#)p Fj(name)p Ft([)p Fj(subscript)p
|
||||
Ft(]})24 b Fu(expands)k(to)i(the)g(length)g(of)f Ft(${)p
|
||||
Fj(name)p Ft([)p Fj(subscript)p Ft(]})p Fu(.)35 b(If)150
|
||||
1066 y Fr(subscript)28 b Fu(is)g(`)p Ft(@)p Fu(')f(or)h(`)p
|
||||
Ft(*)p Fu(',)g(the)g(expansion)f(is)g(the)h(n)m(um)m(b)s(er)e(of)i
|
||||
(elemen)m(ts)g(in)f(the)h(arra)m(y)-8 b(.)41 b(If)27
|
||||
b(the)g Fr(subscript)150 1176 y Fu(used)34 b(to)h(reference)g(an)f
|
||||
(elemen)m(t)i(of)f(an)f(indexed)g(arra)m(y)h(ev)-5 b(aluates)36
|
||||
b(to)f(a)g(n)m(um)m(b)s(er)e(less)i(than)f(zero,)i(it)150
|
||||
1285 y(is)c(in)m(terpreted)h(as)f(relativ)m(e)i(to)f(one)f(greater)h
|
||||
(than)f(the)h(maxim)m(um)f(index)f(of)h(the)h(arra)m(y)-8
|
||||
b(,)33 b(so)g(negativ)m(e)150 1395 y(indices)d(coun)m(t)h(bac)m(k)h
|
||||
(from)e(the)g(end)g(of)g(the)h(arra)m(y)-8 b(,)31 b(and)f(an)g(index)g
|
||||
(of)h(-1)g(refers)f(to)h(the)g(last)g(elemen)m(t.)275
|
||||
1544 y(Referencing)41 b(an)f(arra)m(y)h(v)-5 b(ariable)42
|
||||
b(Bash)30 b(F)-8 b(eatures)2439 b(105)150 299 y(w)m(ord)25
|
||||
b(app)s(ears)g(within)g(double)h(quotes.)39 b(If)26 b(the)f(w)m(ord)h
|
||||
(is)f(double-quoted,)i Ft(${)p Fj(name)p Ft([*]})c Fu(expands)i(to)i(a)
|
||||
150 408 y(single)h(w)m(ord)f(with)f(the)i(v)-5 b(alue)27
|
||||
b(of)h(eac)m(h)g(arra)m(y)g(mem)m(b)s(er)e(separated)i(b)m(y)f(the)g
|
||||
(\014rst)f(c)m(haracter)j(of)e(the)h Ft(IFS)150 518 y
|
||||
Fu(v)-5 b(ariable,)34 b(and)e Ft(${)p Fj(name)p Ft([@]})e
|
||||
Fu(expands)h(eac)m(h)j(elemen)m(t)g(of)f Fr(name)k Fu(to)c(a)g
|
||||
(separate)h(w)m(ord.)46 b(When)33 b(there)150 628 y(are)39
|
||||
b(no)f(arra)m(y)g(mem)m(b)s(ers,)i Ft(${)p Fj(name)p
|
||||
Ft([@]})35 b Fu(expands)i(to)i(nothing.)64 b(If)38 b(the)g
|
||||
(double-quoted)g(expansion)150 737 y(o)s(ccurs)26 b(within)g(a)g(w)m
|
||||
(ord,)h(the)g(expansion)f(of)h(the)f(\014rst)g(parameter)g(is)h(joined)
|
||||
f(with)g(the)g(b)s(eginning)g(part)150 847 y(of)j(the)g(original)g(w)m
|
||||
(ord,)g(and)f(the)h(expansion)f(of)h(the)g(last)h(parameter)f(is)f
|
||||
(joined)h(with)f(the)h(last)g(part)g(of)150 956 y(the)h(original)h(w)m
|
||||
(ord.)40 b(This)29 b(is)h(analogous)h(to)f(the)g(expansion)f(of)h(the)g
|
||||
(sp)s(ecial)h(parameters)f(`)p Ft(@)p Fu(')f(and)h(`)p
|
||||
Ft(*)p Fu('.)150 1066 y Ft(${#)p Fj(name)p Ft([)p Fj(subscript)p
|
||||
Ft(]})21 b Fu(expands)k(to)h(the)g(length)h(of)f Ft(${)p
|
||||
Fj(name)p Ft([)p Fj(subscript)p Ft(]})p Fu(.)34 b(If)25
|
||||
b Fr(subscript)i Fu(is)f(`)p Ft(@)p Fu(')g(or)150 1176
|
||||
y(`)p Ft(*)p Fu(',)j(the)g(expansion)g(is)g(the)g(n)m(um)m(b)s(er)e(of)
|
||||
i(elemen)m(ts)h(in)e(the)h(arra)m(y)-8 b(.)41 b(If)29
|
||||
b(the)g Fr(subscript)g Fu(used)f(to)h(reference)150 1285
|
||||
y(an)36 b(elemen)m(t)i(of)e(an)h(indexed)e(arra)m(y)i(ev)-5
|
||||
b(aluates)38 b(to)f(a)g(n)m(um)m(b)s(er)e(less)h(than)g(zero,)j(it)e
|
||||
(is)f(in)m(terpreted)h(as)150 1395 y(relativ)m(e)28 b(to)f(one)f
|
||||
(greater)i(than)d(the)i(maxim)m(um)f(index)f(of)h(the)h(arra)m(y)-8
|
||||
b(,)28 b(so)e(negativ)m(e)i(indices)e(coun)m(t)h(bac)m(k)150
|
||||
1504 y(from)j(the)g(end)g(of)h(the)f(arra)m(y)-8 b(,)32
|
||||
b(and)e(an)g(index)g(of)g(-1)h(refers)f(to)h(the)g(last)g(elemen)m(t.)
|
||||
275 1639 y(Referencing)41 b(an)f(arra)m(y)h(v)-5 b(ariable)42
|
||||
b(without)e(a)h(subscript)e(is)i(equiv)-5 b(alen)m(t)42
|
||||
b(to)f(referencing)g(with)g(a)150 1653 y(subscript)34
|
||||
b(to)f(referencing)g(with)g(a)150 1748 y(subscript)34
|
||||
b(of)i(0.)57 b(An)m(y)35 b(reference)h(to)g(a)g(v)-5
|
||||
b(ariable)37 b(using)e(a)g(v)-5 b(alid)36 b(subscript)f(is)g(legal,)k
|
||||
(and)c(Bash)h(will)150 1763 y(create)c(an)e(arra)m(y)h(if)f(necessary)
|
||||
-8 b(.)275 1912 y(An)35 b(arra)m(y)i(v)-5 b(ariable)37
|
||||
(and)c(Bash)h(will)150 1858 y(create)c(an)e(arra)m(y)h(if)f(necessary)
|
||||
-8 b(.)275 1992 y(An)35 b(arra)m(y)i(v)-5 b(ariable)37
|
||||
b(is)g(considered)f(set)h(if)f(a)h(subscript)e(has)h(b)s(een)g
|
||||
(assigned)g(a)h(v)-5 b(alue.)59 b(The)36 b(n)m(ull)150
|
||||
2021 y(string)30 b(is)h(a)g(v)-5 b(alid)30 b(v)-5 b(alue.)275
|
||||
2170 y(It)29 b(is)h(p)s(ossible)f(to)h(obtain)g(the)f(k)m(eys)i
|
||||
2102 y(string)30 b(is)h(a)g(v)-5 b(alid)30 b(v)-5 b(alue.)275
|
||||
2236 y(It)29 b(is)h(p)s(ossible)f(to)h(obtain)g(the)f(k)m(eys)i
|
||||
(\(indices\))f(of)f(an)h(arra)m(y)g(as)f(w)m(ell)i(as)f(the)f(v)-5
|
||||
b(alues.)41 b($)p Fi({)p Fu(!)p Fr(name)5 b Fu([@])p
|
||||
Fi(})150 2280 y Fu(and)39 b($)p Fi({)p Fu(!)p Fr(name)5
|
||||
Fi(})150 2346 y Fu(and)39 b($)p Fi({)p Fu(!)p Fr(name)5
|
||||
b Fu([*])p Fi(})43 b Fu(expand)c(to)i(the)f(indices)h(assigned)f(in)g
|
||||
(arra)m(y)g(v)-5 b(ariable)41 b Fr(name)p Fu(.)70 b(The)39
|
||||
b(treatmen)m(t)150 2389 y(when)i(in)g(double)g(quotes)h(is)f(similar)h
|
||||
b(treatmen)m(t)150 2455 y(when)i(in)g(double)g(quotes)h(is)f(similar)h
|
||||
(to)h(the)e(expansion)h(of)f(the)h(sp)s(ecial)g(parameters)g(`)p
|
||||
Ft(@)p Fu(')g(and)f(`)p Ft(*)p Fu(')150 2499 y(within)30
|
||||
b(double)g(quotes.)275 2648 y(The)25 b Ft(unset)g Fu(builtin)g(is)h
|
||||
Ft(@)p Fu(')g(and)f(`)p Ft(*)p Fu(')150 2565 y(within)30
|
||||
b(double)g(quotes.)275 2699 y(The)25 b Ft(unset)g Fu(builtin)g(is)h
|
||||
(used)f(to)i(destro)m(y)f(arra)m(ys.)40 b Ft(unset)29
|
||||
b Fj(name)p Ft([)p Fj(subscript)p Ft(])22 b Fu(destro)m(ys)k(the)g
|
||||
(arra)m(y)150 2757 y(elemen)m(t)40 b(at)e(index)g Fr(subscript)p
|
||||
(arra)m(y)150 2809 y(elemen)m(t)40 b(at)e(index)g Fr(subscript)p
|
||||
Fu(.)62 b(Negativ)m(e)41 b(subscripts)c(to)i(indexed)e(arra)m(ys)i(are)
|
||||
f(in)m(terpreted)h(as)f(de-)150 2867 y(scrib)s(ed)30
|
||||
f(in)m(terpreted)h(as)f(de-)150 2918 y(scrib)s(ed)30
|
||||
b(ab)s(o)m(v)m(e.)42 b(Unsetting)31 b(the)g(last)g(elemen)m(t)h(of)f
|
||||
(an)g(arra)m(y)g(v)-5 b(ariable)31 b(do)s(es)f(not)h(unset)f(the)h(v)-5
|
||||
b(ariable.)150 2977 y Ft(unset)29 b Fj(name)p Fu(,)39
|
||||
b(ariable.)150 3028 y Ft(unset)29 b Fj(name)p Fu(,)39
|
||||
b(where)e Fr(name)43 b Fu(is)37 b(an)h(arra)m(y)-8 b(,)41
|
||||
b(remo)m(v)m(es)e(the)f(en)m(tire)g(arra)m(y)-8 b(.)64
|
||||
b Ft(unset)29 b Fj(name)p Ft([)p Fj(subscript)p Ft(])150
|
||||
3086 y Fu(b)s(eha)m(v)m(es)h(di\013eren)m(tly)g(dep)s(ending)d(on)j
|
||||
3137 y Fu(b)s(eha)m(v)m(es)h(di\013eren)m(tly)g(dep)s(ending)d(on)j
|
||||
(the)f(arra)m(y)h(t)m(yp)s(e)f(when)g(giv)m(en)h(a)f(subscript)g(of)g
|
||||
(`)p Ft(*)p Fu(')g(or)h(`)p Ft(@)p Fu('.)40 b(When)150
|
||||
3196 y Fr(name)46 b Fu(is)40 b(an)h(asso)s(ciativ)m(e)i(arra)m(y)-8
|
||||
3247 y Fr(name)46 b Fu(is)40 b(an)h(asso)s(ciativ)m(e)i(arra)m(y)-8
|
||||
b(,)44 b(it)d(remo)m(v)m(es)h(the)f(elemen)m(t)h(with)e(k)m(ey)h(`)p
|
||||
Ft(*)p Fu(')g(or)f(`)p Ft(@)p Fu('.)72 b(If)40 b Fr(name)45
|
||||
b Fu(is)c(an)150 3305 y(indexed)30 b(arra)m(y)-8 b(,)31
|
||||
b Fu(is)c(an)150 3357 y(indexed)30 b(arra)m(y)-8 b(,)31
|
||||
b Ft(unset)e Fu(remo)m(v)m(es)j(all)f(of)g(the)f(elemen)m(ts,)i(but)e
|
||||
(do)s(es)g(not)h(remo)m(v)m(e)h(the)e(arra)m(y)h(itself.)275
|
||||
3454 y(When)k(using)g(a)i(v)-5 b(ariable)36 b(name)g(with)g(a)g
|
||||
3491 y(When)k(using)g(a)i(v)-5 b(ariable)36 b(name)g(with)g(a)g
|
||||
(subscript)e(as)i(an)g(argumen)m(t)g(to)h(a)f(command,)h(suc)m(h)f(as)
|
||||
150 3564 y(with)k Ft(unset)p Fu(,)h(without)e(using)h(the)g(w)m(ord)f
|
||||
150 3600 y(with)k Ft(unset)p Fu(,)h(without)e(using)h(the)g(w)m(ord)f
|
||||
(expansion)h(syn)m(tax)g(describ)s(ed)f(ab)s(o)m(v)m(e,)44
|
||||
b(the)c(argumen)m(t)g(is)150 3673 y(sub)5 b(ject)25 b(to)h(the)g
|
||||
b(the)c(argumen)m(t)g(is)150 3710 y(sub)5 b(ject)25 b(to)h(the)g
|
||||
(shell's)g(\014lename)f(expansion.)39 b(If)25 b(\014lename)h(expansion)
|
||||
f(is)g(not)h(desired,)g(the)f(argumen)m(t)150 3783 y(should)k(b)s(e)h
|
||||
(quoted.)275 3932 y(The)20 b Ft(declare)p Fu(,)h Ft(local)p
|
||||
f(is)g(not)h(desired,)g(the)f(argumen)m(t)150 3820 y(should)k(b)s(e)h
|
||||
(quoted.)275 3954 y(The)20 b Ft(declare)p Fu(,)h Ft(local)p
|
||||
Fu(,)h(and)e Ft(readonly)f Fu(builtins)h(eac)m(h)i(accept)g(a)g
|
||||
Ft(-a)e Fu(option)h(to)h(sp)s(ecify)f(an)f(indexed)150
|
||||
4042 y(arra)m(y)28 b(and)f(a)h Ft(-A)e Fu(option)i(to)g(sp)s(ecify)f
|
||||
4064 y(arra)m(y)28 b(and)f(a)h Ft(-A)e Fu(option)i(to)g(sp)s(ecify)f
|
||||
(an)h(asso)s(ciativ)m(e)i(arra)m(y)-8 b(.)40 b(If)27
|
||||
b(b)s(oth)g(options)h(are)g(supplied,)f Ft(-A)f Fu(tak)m(es)150
|
||||
4151 y(precedence.)55 b(The)35 b Ft(read)f Fu(builtin)h(accepts)h(a)g
|
||||
4173 y(precedence.)55 b(The)35 b Ft(read)f Fu(builtin)h(accepts)h(a)g
|
||||
Ft(-a)e Fu(option)i(to)g(assign)f(a)g(list)h(of)f(w)m(ords)g(read)g
|
||||
(from)g(the)150 4261 y(standard)h(input)g(to)i(an)f(arra)m(y)-8
|
||||
(from)g(the)150 4283 y(standard)h(input)g(to)i(an)f(arra)m(y)-8
|
||||
b(,)40 b(and)c(can)h(read)g(v)-5 b(alues)38 b(from)e(the)h(standard)g
|
||||
(input)f(in)m(to)i(individual)150 4370 y(arra)m(y)f(elemen)m(ts.)62
|
||||
(input)f(in)m(to)i(individual)150 4392 y(arra)m(y)f(elemen)m(ts.)62
|
||||
b(The)36 b Ft(set)g Fu(and)h Ft(declare)d Fu(builtins)j(displa)m(y)g
|
||||
(arra)m(y)g(v)-5 b(alues)37 b(in)g(a)g(w)m(a)m(y)h(that)g(allo)m(ws)150
|
||||
4480 y(them)30 b(to)h(b)s(e)f(reused)g(as)g(input.)150
|
||||
4502 y(them)30 b(to)h(b)s(e)f(reused)g(as)g(input.)150
|
||||
4742 y Fs(6.8)68 b(The)45 b(Directory)g(Stac)l(k)150
|
||||
4902 y Fu(The)21 b(directory)h(stac)m(k)h(is)e(a)h(list)g(of)f(recen)m
|
||||
(tly-visited)j(directories.)39 b(The)20 b Ft(pushd)g
|
||||
|
||||
Reference in New Issue
Block a user