No specific user configuration
[platform/upstream/bash.git] / doc / article.ps
1 %!PS-Adobe-3.0
2 %%Creator: groff version 1.19.2
3 %%CreationDate: Tue Oct 22 11:07:52 2013
4 %%DocumentNeededResources: font Times-Bold
5 %%+ font Times-Italic
6 %%+ font Times-Roman
7 %%+ font Courier
8 %%DocumentSuppliedResources: procset grops 1.19 2
9 %%Pages: 11
10 %%PageOrder: Ascend
11 %%DocumentMedia: Default 612 792 0 () ()
12 %%Orientation: Portrait
13 %%EndComments
14 %%BeginDefaults
15 %%PageMedia: Default
16 %%EndDefaults
17 %%BeginProlog
18 %%BeginResource: procset grops 1.19 2
19 %!PS-Adobe-3.0 Resource-ProcSet
20 /setpacking where{
21 pop
22 currentpacking
23 true setpacking
24 }if
25 /grops 120 dict dup begin
26 /SC 32 def
27 /A/show load def
28 /B{0 SC 3 -1 roll widthshow}bind def
29 /C{0 exch ashow}bind def
30 /D{0 exch 0 SC 5 2 roll awidthshow}bind def
31 /E{0 rmoveto show}bind def
32 /F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def
33 /G{0 rmoveto 0 exch ashow}bind def
34 /H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
35 /I{0 exch rmoveto show}bind def
36 /J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def
37 /K{0 exch rmoveto 0 exch ashow}bind def
38 /L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
39 /M{rmoveto show}bind def
40 /N{rmoveto 0 SC 3 -1 roll widthshow}bind def
41 /O{rmoveto 0 exch ashow}bind def
42 /P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
43 /Q{moveto show}bind def
44 /R{moveto 0 SC 3 -1 roll widthshow}bind def
45 /S{moveto 0 exch ashow}bind def
46 /T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def
47 /SF{
48 findfont exch
49 [exch dup 0 exch 0 exch neg 0 0]makefont
50 dup setfont
51 [exch/setfont cvx]cvx bind def
52 }bind def
53 /MF{
54 findfont
55 [5 2 roll
56 0 3 1 roll
57 neg 0 0]makefont
58 dup setfont
59 [exch/setfont cvx]cvx bind def
60 }bind def
61 /level0 0 def
62 /RES 0 def
63 /PL 0 def
64 /LS 0 def
65 /MANUAL{
66 statusdict begin/manualfeed true store end
67 }bind def
68 /PLG{
69 gsave newpath clippath pathbbox grestore
70 exch pop add exch pop
71 }bind def
72 /BP{
73 /level0 save def
74 1 setlinecap
75 1 setlinejoin
76 72 RES div dup scale
77 LS{
78 90 rotate
79 }{
80 0 PL translate
81 }ifelse
82 1 -1 scale
83 }bind def
84 /EP{
85 level0 restore
86 showpage
87 }def
88 /DA{
89 newpath arcn stroke
90 }bind def
91 /SN{
92 transform
93 .25 sub exch .25 sub exch
94 round .25 add exch round .25 add exch
95 itransform
96 }bind def
97 /DL{
98 SN
99 moveto
100 SN
101 lineto stroke
102 }bind def
103 /DC{
104 newpath 0 360 arc closepath
105 }bind def
106 /TM matrix def
107 /DE{
108 TM currentmatrix pop
109 translate scale newpath 0 0 .5 0 360 arc closepath
110 TM setmatrix
111 }bind def
112 /RC/rcurveto load def
113 /RL/rlineto load def
114 /ST/stroke load def
115 /MT/moveto load def
116 /CL/closepath load def
117 /Fr{
118 setrgbcolor fill
119 }bind def
120 /setcmykcolor where{
121 pop
122 /Fk{
123 setcmykcolor fill
124 }bind def
125 }if
126 /Fg{
127 setgray fill
128 }bind def
129 /FL/fill load def
130 /LW/setlinewidth load def
131 /Cr/setrgbcolor load def
132 /setcmykcolor where{
133 pop
134 /Ck/setcmykcolor load def
135 }if
136 /Cg/setgray load def
137 /RE{
138 findfont
139 dup maxlength 1 index/FontName known not{1 add}if dict begin
140 {
141 1 index/FID ne{def}{pop pop}ifelse
142 }forall
143 /Encoding exch def
144 dup/FontName exch def
145 currentdict end definefont pop
146 }bind def
147 /DEFS 0 def
148 /EBEGIN{
149 moveto
150 DEFS begin
151 }bind def
152 /EEND/end load def
153 /CNT 0 def
154 /level1 0 def
155 /PBEGIN{
156 /level1 save def
157 translate
158 div 3 1 roll div exch scale
159 neg exch neg exch translate
160 0 setgray
161 0 setlinecap
162 1 setlinewidth
163 0 setlinejoin
164 10 setmiterlimit
165 []0 setdash
166 /setstrokeadjust where{
167 pop
168 false setstrokeadjust
169 }if
170 /setoverprint where{
171 pop
172 false setoverprint
173 }if
174 newpath
175 /CNT countdictstack def
176 userdict begin
177 /showpage{}def
178 /setpagedevice{}def
179 }bind def
180 /PEND{
181 countdictstack CNT sub{end}repeat
182 level1 restore
183 }bind def
184 end def
185 /setpacking where{
186 pop
187 setpacking
188 }if
189 %%EndResource
190 %%EndProlog
191 %%BeginSetup
192 %%BeginFeature: *PageSize Default
193 << /PageSize [ 612 792 ] /ImagingBBox null >> setpagedevice
194 %%EndFeature
195 %%IncludeResource: font Times-Bold
196 %%IncludeResource: font Times-Italic
197 %%IncludeResource: font Times-Roman
198 %%IncludeResource: font Courier
199 grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72
200 def/PL 792 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron/Zcaron
201 /scaron/zcaron/Ydieresis/trademark/quotesingle/Euro/.notdef/.notdef
202 /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
203 /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
204 /.notdef/.notdef/space/exclam/quotedbl/numbersign/dollar/percent
205 /ampersand/quoteright/parenleft/parenright/asterisk/plus/comma/hyphen
206 /period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon
207 /semicolon/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O
208 /P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright/circumflex
209 /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
210 /z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase/guillemotleft
211 /guillemotright/bullet/florin/fraction/perthousand/dagger/daggerdbl
212 /endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut
213 /dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash
214 /quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen
215 /brokenbar/section/dieresis/copyright/ordfeminine/guilsinglleft
216 /logicalnot/minus/registered/macron/degree/plusminus/twosuperior
217 /threesuperior/acute/mu/paragraph/periodcentered/cedilla/onesuperior
218 /ordmasculine/guilsinglright/onequarter/onehalf/threequarters
219 /questiondown/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE
220 /Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex
221 /Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis
222 /multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn
223 /germandbls/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla
224 /egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis
225 /eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide/oslash
226 /ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis]def
227 /Courier@0 ENC0/Courier RE/Times-Roman@0 ENC0/Times-Roman RE
228 /Times-Italic@0 ENC0/Times-Italic RE/Times-Bold@0 ENC0/Times-Bold RE
229 %%EndSetup
230 %%Page: 1 1
231 %%BeginPageSetup
232 BP
233 %%EndPageSetup
234 /F0 12/Times-Bold@0 SF(Bash \255 The GNU shell*)227.904 123 Q/F1 10
235 /Times-Italic@0 SF(Chet Rame)263.85 159 Q(y)-.3 E(Case W)221.72 171 Q
236 (estern Reserve Univer)-.92 E(sity)-.1 E -.15(ch)250.425 183 S
237 (et@po.cwru.edu).15 E/F2 10/Times-Bold@0 SF 2.5(1. Intr)72 219 R
238 (oduction)-.18 E(Bash)97 234.6 Q/F3 10/Times-Roman@0 SF .904
239 (is the shell, or command language interpreter)3.404 F 3.404(,t)-.4 G
240 .904(hat will appear in the GNU operating system.)-3.404 F 1.075
241 (The name is an acron)72 246.6 R 1.075(ym for the \231Bourne-Ag)-.15 F
242 1.075(ain SHell\232, a pun on Ste)-.05 F 1.375 -.15(ve B)-.25 H 1.075
243 (ourne, the author of the direct).15 F .206(ancestor of the current)72
244 258.6 R/F4 8/Times-Roman@0 SF(UNIX)2.706 E F3 2.706<ae73>C(hell)-2.706 E
245 F1(/bin/sh)2.706 E F3 2.706(,w)C .205(hich appeared in the Se)-2.706 F
246 -.15(ve)-.25 G .205(nth Edition Bell Labs Research v).15 F(er)-.15 E(-)
247 -.2 E(sion of)72 270.6 Q/F5 9/Times-Roman@0 SF(UNIX)2.5 E F3(.)A .387
248 (Bash is an)97 286.2 R F2(sh)2.887 E F3 .387
249 (\255compatible shell that incorporates useful features from the K)B
250 .388(orn shell \()-.35 F F2(ksh)A F3 2.888(\)a)C .388(nd the C)-2.888 F
251 .023(shell \()72 298.2 R F2(csh)A F3 .023
252 (\), described later in this article.)B .022
253 (It is ultimately intended to be a conformant implementation of the)
254 5.022 F 3.568(IEEE POSIX Shell and Utilities speci\214cation \(IEEE W)72
255 310.2 R 3.568(orking Group 1003.2\).)-.8 F 3.569(It of)8.569 F 3.569
256 (fers functional)-.25 F(impro)72 322.2 Q -.15(ve)-.15 G(ments o).15 E
257 -.15(ve)-.15 G 2.5(rs).15 G 2.5(hf)-2.5 G(or both interacti)-2.5 E .3
258 -.15(ve a)-.25 H(nd programming use.).15 E .697
259 (While the GNU operating system will most lik)97 337.8 R .697
260 (ely include a v)-.1 F .697(ersion of the Berk)-.15 F(ele)-.1 E 3.197
261 (ys)-.15 G .696(hell csh, Bash)-3.197 F .015(will be the def)72 349.8 R
262 .015(ault shell.)-.1 F(Lik)5.015 E 2.515(eo)-.1 G .015(ther GNU softw)
263 -2.515 F .016(are, Bash is quite portable.)-.1 F .016
264 (It currently runs on nearly e)5.016 F -.15(ve)-.25 G(ry).15 E -.15(ve)
265 72 361.8 S .523(rsion of).15 F F4(UNIX)3.023 E F3 .523(and a fe)3.023 F
266 3.023(wo)-.25 G .523
267 (ther operating systems \255 an independently-supported port e)-3.023 F
268 .523(xists for OS/2, and)-.15 F .706
269 (there are rumors of ports to DOS and W)72 373.8 R(indo)-.4 E .706
270 (ws NT)-.25 F 5.706(.P)-.74 G .706(orts to)-5.706 F F5(UNIX)3.206 E F3
271 (-lik)A 3.206(es)-.1 G .706(ystems such as QNX and Minix)-3.206 F
272 (are part of the distrib)72 385.8 Q(ution.)-.2 E .405
273 (The original author of Bash w)97 401.4 R .405(as Brian F)-.1 F .405
274 (ox, an emplo)-.15 F .405(yee of the Free Softw)-.1 F .405(are F)-.1 F
275 2.905(oundation. The)-.15 F(cur)2.905 E(-)-.2 E(rent de)72 413.4 Q -.15
276 (ve)-.25 G(loper and maintainer is Chet Rame).15 E 1.3 -.65(y, a v)-.15
277 H(olunteer who w).45 E(orks at Case W)-.1 E(estern Reserv)-.8 E 2.5(eU)
278 -.15 G(ni)-2.5 E -.15(ve)-.25 G(rsity).15 E(.)-.65 E F2 2.5(2. What')72
279 437.4 R 2.5(sP)-.37 G(OSIX, anyway?)-2.5 E F1(POSIX)97 453 Q F3 .343
280 (is a name originally coined by Richard Stallman for a f)2.843 F .343
281 (amily of open system standards based)-.1 F(on)72 465 Q F5(UNIX)3.24 E
282 F3 5.74(.T)C .74(here are a number of aspects of)-5.74 F F5(UNIX)3.24 E
283 F3 .74(under consideration for standardization, from the basic)3.24 F
284 .192(system services at the system call and C library le)72 477 R -.15
285 (ve)-.25 G 2.692(lt).15 G 2.692(oa)-2.692 G .192
286 (pplications and tools to system administration and)-2.692 F 2.5
287 (management. Each)72 489 R(area of standardization is assigned to a w)
288 2.5 E(orking group in the 1003 series.)-.1 E 2.814
289 (The POSIX Shell and Utilities standard has been de)97 504.6 R -.15(ve)
290 -.25 G 2.814(loped by IEEE W).15 F 2.813(orking Group 1003.2)-.8 F .254
291 (\(POSIX.2\).\210 It concentrates on the command interpreter interf)72
292 516.6 R .253(ace and utility programs commonly e)-.1 F -.15(xe)-.15 G
293 (cuted).15 E 1.112(from the command line or by other programs.)72 528.6
294 R 1.112(An initial v)6.112 F 1.113
295 (ersion of the standard has been appro)-.15 F -.15(ve)-.15 G 3.613(da)
296 .15 G(nd)-3.613 E .365(published by the IEEE, and w)72 540.6 R .365
297 (ork is currently underw)-.1 F .365(ay to update it.)-.1 F .365
298 (There are four primary areas of w)5.365 F(ork)-.1 E
299 (in the 1003.2 standard:)72 552.6 Q 21.5<8341>72 568.2 S .835
300 (spects of the shell')-21.5 F 3.335(ss)-.55 G .835
301 (yntax and command language.)-3.335 F 3.335(An)5.835 G .835
302 (umber of special b)-3.335 F .835(uiltins such as)-.2 F F2(cd)3.335 E F3
303 (and)3.335 E F2(exec)97 580.2 Q F3 .545(are being speci\214ed as part o\
304 f the shell, since their functionality usually cannot be implemented)
305 3.046 F(by a separate e)97 592.2 Q -.15(xe)-.15 G(cutable;).15 E 21.5
306 <8341>72 607.8 S .926
307 (set of utilities to be called by shell scripts and applications.)
308 -18.074 F .927(Examples are programs lik)5.927 F(e)-.1 E F1 .927
309 (sed, tr)3.427 F(,)-1.11 E F3(and)97 619.8 Q F1(awk.)2.797 E F3 .297
310 (Utilities commonly implemented as shell b)5.297 F .296
311 (uiltins are described in this section, such as)-.2 F F2(test)2.796 E F3
312 (and)97 631.8 Q F2(kill)3.422 E F3 5.922(.A)C 3.422(ne)-5.922 G .922
313 (xpansion of this section')-3.572 F 3.423(ss)-.55 G .923
314 (cope, termed the User Portability Extension, or UPE, has)-3.423 F
315 (standardized interacti)97 643.8 Q .3 -.15(ve p)-.25 H(rograms such as)
316 .15 E F1(vi)2.5 E F3(and)2.5 E F1(mailx;)2.5 E F3 21.5<8341>72 659.4 S
317 .288(group of functional interf)-18.712 F .287(aces to services pro)-.1
318 F .287(vided by the shell, such as the traditional)-.15 F/F6 10
319 /Courier@0 SF(system\(\))2.787 E F3 3.289(Cl)97 671.4 S .789
320 (ibrary function.)-3.289 F .789(There are functions to perform shell w)
321 5.789 F .789(ord e)-.1 F .79(xpansions, perform \214lename e)-.15 F
322 (xpan-)-.15 E 3.624(sion \()97 683.4 R F1(globbing)A F3 3.624
323 (\), obtain v)B 3.624(alues of POSIX.2 system con\214guration v)-.25 F
324 3.623(ariables, retrie)-.25 F 3.923 -.15(ve v)-.25 H 3.623(alues of)-.1
325 F .32 LW 144 691.4 72 691.4 DL F4(*An earlier v)72 703.2 Q
326 (ersion of this article appeared in The Linux Journal.)-.12 E(\210IEEE,)
327 72 715 Q/F7 8/Times-Italic@0 SF 1.231(IEEE Standar)3.231 F 3.231(df)
328 -.296 G 1.231(or Information T)-3.231 F(ec)-.736 E(hnolo)-.12 E 1.231
329 (gy -- P)-.08 F 1.231(ortable Oper)-.64 F 1.232
330 (ating System Interface \(POSIX\) P)-.12 F 1.232(art 2:)-.64 F
331 (Shell and Utilities)72 725 Q F4 2(,1)C(992.)-2 E 0 Cg EP
332 %%Page: 2 2
333 %%BeginPageSetup
334 BP
335 %%EndPageSetup
336 /F0 10/Times-Roman@0 SF(-2-)282.17 48 Q(en)97 84 Q(vironment v)-.4 E
337 (ariables \()-.25 E/F1 10/Courier@0 SF(getenv\(\))A F0
338 (\), and other services;).833 E 21.5<8341>72 99.6 S(suite of \231de)-19
339 E -.15(ve)-.25 G(lopment\232 utilities such as).15 E/F2 10
340 /Times-Italic@0 SF(c89)2.5 E F0(\(the POSIX.2 v)2.5 E(ersion of)-.15 E
341 F2(cc)2.5 E F0(\), and)A F2(yacc.)2.5 E F0 .483
342 (Bash is concerned with the aspects of the shell')97 115.2 R 2.983(sb)
343 -.55 G(eha)-2.983 E .484(vior de\214ned by POSIX.2.)-.2 F .484
344 (The shell command)5.484 F 1.439
345 (language has of course been standardized, including the basic \215o)72
346 127.2 R 3.938(wc)-.25 G 1.438(ontrol and program e)-3.938 F -.15(xe)-.15
347 G 1.438(cution con-).15 F 1.284
348 (structs, I/O redirection and pipelining, ar)72 139.2 R 1.284
349 (gument handling, v)-.18 F 1.284(ariable e)-.25 F 1.284
350 (xpansion, and quoting.)-.15 F(The)6.285 E F2(special)3.785 E F0 -.2(bu)
351 72 151.2 S .676
352 (iltins, which must be implemented as part of the shell to pro).2 F .676
353 (vide the desired functionality)-.15 F 3.176(,a)-.65 G .676
354 (re speci\214ed)-3.176 F .7(as being part of the shell; e)72 163.2 R .7
355 (xamples of these are)-.15 F/F3 10/Times-Bold@0 SF -2.3 -.15(ev a)3.201
356 H(l).15 E F0(and)3.201 E F3(export)3.201 E F0 5.701(.O)C .701
357 (ther utilities appear in the sections of)-5.701 F .256(POSIX.2 not de)
358 72 175.2 R -.2(vo)-.25 G .256(ted to the shell which are commonly \(and\
359  in some cases must be\) implemented as b).2 F(uiltin)-.2 E .213
360 (commands, such as)72 187.2 R F3 -.18(re)2.713 G(ad).18 E F0(and)2.713 E
361 F3(test)2.713 E F0 5.213(.P)C .213
362 (OSIX.2 also speci\214es aspects of the shell')-5.213 F 2.713(si)-.55 G
363 (nteracti)-2.713 E .513 -.15(ve b)-.25 H(eha).15 E .214(vior as part)-.2
364 F .598(of the UPE, including job control and command line editing.)72
365 199.2 R .598(Interestingly enough, only)5.598 F F2(vi)3.098 E F0 .598
366 (-style line edit-)B(ing commands ha)72 211.2 Q .3 -.15(ve b)-.2 H
367 (een standardized;).15 E F2(emacs)2.5 E F0
368 (editing commands were left out due to objections.)2.5 E 1.128
369 (While POSIX.2 includes much of what the shell has traditionally pro)97
370 226.8 R 1.129(vided, some important things)-.15 F(ha)72 238.8 Q .344
371 -.15(ve b)-.2 H .044(een omitted as being \231be).15 F .044
372 (yond its scope.)-.15 F 5.043<9a54>-.7 G .043
373 (here is, for instance, no mention of a dif)-5.043 F .043
374 (ference between a)-.25 F F2(lo)72 250.8 Q(gin)-.1 E F0 1.445
375 (shell and an)3.945 F 3.945(yo)-.15 G 1.445(ther interacti)-3.945 F
376 1.745 -.15(ve s)-.25 H 1.446
377 (hell \(since POSIX.2 does not specify a login program\).).15 F 1.446
378 (No \214x)6.446 F(ed)-.15 E(startup \214les are de\214ned, either \255 \
379 the standard does not mention)72 262.8 Q F2(.pr)2.5 E(o\214le)-.45 E F0
380 (.)A F3 2.5(3. Basic)72 286.8 R(Bash featur)2.5 E(es)-.18 E F0 1.448
381 (Since the Bourne shell pro)97 302.4 R 1.448
382 (vides Bash with most of its philosophical underpinnings, Bash inherits)
383 -.15 F .64(most of its features and functionality from sh.)72 314.4 R
384 .641(Bash implements all of the traditional sh \215o)5.641 F 3.141(wc)
385 -.25 G .641(ontrol con-)-3.141 F .8(structs \()72 326.4 R F2(for)A F0(,)
386 A F2(if)3.3 E F0(,)A F2(while)3.3 E F0 3.3(,e)C 3.3(tc.\). All)-3.3 F
387 .799(of the Bourne shell b)3.3 F .799
388 (uiltins, including those not speci\214ed in the POSIX.2)-.2 F .536
389 (standard, appear in Bash.)72 338.4 R(Shell)5.536 E F2(functions)3.036 E
390 F0 3.036(,i)C .536(ntroduced in the SVR2 v)-3.036 F .537
391 (ersion of the Bourne shell, are similar)-.15 F .779
392 (to shell scripts, b)72 350.4 R .779
393 (ut are de\214ned using a special syntax and are e)-.2 F -.15(xe)-.15 G
394 .779(cuted in the same process as the calling).15 F 2.841(shell. Bash)72
395 362.4 R .341(has shell functions which beha)2.841 F .641 -.15(ve i)-.2 H
396 2.841(naf).15 G .341(ashion upw)-2.941 F .342
397 (ard-compatible with sh functions.)-.1 F .342(There are)5.342 F 1.447
398 (certain shell v)72 374.4 R 1.446
399 (ariables that Bash interprets in the same w)-.25 F 1.446
400 (ay as sh, such as)-.1 F F3(PS1)3.946 E F0(,)A F3(IFS)3.946 E F0 3.946
401 (,a)C(nd)-3.946 E F3 -.74(PA)3.946 G(TH)-.21 E F0 6.446(.B)C(ash)-6.446
402 E 1.423(implements essentially the same grammar)72 386.4 R 3.924(,p)-.4
403 G 1.424(arameter and v)-3.924 F 1.424(ariable e)-.25 F 1.424
404 (xpansion semantics, redirection, and)-.15 F 1.06
405 (quoting as the Bourne shell.)72 398.4 R 1.06(Where dif)6.06 F 1.06
406 (ferences appear between the POSIX.2 standard and traditional sh)-.25 F
407 (beha)72 410.4 Q(vior)-.2 E 2.5(,B)-.4 G(ash follo)-2.5 E(ws POSIX.)-.25
408 E 1.608(The K)97 426 R 1.608(orn Shell \()-.35 F F3(ksh)A F0 4.108(\)i)C
409 4.108(sad)-4.108 G 1.608(escendant of the Bourne shell written at A)
410 -4.108 F 1.609(T&T Bell Laboratories by)-1.11 F(Da)72 438 Q 1.059(vid K)
411 -.2 F 3.559(orn\207. It)-.35 F(pro)3.559 E 1.059
412 (vides a number of useful features that POSIX and Bash ha)-.15 F 1.359
413 -.15(ve a)-.2 H 3.558(dopted. Man).15 F 3.558(yo)-.15 G 3.558(ft)-3.558
414 G(he)-3.558 E(interacti)72 450 Q 1.312 -.15(ve f)-.25 H 1.012
415 (acilities in POSIX.2 ha).05 F 1.312 -.15(ve t)-.2 H 1.012
416 (heir roots in the ksh: for e).15 F 1.013
417 (xample, the POSIX and ksh job control)-.15 F -.1(fa)72 462 S .513
418 (cilities are nearly identical. Bash includes features from the K).1 F
419 .513(orn Shell for both interacti)-.35 F .813 -.15(ve u)-.25 H .513
420 (se and shell).15 F 3.905(programming. F)72 474 R 1.405
421 (or programming, Bash pro)-.15 F 1.405(vides v)-.15 F 1.405
422 (ariables such as)-.25 F F3(RANDOM)3.905 E F0(and)3.905 E F3(REPL)3.905
423 E(Y)-.92 E F0 3.905(,t)C(he)-3.905 E F3(typeset)3.905 E F0 -.2(bu)72 486
424 S .398(iltin, the ability to remo).2 F .698 -.15(ve s)-.15 H .398
425 (ubstrings from v).15 F .398
426 (ariables based on patterns, and shell arithmetic.)-.25 F F3(RANDOM)
427 5.397 E F0 -.15(ex)72 498 S .489
428 (pands to a random number each time it is referenced; assigning a v).15
429 F .49(alue to)-.25 F F3(RANDOM)2.99 E F0 .49(seeds the random)2.99 F
430 .055(number generator)72 510 R(.)-.55 E F3(REPL)5.055 E(Y)-.92 E F0 .054
431 (is the def)2.554 F .054(ault v)-.1 F .054(ariable used by the)-.25 F F3
432 -.18(re)2.554 G(ad).18 E F0 -.2(bu)2.554 G .054(iltin when no v).2 F
433 .054(ariable names are sup-)-.25 F .742(plied as ar)72 522 R 3.243
434 (guments. The)-.18 F F3(typeset)3.243 E F0 -.2(bu)3.243 G .743
435 (iltin is used to de\214ne v).2 F .743(ariables and gi)-.25 F 1.043 -.15
436 (ve t)-.25 H .743(hem attrib).15 F .743(utes such as)-.2 F F3 -.18(re)
437 3.243 G(ad-).18 E(only)72 534 Q F0 5.512(.B)C .512(ash arithmetic allo)
438 -5.512 F .512(ws the e)-.25 F -.25(va)-.25 G .511(luation of an e).25 F
439 .511(xpression and the substitution of the result.)-.15 F .511(Shell v)
440 5.511 F(ari-)-.25 E .222
441 (ables may be used as operands, and the result of an e)72 546 R .222
442 (xpression may be assigned to a v)-.15 F 2.722(ariable. Nearly)-.25 F
443 .222(all of)2.722 F(the operators from the C language are a)72 558 Q
444 -.25(va)-.2 G(ilable, with the same precedence rules:).25 E F1 6($e)97
445 576 S(cho $\(\(3 + 5 * 32\)\))-6 E(163)97 588 Q F0 -.15(Fo)72 609.6 S
446 3.24(ri).15 G(nteracti)-3.24 E 1.04 -.15(ve u)-.25 H .74
447 (se, Bash implements ksh-style aliases and b).15 F .74(uiltins such as)
448 -.2 F F3(fc)3.24 E F0 .74(\(discussed belo)3.24 F .74(w\) and)-.25 F F3
449 (jobs)3.24 E F0(.)A .291(Bash aliases allo)72 621.6 R 2.791(was)-.25 G
450 .291(tring to be substituted for a command name.)-2.791 F(The)5.291 E
451 2.791(yc)-.15 G .291(an be used to create a mnemonic)-2.791 F .568
452 (for a)72 633.6 R/F4 9/Times-Roman@0 SF(UNIX)3.068 E F0 .568
453 (command name \()3.068 F F1 .568(alias del=rm)B F0 .568(\), to e)B .567
454 (xpand a single w)-.15 F .567(ord to a comple)-.1 F 3.067(xc)-.15 G .567
455 (ommand \()-3.067 F F1(alias)A .255
456 (news='xterm -g 80x45 -title trn -e trn -e -S1 -N &')72 645.6 R F0 .255
457 (\), or to ensure that a command)B(is in)72 657.6 Q -.2(vo)-.4 G -.1(ke)
458 .2 G 2.5(dw).1 G(ith a basic set of options \()-2.5 E F1
459 (alias ls="/bin/ls -F")A F0(\).)A .293(The C shell \()97 673.2 R F3(csh)
460 A F0 .293(\)\207, originally written by Bill Jo)B 2.792(yw)-.1 G .292
461 (hile at Berk)-2.792 F(ele)-.1 E 1.592 -.65(y, i)-.15 H 2.792(sw).65 G
462 .292(idely used and quite popular)-2.792 F 1.499(for its interacti)72
463 685.2 R 1.799 -.15(ve f)-.25 H 3.999(acilities. Bash).05 F 1.499
464 (includes a csh-compatible history e)3.999 F 1.5
465 (xpansion mechanism \(\231! history\232\),)-.15 F .019(brace e)72 697.2
466 R .018(xpansion, access to a stack of directories via the)-.15 F F3
467 (pushd)2.518 E F0(,)A F3(popd)2.518 E F0 2.518(,a)C(nd)-2.518 E F3(dirs)
468 2.518 E F0 -.2(bu)2.518 G .018(iltins, and tilde e).2 F(xpansion,)-.15 E
469 1.293(to generate users' home directories.)72 709.2 R -.35(Ti)6.294 G
470 1.294(lde e).35 F 1.294(xpansion has also been adopted by both the K)
471 -.15 F 1.294(orn Shell and)-.35 F .32 LW 144 717.2 72 717.2 DL/F5 8
472 /Times-Roman@0 SF(\207Morris Bolsk)72 727.2 Q 2(ya)-.12 G(nd Da)-2 E
473 (vid K)-.16 E(orn,)-.28 E/F6 8/Times-Italic@0 SF(The K)2 E
474 (ornShell Command and Pr)-.32 E -.08(og)-.36 G -.12(ra).08 G
475 (mming Langua).12 E -.08(ge)-.08 G F5 2(,P).08 G(rentice Hall, 1989.)-2
476 E 0 Cg EP
477 %%Page: 3 3
478 %%BeginPageSetup
479 BP
480 %%EndPageSetup
481 /F0 10/Times-Roman@0 SF(-3-)282.17 48 Q(POSIX.2.)72 84 Q .148
482 (There were certain areas in which POSIX.2 felt standardization w)97
483 99.6 R .149(as necessary)-.1 F 2.649(,b)-.65 G .149(ut no e)-2.849 F
484 .149(xisting imple-)-.15 F 1.598(mentation pro)72 111.6 R 1.598
485 (vided the proper beha)-.15 F(vior)-.2 E 6.598(.T)-.55 G 1.598(he w)
486 -6.598 F 1.597(orking group in)-.1 F -.15(ve)-.4 G 1.597
487 (nted and standardized functionality in).15 F .674
488 (these areas, which Bash implements.)72 123.6 R(The)5.674 E/F1 10
489 /Times-Bold@0 SF(command)3.174 E F0 -.2(bu)3.174 G .674(iltin w).2 F
490 .674(as in)-.1 F -.15(ve)-.4 G .674
491 (nted so that shell functions could be).15 F .996(written to replace b)
492 72 135.6 R .996(uiltins; it mak)-.2 F .996(es the capabilities of the b)
493 -.1 F .995(uiltin a)-.2 F -.25(va)-.2 G .995(ilable to the function.).25
494 F .995(The reserv)5.995 F(ed)-.15 E -.1(wo)72 147.6 S 1.731
495 (rd \231!\232 w).1 F 1.731(as added to ne)-.1 F -.05(ga)-.15 G 1.731
496 (te the return v).05 F 1.731(alue of a command or pipeline; it w)-.25 F
497 1.732(as nearly impossible to)-.1 F -.15(ex)72 159.6 S .286
498 (press \231if not x\232 cleanly using the sh language.).15 F .286
499 (There e)5.286 F .286(xist multiple incompatible implementations of the)
500 -.15 F F1(test)72 171.6 Q F0 -.2(bu)3.163 G .663
501 (iltin, which tests \214les for type and other attrib).2 F .664
502 (utes and performs arithmetic and string comparisons.)-.2 F .5
503 (POSIX considered none of these correct, so the standard beha)72 183.6 R
504 .5(vior w)-.2 F .5(as speci\214ed in terms of the number of)-.1 F(ar)72
505 195.6 Q .412(guments to the command.)-.18 F .412(POSIX.2 dictates e)
506 5.412 F .412(xactly what will happen when four or fe)-.15 F .412(wer ar)
507 -.25 F .412(guments are)-.18 F(gi)72 207.6 Q -.15(ve)-.25 G 5.01(nt).15
508 G(o)-5.01 E F1(test)5.01 E F0 5.01(,a)C 2.51(nd lea)-5.01 F -.15(ve)-.2
509 G 5.01(st).15 G 2.51(he beha)-5.01 F 2.51(vior unde\214ned when more ar)
510 -.2 F 2.51(guments are supplied.)-.18 F 2.51(Bash uses the)7.51 F
511 (POSIX.2 algorithm, which w)72 219.6 Q(as concei)-.1 E -.15(ve)-.25 G
512 2.5(db).15 G 2.5(yD)-2.5 G -.2(av)-2.5 G(id K).2 E(orn.)-.35 E F1 2.5
513 (3.1. F)72 243.6 R(eatur)-.25 E(es not in the Bour)-.18 E(ne Shell)-.15
514 E F0 .718(There are a number of minor dif)97 259.2 R .719
515 (ferences between Bash and the v)-.25 F .719
516 (ersion of sh present on most other)-.15 F -.15(ve)72 271.2 S .874
517 (rsions of).15 F/F2 9/Times-Roman@0 SF(UNIX)3.374 E F0 5.873(.T)C .873
518 (he majority of these are due to the POSIX standard, b)-5.873 F .873
519 (ut some are the result of Bash)-.2 F .386
520 (adopting features from other shells.)72 283.2 R -.15(Fo)5.386 G 2.886
521 (ri).15 G .386(nstance, Bash includes the ne)-2.886 F 2.886<7799>-.25 G
522 .386(!\232 reserv)-2.886 F .386(ed w)-.15 F .386(ord, the)-.1 F F1
523 (command)2.886 E F0 -.2(bu)72 295.2 S .116(iltin, the ability of the).2
524 F F1 -.18(re)2.616 G(ad).18 E F0 -.2(bu)2.615 G .115
525 (iltin to correctly return a line ending with a backslash, symbolic ar)
526 .2 F(guments)-.18 E .798(to the)72 307.2 R F1(umask)3.298 E F0 -.2(bu)
527 3.298 G .798(iltin, v).2 F .798(ariable substring remo)-.25 F -.25(va)
528 -.15 G .798(l, a w).25 F .799(ay to get the length of a v)-.1 F .799
529 (ariable, and the ne)-.25 F 3.299(wa)-.25 G(lgo-)-3.299 E(rithm for the)
530 72 319.2 Q F1(test)2.5 E F0 -.2(bu)2.5 G
531 (iltin from the POSIX.2 standard, none of which appear in sh.).2 E 1.225
532 (Bash also implements the \231$\(...\)\232 command substitution syntax,\
533  which supersedes the sh `...` con-)97 334.8 R 2.851(struct. The)72
534 346.8 R .351(\231$\(...\)\232 construct e)2.851 F .351(xpands to the ou\
535 tput of the command contained within the parentheses, with)-.15 F .664
536 (trailing ne)72 358.8 R .664(wlines remo)-.25 F -.15(ve)-.15 G 3.164
537 (d. The).15 F .664(sh syntax is accepted for backw)3.164 F .664
538 (ards compatibility)-.1 F 3.164(,b)-.65 G .664
539 (ut the \231$\(...\)\232 form is)-3.364 F(preferred because its quoting\
540  rules are much simpler and it is easier to nest.)72 370.8 Q .772
541 (The Bourne shell does not pro)97 386.4 R .772
542 (vide such features as brace e)-.15 F .772
543 (xpansion, the ability to de\214ne a v)-.15 F(ariable)-.25 E .283
544 (and a function with the same name, local v)72 398.4 R .282
545 (ariables in shell functions, the ability to enable and disable indi-)
546 -.25 F 1.532(vidual b)72 410.4 R 1.532
547 (uiltins or write a function to replace a b)-.2 F 1.533
548 (uiltin, or a means to e)-.2 F 1.533(xport a shell function to a child)
549 -.15 F(process.)72 422.4 Q .32
550 (Bash has closed a long-standing shell security hole by not using the)97
551 438 R F1($IFS)2.82 E F0 -.25(va)2.82 G .32(riable to split each w).25 F
552 (ord)-.1 E 1.254(read by the shell, b)72 450 R 1.254
553 (ut splitting only the results of e)-.2 F 1.255
554 (xpansion \(ksh and the 4.4 BSD sh ha)-.15 F 1.555 -.15(ve \214)-.2 H
555 -.15(xe).15 G 3.755(dt).15 G 1.255(his as)-3.755 F 2.907(well\). Useful)
556 72 462 R(beha)2.907 E .407(vior such as a means to abort e)-.2 F -.15
557 (xe)-.15 G .407(cution of a script read with the \231.).15 F 2.906<9a63>
558 -.7 G .406(ommand using the)-2.906 F F1 -.18(re)72 474 S(tur).18 E(n)
559 -.15 E F0 -.2(bu)2.742 G .242(iltin or automatically e).2 F .242
560 (xporting v)-.15 F .243(ariables in the shell')-.25 F 2.743(se)-.55 G
561 -.4(nv)-2.743 G .243(ironment to children is also not present).4 F .969
562 (in the Bourne shell.)72 486 R .968(Bash pro)5.968 F .968
563 (vides a much more po)-.15 F .968(werful en)-.25 F .968
564 (vironment for both interacti)-.4 F 1.268 -.15(ve u)-.25 H .968
565 (se and pro-).15 F(gramming.)72 498 Q F1 2.5(4. Bash-speci\214c)72 522 R
566 -.25(Fe)2.5 G(atur).25 E(es)-.18 E F0 .491(This section details a fe)97
567 537.6 R 2.991(wo)-.25 G 2.991(ft)-2.991 G .491(he features which mak)
568 -2.991 F 2.991(eB)-.1 G .491(ash unique.)-2.991 F .492(Most of them pro)
569 5.491 F .492(vide impro)-.15 F -.15(ve)-.15 G(d).15 E(interacti)72 549.6
570 Q 1.182 -.15(ve u)-.25 H .882(se, b).15 F .882(ut a fe)-.2 F 3.382(wp)
571 -.25 G .882(rogramming impro)-3.382 F -.15(ve)-.15 G .882
572 (ments are present as well.).15 F .882(Full descriptions of these fea-)
573 5.882 F(tures can be found in the Bash documentation.)72 561.6 Q F1 2.5
574 (4.1. Startup)72 585.6 R(Files)2.5 E F0 .161(Bash e)97 601.2 R -.15(xe)
575 -.15 G .161(cutes startup \214les dif).15 F .161
576 (ferently than other shells.)-.25 F .162(The Bash beha)5.161 F .162
577 (vior is a compromise between)-.2 F .29
578 (the csh principle of startup \214les with \214x)72 613.2 R .29
579 (ed names e)-.15 F -.15(xe)-.15 G .29
580 (cuted for each shell and the sh \231minimalist\232 beha).15 F(vior)-.2
581 E(.)-.55 E 2.955(An interacti)72 625.2 R 3.255 -.15(ve i)-.25 H 2.955
582 (nstance of Bash started as a login shell reads and e).15 F -.15(xe)-.15
583 G(cutes).15 E/F3 10/Times-Italic@0 SF(~/.bash_pr)5.456 E(o\214le)-.45 E
584 F0 2.956(\(the \214le)5.456 F .954(.bash_pro\214le in the user')72 637.2
585 R 3.454(sh)-.55 G .953(ome directory\), if it e)-3.454 F 3.453
586 (xists. An)-.15 F(interacti)3.453 E 1.253 -.15(ve n)-.25 H .953
587 (on-login shell reads and e).15 F -.15(xe)-.15 G(cutes).15 E F3
588 (~/.bashr)72 649.2 Q(c)-.37 E F0 5.641(.A)C(non-interacti)-2.5 E .942
589 -.15(ve s)-.25 H .642(hell \(one be).15 F .642(gun to e)-.15 F -.15(xe)
590 -.15 G .642(cute a shell script, for e).15 F .642
591 (xample\) reads no \214x)-.15 F .642(ed startup)-.15 F .342(\214le, b)72
592 661.2 R .342(ut uses the v)-.2 F .342(alue of the v)-.25 F(ariable)-.25
593 E F1($ENV)2.842 E F0 2.841(,i)C 2.841(fs)-2.841 G .341
594 (et, as the name of a startup \214le.)-2.841 F .341
595 (The ksh practice of read-)5.341 F(ing)72 673.2 Q F1($ENV)3.114 E F0
596 .614(for e)3.114 F -.15(ve)-.25 G .614(ry shell, with the accompan).15 F
597 .615(ying dif)-.15 F .615(\214culty of de\214ning the proper v)-.25 F
598 .615(ariables and functions)-.25 F .721(for interacti)72 685.2 R 1.021
599 -.15(ve a)-.25 H .721(nd non-interacti).15 F 1.021 -.15(ve s)-.25 H .721
600 (hells or ha).15 F .721(ving the \214le read only for interacti)-.2 F
601 1.02 -.15(ve s)-.25 H .72(hells, w).15 F .72(as considered)-.1 F .158
602 (too comple)72 697.2 R 2.658(x. Ease)-.15 F .158(of use w)2.658 F .158
603 (on out here.)-.1 F(Interestingly)5.158 E 2.658(,t)-.65 G .158(he ne)
604 -2.658 F .159(xt release of ksh will change to reading)-.15 F F1($ENV)
605 2.659 E .32 LW 144 705.2 72 705.2 DL/F4 8/Times-Roman@0 SF .559
606 (\207Bill Jo)72 715.2 R 1.599 -.52(y, A)-.08 H 2.559(nI).52 G .559
607 (ntroduction to the C Shell,)-2.559 F/F5 8/Times-Italic@0 SF .558
608 (UNIX User')2.558 F 2.558(sS)-.32 G .558(upplementary Documents)-2.558 F
609 F4 2.558(,U)C(ni)-2.558 E -.12(ve)-.2 G .558(rsity of California at).12
610 F(Berk)72 725.2 Q(ele)-.08 E 1.04 -.52(y, 1)-.12 H(986.).52 E 0 Cg EP
611 %%Page: 4 4
612 %%BeginPageSetup
613 BP
614 %%EndPageSetup
615 /F0 10/Times-Roman@0 SF(-4-)282.17 48 Q(only for interacti)72 84 Q .3
616 -.15(ve s)-.25 H(hells.).15 E/F1 10/Times-Bold@0 SF 2.5(4.2. New)72 108
617 R(Builtin Commands)2.5 E F0 1.02(There are a fe)97 123.6 R 3.52(wb)-.25
618 G 1.02(uiltins which are ne)-3.72 F 3.52(wo)-.25 G 3.52(rh)-3.52 G -2.25
619 -.2(av e)-3.52 H 1.02(been e)3.72 F 1.02(xtended in Bash.)-.15 F(The)
620 6.02 E F1(enable)3.52 E F0 -.2(bu)3.52 G 1.02(iltin allo).2 F(ws)-.25 E
621 -.2(bu)72 135.6 S .824(iltin commands to be turned on and of).2 F 3.324
622 (fa)-.25 G(rbitrarily)-3.324 E 5.824(.T)-.65 G 3.324(ou)-6.624 G .824
623 (se the v)-3.324 F .824(ersion of)-.15 F/F2 10/Times-Italic@0 SF(ec)
624 3.324 E(ho)-.15 E F0 .825(found in a user')3.324 F 3.325(ss)-.55 G
625 (earch)-3.325 E .625(path rather than the Bash b)72 147.6 R(uiltin,)-.2
626 E/F3 10/Courier@0 SF .625(enable -n echo)3.125 F F0(suf)3.125 E 3.125
627 (\214ces. The)-.25 F F1(help)3.124 E F0 -.2(bu)3.124 G .624(iltin pro).2
628 F .624(vides quick synopses)-.15 F .703(of the shell f)72 159.6 R .704
629 (acilities without requiring access to a manual page.)-.1 F F1(Builtin)
630 5.704 E F0 .704(is similar to)3.204 F F1(command)3.204 E F0 .704
631 (in that it)3.204 F .342(bypasses shell functions and directly e)72
632 171.6 R -.15(xe)-.15 G .342(cutes b).15 F .342(uiltin commands.)-.2 F
633 .342(Access to a csh-style stack of directories)5.342 F .072(is pro)72
634 183.6 R .073(vided via the)-.15 F F1(pushd)2.573 E F0(,)A F1(popd)2.573
635 E F0 2.573(,a)C(nd)-2.573 E F1(dirs)2.573 E F0 -.2(bu)2.573 G(iltins.).2
636 E F1(Pushd)5.073 E F0(and)2.573 E F1(popd)2.573 E F0 .073
637 (insert and remo)2.573 F .373 -.15(ve d)-.15 H .073(irectories from the)
638 .15 F 2.858(stack, respecti)72 195.6 R -.15(ve)-.25 G(ly).15 E 5.358(,a)
639 -.65 G(nd)-5.358 E F1(dirs)5.358 E F0 2.858(lists the stack contents.)
640 5.358 F 2.858(On systems that allo)7.858 F 5.358<778c>-.25 G 2.857
641 (ne-grained control of)-5.358 F 1.339(resources, the)72 207.6 R F1
642 (ulimit)3.839 E F0 -.2(bu)3.839 G 1.339
643 (iltin can be used to tune these settings.).2 F F1(Ulimit)6.34 E F0
644 (allo)3.84 E 1.34(ws a user to control, among)-.25 F 1.086
645 (other things, whether core dumps are to be generated, ho)72 219.6 R
646 3.586(wm)-.25 G 1.086(uch memory the shell or a child process is)-3.586
647 F(allo)72 231.6 Q .496(wed to allocate, and ho)-.25 F 2.996(wl)-.25 G
648 (ar)-2.996 E .496(ge a \214le created by a child process can gro)-.18 F
649 4.296 -.65(w. T)-.25 H(he).65 E F1(suspend)2.996 E F0 .497(command will)
650 2.997 F .744(stop the shell process when job control is acti)72 243.6 R
651 -.15(ve)-.25 G 3.243(;m).15 G .743(ost other shells do not allo)-3.243 F
652 3.243(wt)-.25 G(hemselv)-3.243 E .743(es to be stopped)-.15 F(lik)72
653 255.6 Q 2.717(et)-.1 G(hat.)-2.717 E F1 -.74(Ty)5.217 G(pe,).74 E F0
654 .217(the Bash answer to)2.717 F F1(which)2.717 E F0(and)2.717 E F1
655 (whence,)2.717 E F0(sho)2.717 E .218(ws what will happen when a w)-.25 F
656 .218(ord is typed as a)-.1 F(command:)72 267.6 Q F3 6($t)97 285.6 S
657 (ype export)-6 E(export is a shell builtin)97 297.6 Q 6($t)97 309.6 S
658 (ype -t export)-6 E(builtin)97 321.6 Q 6($t)97 333.6 S(ype bash)-6 E
659 (bash is /bin/bash)97 345.6 Q 6($t)97 357.6 S(ype cd)-6 E
660 (cd is a function)97 369.6 Q(cd \(\))97 381.6 Q({)97 393.6 Q
661 (builtin cd ${1+"$@"} && xtitle $HOST: $PWD)121 405.6 Q(})97 417.6 Q F0
662 -1.11(Va)72 439.2 S .682(rious modes tell what a command w)1.11 F .681
663 (ord is \(reserv)-.1 F .681(ed w)-.15 F .681(ord, alias, function, b)-.1
664 F .681(uiltin, or \214le\) or which v)-.2 F(er)-.15 E(-)-.2 E 1.15
665 (sion of a command will be e)72 451.2 R -.15(xe)-.15 G 1.15
666 (cuted based on a user').15 F 3.65(ss)-.55 G 1.15(earch path.)-3.65 F
667 1.15(Some of this functionality has been)6.15 F
668 (adopted by POSIX.2 and folded into the)72 463.2 Q F1(command)2.5 E F0
669 (utility)2.5 E(.)-.65 E F1 2.5(4.3. Editing)72 487.2 R(and Completion)
670 2.5 E F0 .682(One area in which Bash shines is command line editing.)97
671 502.8 R .682(Bash uses the)5.682 F F2 -.37(re)3.182 G(adline).37 E F0
672 .681(library to read and)3.181 F .942(edit lines when interacti)72 514.8
673 R -.15(ve)-.25 G 5.942(.R).15 G .942(eadline is a po)-5.942 F .942
674 (werful and \215e)-.25 F .942(xible input f)-.15 F .943
675 (acility that a user can con\214gure to)-.1 F(indi)72 526.8 Q .732
676 (vidual tastes.)-.25 F .732(It allo)5.732 F .732(ws lines to be edited \
677 using either emacs or vi commands, where those commands)-.25 F .2
678 (are appropriate.)72 538.8 R .2
679 (The full capability of emacs is not present \255 there is no w)5.2 F .2
680 (ay to e)-.1 F -.15(xe)-.15 G .2(cute a named command).15 F 1.15
681 (with M-x, for instance \255 b)72 550.8 R 1.15(ut the e)-.2 F 1.149
682 (xisting commands are more than adequate.)-.15 F 1.149
683 (The vi mode is compliant)6.149 F
684 (with the command line editing standardized by POSIX.2.)72 562.8 Q 1.69
685 (Readline is fully customizable.)97 578.4 R 1.691
686 (In addition to the basic commands and k)6.69 F 1.991 -.15(ey b)-.1 H
687 1.691(indings, the library).15 F(allo)72 590.4 Q .028
688 (ws users to de\214ne additional k)-.25 F .327 -.15(ey b)-.1 H .027
689 (indings using a startup \214le.).15 F(The)5.027 E F2(inputr)2.527 E(c)
690 -.37 E F0 .027(\214le, which def)2.527 F .027(aults to the \214le)-.1 F
691 F2(~/.inputr)72 602.4 Q(c)-.37 E F0 3.002(,i)C 3.002(sr)-3.002 G .503(e\
692 ad each time readline initializes, permitting users to maintain a consi\
693 stent interf)-3.002 F .503(ace across a)-.1 F .893(set of programs.)72
694 614.4 R .893(Readline includes an e)5.893 F .893(xtensible interf)-.15 F
695 .892(ace, so each program using the library can add its)-.1 F -.25(ow)72
696 626.4 S 3.56(nb).25 G 1.06(indable commands and program-speci\214c k)
697 -3.56 F 1.361 -.15(ey b)-.1 H 3.561(indings. Bash).15 F 1.061
698 (uses this f)3.561 F 1.061(acility to add bindings that)-.1 F
699 (perform history e)72 638.4 Q(xpansion or shell w)-.15 E(ord e)-.1 E
700 (xpansions on the current input line.)-.15 E .707
701 (Readline interprets a number of v)97 654 R .706
702 (ariables which further tune its beha)-.25 F(vior)-.2 E 5.706(.V)-.55 G
703 .706(ariables e)-6.816 F .706(xist to control)-.15 F .157
704 (whether or not eight-bit characters are directly read as input or con)
705 72 666 R -.15(ve)-.4 G .158(rted to meta-pre\214x).15 F .158(ed k)-.15 F
706 .458 -.15(ey s)-.1 H .158(equences \(a).15 F(meta-pre\214x)72 678 Q .082
707 (ed k)-.15 F .382 -.15(ey s)-.1 H .081(equence consists of the characte\
708 r with the eighth bit zeroed, preceded by the).15 F F2(meta-pr)2.581 E
709 (e\214x)-.37 E F0(character)72 690 Q 3.233(,u)-.4 G .733
710 (sually escape, which selects an alternate k)-3.233 F -.15(ey)-.1 G .734
711 (map\), to decide whether to output characters with).15 F .624
712 (the eighth bit set directly or as a meta-pre\214x)72 702 R .624(ed k)
713 -.15 F .924 -.15(ey s)-.1 H .623
714 (equence, whether or not to wrap to a ne).15 F 3.123(ws)-.25 G .623
715 (creen line)-3.123 F 1.196
716 (when a line being edited is longer than the screen width, the k)72 714
717 R -.15(ey)-.1 G 1.196(map to which subsequent k).15 F 1.496 -.15(ey b)
718 -.1 H(indings).15 E .531(should apply)72 726 R 3.031(,o)-.65 G 3.031(re)
719 -3.031 G -.15(ve)-3.281 G 3.031(nw).15 G .531
720 (hat happens when readline w)-3.031 F .531(ants to ring the terminal')
721 -.1 F 3.03(sb)-.55 G 3.03(ell. All)-3.03 F .53(of these v)3.03 F
722 (ariables)-.25 E 0 Cg EP
723 %%Page: 5 5
724 %%BeginPageSetup
725 BP
726 %%EndPageSetup
727 /F0 10/Times-Roman@0 SF(-5-)282.17 48 Q
728 (can be set in the inputrc \214le.)72 84 Q .284
729 (The startup \214le understands a set of C preprocessor)97 99.6 R(-lik)
730 -.2 E 2.785(ec)-.1 G .285(onditional constructs which allo)-2.785 F
731 2.785(wv)-.25 G(ariables)-3.035 E .12(or k)72 111.6 R .42 -.15(ey b)-.1
732 H .119(indings to be assigned based on the application using readline, \
733 the terminal currently being used, or).15 F .338(the editing mode.)72
734 123.6 R .338(Users can add program-speci\214c bindings to mak)5.338 F
735 2.838(et)-.1 G .338(heir li)-2.838 F -.15(ve)-.25 G 2.838(se).15 G 2.838
736 (asier: I)-2.838 F(ha)2.838 E .639 -.15(ve b)-.2 H .339(indings that).15
737 F(let me edit the v)72 135.6 Q(alue of)-.25 E/F1 10/Times-Bold@0 SF($P)
738 2.5 E -.95(AT)-.74 G(H).95 E F0(and double-quote the current or pre)2.5
739 E(vious w)-.25 E(ord:)-.1 E/F2 10/Courier@0 SF 6(#M)97 153.6 S
740 (acros that are convenient for shell interaction)-6 E($if Bash)97 165.6
741 Q 6(#e)97 177.6 S(dit the path)-6 E
742 ("\\C-xp": "PATH=${PATH}\\e\\C-e\\C-a\\ef\\C-f")97 189.6 Q 6(#p)97 201.6
743 S(repare to type a quoted word -- insert open and close double)-6 E 6
744 (#q)97 213.6 S(uotes and move to just after the open quote)-6 E
745 ("\\C-x\\"": "\\"\\"\\C-b")97 225.6 Q 6(#Q)97 237.6 S
746 (uote the current or previous word)-6 E("\\C-xq": "\\eb\\"\\ef\\"")97
747 249.6 Q($endif)97 261.6 Q F0 .322(There is a readline command to re-rea\
748 d the \214le, so users can edit the \214le, change some bindings, and b\
749 e)72 283.2 R(gin)-.15 E(to use them almost immediately)72 295.2 Q(.)-.65
750 E .518(Bash implements the)97 310.8 R F1(bind)3.018 E F0 -.2(bu)3.018 G
751 .518(iltin for more dynamic control of readline than the startup \214le\
752  permits.).2 F F1(Bind)72 322.8 Q F0 .25(is used in se)2.75 F -.15(ve)
753 -.25 G .25(ral w).15 F 2.75(ays. In)-.1 F/F3 10/Times-Italic@0 SF(list)
754 2.75 E F0 .25(mode, it can display the current k)2.75 F .55 -.15(ey b)
755 -.1 H .25(indings, list all the readline edit-).15 F .149(ing directi)72
756 334.8 R -.15(ve)-.25 G 2.649(sa).15 G -.25(va)-2.849 G .149
757 (ilable for binding, list which k).25 F -.15(ey)-.1 G 2.649(si).15 G
758 -1.9 -.4(nv o)-2.649 H .349 -.1(ke a g).4 H -2.15 -.25(iv e).1 H 2.65
759 (nd).25 G(irecti)-2.65 E -.15(ve)-.25 G 2.65(,o).15 G 2.65(ro)-2.65 G
760 .15(utput the current set of k)-2.65 F -.15(ey)-.1 G .042(bindings in a\
761  format that can be incorporated directly into an inputrc \214le.)72
762 346.8 R(In)5.041 E F3(batc)2.541 E(h)-.15 E F0 .041
763 (mode, it reads a series of)2.541 F -.1(ke)72 358.8 S 2.858(yb)-.05 G
764 .359(indings directly from a \214le and passes them to readline.)-2.858
765 F .359(In its most common usage,)5.359 F F1(bind)2.859 E F0(tak)2.859 E
766 .359(es a sin-)-.1 F 1.117(gle string and passes it directly to readlin\
767 e, which interprets the line as if it had just been read from the)72
768 370.8 R(inputrc \214le.)72 382.8 Q(Both k)5 E .3 -.15(ey b)-.1 H
769 (indings and v).15 E(ariable assignments may appear in the string gi)
770 -.25 E -.15(ve)-.25 G 2.5(nt).15 G(o)-2.5 E F1(bind)2.5 E F0(.)A .53
771 (The readline library also pro)97 398.4 R .53(vides an interf)-.15 F .53
772 (ace for)-.1 F F3(wor)3.03 E 3.03(dc)-.37 G(ompletion)-3.03 E F0 5.53
773 (.W)C .53(hen the)-5.53 F F3(completion)3.03 E F0(character)3.03 E 1.261
774 (\(usually T)72 410.4 R 1.261(AB\) is typed, readline looks at the w)
775 -.93 F 1.26(ord currently being entered and computes the set of \214le-)
776 -.1 F .523(names of which the current w)72 422.4 R .523(ord is a v)-.1 F
777 .523(alid pre\214x.)-.25 F .524
778 (If there is only one possible completion, the rest of the)5.523 F .358
779 (characters are inserted directly)72 434.4 R 2.858(,o)-.65 G .358(therw\
780 ise the common pre\214x of the set of \214lenames is added to the curre\
781 nt)-2.858 F -.1(wo)72 446.4 S 3.199(rd. A).1 F .699(second T)3.199 F
782 .699(AB character entered immediately after a non-unique completion cau\
783 ses readline to list)-.93 F 1.814
784 (the possible completions; there is an option to ha)72 458.4 R 2.113
785 -.15(ve t)-.2 H 1.813(he list displayed immediately).15 F 6.813(.R)-.65
786 G 1.813(eadline pro)-6.813 F(vides)-.15 E .482
787 (hooks so that applications can pro)72 470.4 R .482
788 (vide speci\214c types of completion before the def)-.15 F .483
789 (ault \214lename completion)-.1 F .132(is attempted.)72 482.4 R .132
790 (This is quite \215e)5.132 F .132
791 (xible, though it is not completely user)-.15 F 2.632
792 (-programmable. Bash,)-.2 F .132(for e)2.632 F .132(xample, can)-.15 F
793 .37(complete \214lenames, command names \(including aliases, b)72 494.4
794 R .37(uiltins, shell reserv)-.2 F .37(ed w)-.15 F .37
795 (ords, shell functions, and)-.1 F -.15(exe)72 506.4 S .424
796 (cutables found in the \214le system\), shell v).15 F .424
797 (ariables, usernames, and hostnames.)-.25 F .423
798 (It uses a set of heuristics)5.424 F(that, while not perfect, is genera\
799 lly quite good at determining what type of completion to attempt.)72
800 518.4 Q F1 2.5(4.4. History)72 542.4 R F0 .144
801 (Access to the list of commands pre)97 558 R .144(viously entered \(the)
802 -.25 F F3 .144(command history)2.644 F F0 2.644(\)i)C 2.644(sp)-2.644 G
803 (ro)-2.644 E .144(vided jointly by Bash)-.15 F .078
804 (and the readline library)72 570 R 5.077(.B)-.65 G .077(ash pro)-5.077 F
805 .077(vides v)-.15 F .077(ariables \()-.25 F F1($HISTFILE)A F0(,)A F1
806 ($HISTSIZE)2.577 E F0 2.577(,a)C(nd)-2.577 E F1($HISTCONTR)2.577 E(OL)
807 -.3 E F0 2.577(\)a)C(nd)-2.577 E(the)72 582 Q F1(history)2.759 E F0(and)
808 2.759 E F1(fc)2.759 E F0 -.2(bu)2.759 G .259
809 (iltins to manipulate the history list.).2 F .26(The v)5.259 F .26
810 (alue of)-.25 F F1($HISTFILE)2.76 E F0 .26(speci\214es the \214le where)
811 2.76 F .49(Bash writes the command history on e)72 594 R .489
812 (xit and reads it on startup.)-.15 F F1($HISTSIZE)5.489 E F0 .489
813 (is used to limit the number)2.989 F .642(of commands sa)72 606 R -.15
814 (ve)-.2 G 3.142(di).15 G 3.142(nt)-3.142 G .642(he history)-3.142 F(.)
815 -.65 E F1($HISTCONTR)5.642 E(OL)-.3 E F0(pro)3.142 E .642
816 (vides a crude form of control o)-.15 F -.15(ve)-.15 G 3.142(rw).15 G
817 .642(hich com-)-3.142 F .025(mands are sa)72 618 R -.15(ve)-.2 G 2.525
818 (do).15 G 2.525(nt)-2.525 G .025(he history list: a v)-2.525 F .025
819 (alue of)-.25 F F3(ignor)2.525 E(espace)-.37 E F0 .025(means to not sa)
820 2.525 F .324 -.15(ve c)-.2 H .024(ommands which be).15 F .024
821 (gin with a)-.15 F .927(space; a v)72 630 R .927(alue of)-.25 F F3
822 (ignor)3.427 E(edups)-.37 E F0 .927(means to not sa)3.427 F 1.228 -.15
823 (ve c)-.2 H .928(ommands identical to the last command sa).15 F -.15(ve)
824 -.2 G(d.).15 E F1($HIST)5.928 E(-)-.92 E(CONTR)72 642 Q(OL)-.3 E F0 -.1
825 (wa)3.778 G 3.778(sn).1 G(amed)-3.778 E F1($history_contr)3.778 E(ol)
826 -.18 E F0 1.278(in earlier v)3.778 F 1.278
827 (ersions of Bash; the old name is still accepted for)-.15 F(backw)72 654
828 Q .575(ards compatibility)-.1 F 5.575(.T)-.65 G(he)-5.575 E F1(history)
829 3.075 E F0 .575
830 (command can read or write \214les containing the history list and dis-)
831 3.075 F .167(play the current list contents.)72 666 R(The)5.167 E F1(fc)
832 2.667 E F0 -.2(bu)2.667 G .167(iltin, adopted from POSIX.2 and the K).2
833 F .167(orn Shell, allo)-.35 F .167(ws display and)-.25 F(re-e)72 678 Q
834 -.15(xe)-.15 G .58
835 (cution, with optional editing, of commands from the history list.).15 F
836 .58(The readline library of)5.58 F .58(fers a set of)-.25 F 1.255(comma\
837 nds to search the history list for a portion of the current input line \
838 or a string typed by the user)72 690 R(.)-.55 E(Finally)72 702 Q 2.535
839 (,t)-.65 G(he)-2.535 E F3(history)2.535 E F0(library)2.535 E 2.535(,g)
840 -.65 G .036(enerally incorporated directly into the readline library)
841 -2.535 F 2.536(,i)-.65 G .036(mplements a f)-2.536 F .036(acility for)
842 -.1 F 1.023(history recall, e)72 714 R 1.022(xpansion, and re-e)-.15 F
843 -.15(xe)-.15 G 1.022(cution of pre).15 F 1.022(vious commands v)-.25 F
844 1.022(ery similar to csh \(\231bang history\232, so)-.15 F
845 (called because the e)72 726 Q
846 (xclamation point introduces a history substitution\):)-.15 E 0 Cg EP
847 %%Page: 6 6
848 %%BeginPageSetup
849 BP
850 %%EndPageSetup
851 /F0 10/Times-Roman@0 SF(-6-)282.17 48 Q/F1 10/Courier@0 SF 6($e)97 84 S
852 (cho a b c d e)-6 E 6(abcde)97 96 S 6($!)97 108 S 6(!fghi)-6 G
853 (echo a b c d e f g h i)97 120 Q 6(abcdefghi)97 132 S 6($!)97 144 S(-2)
854 -6 E(echo a b c d e)97 156 Q 6(abcde)97 168 S 6($e)97 180 S(cho !-2:1-4)
855 -6 E(echo a b c d)97 192 Q 6(abcd)97 204 S F0 1.456
856 (The command history is only sa)72 225.6 R -.15(ve)-.2 G 3.957(dw).15 G
857 1.457(hen the shell is interacti)-3.957 F -.15(ve)-.25 G 3.957(,s).15 G
858 3.957(oi)-3.957 G 3.957(ti)-3.957 G 3.957(sn)-3.957 G 1.457(ot a)-3.957
859 F -.25(va)-.2 G 1.457(ilable for use by shell).25 F(scripts.)72 237.6 Q
860 /F2 10/Times-Bold@0 SF 2.5(4.5. New)72 261.6 R(Shell V)2.5 E(ariables)
861 -.92 E F0 .59(There are a number of con)97 277.2 R -.15(ve)-.4 G .589
862 (nience v).15 F .589(ariables that Bash interprets to mak)-.25 F 3.089
863 (el)-.1 G .589(ife easier)-3.089 F 5.589(.T)-.55 G .589(hese include)
864 -5.589 F F2(FIGNORE)72 289.2 Q F0 3.973(,w)C 1.473
865 (hich is a set of \214lename suf)-3.973 F<8c78>-.25 E 1.474
866 (es identifying \214les to e)-.15 F 1.474
867 (xclude when completing \214lenames;)-.15 F F2(HOSTTYPE)72 301.2 Q F0
868 2.932(,w)C .432
869 (hich is automatically set to a string describing the type of hardw)
870 -2.932 F .431(are on which Bash is cur)-.1 F(-)-.2 E .335(rently e)72
871 313.2 R -.15(xe)-.15 G(cuting;).15 E F2(command_oriented_history)2.835 E
872 F0 2.835(,w)C .335(hich directs Bash to sa)-2.835 F .635 -.15(ve a)-.2 H
873 .336(ll lines of a multiple-line com-).15 F 1.071(mand such as a)72
874 325.2 R/F3 10/Times-Italic@0 SF(while)3.571 E F0(or)3.571 E F3(for)3.571
875 E F0 1.071(loop in a single history entry)3.571 F 3.57(,a)-.65 G(llo)
876 -3.57 E 1.07(wing easy re-editing; and)-.25 F F2(IGNOREEOF)3.57 E F0(,)A
877 .747(whose v)72 337.2 R .747(alue indicates the number of consecuti)-.25
878 F 1.047 -.15(ve E)-.25 H .747(OF characters that an interacti).15 F
879 1.048 -.15(ve s)-.25 H .748(hell will read before).15 F -.15(ex)72 349.2
880 S 1.432(iting \255 an easy w).15 F 1.432(ay to k)-.1 F 1.432
881 (eep yourself from being logged out accidentally)-.1 F 6.432(.T)-.65 G
882 (he)-6.432 E F2(auto_r)3.932 E(esume)-.18 E F0 -.25(va)3.932 G(riable)
883 .25 E .571(alters the w)72 361.2 R .571
884 (ay the shell treats simple command names: if job control is acti)-.1 F
885 -.15(ve)-.25 G 3.071(,a).15 G .571(nd this v)-3.071 F .571
886 (ariable is set, sin-)-.25 F(gle-w)72 373.2 Q .239(ord simple commands \
887 without redirections cause the shell to \214rst look for and restart a \
888 suspended job)-.1 F(with that name before starting a ne)72 385.2 Q 2.5
889 (wp)-.25 G(rocess.)-2.5 E F2 2.5(4.6. Brace)72 409.2 R(Expansion)2.5 E
890 F0 .653(Since sh of)97 424.8 R .653(fers no con)-.25 F -.15(ve)-.4 G
891 .653(nient w).15 F .653
892 (ay to generate arbitrary strings that share a common pre\214x or suf)
893 -.1 F<8c78>-.25 E 2.124(\(\214lename e)72 436.8 R 2.124
894 (xpansion requires that the \214lenames e)-.15 F 2.123
895 (xist\), Bash implements)-.15 F F3(br)4.623 E 2.123(ace e)-.15 F
896 (xpansion)-.2 E F0 4.623(,ac)C(apability)-4.623 E(pick)72 448.8 Q .773
897 (ed up from csh.)-.1 F .774(Brace e)5.773 F .774
898 (xpansion is similar to \214lename e)-.15 F .774(xpansion, b)-.15 F .774
899 (ut the strings generated need not)-.2 F 1.211(correspond to e)72 460.8
900 R 1.211(xisting \214les.)-.15 F 3.711(Ab)6.211 G 1.211(race e)-3.711 F
901 1.211(xpression consists of an optional)-.15 F F3(pr)3.71 E(eamble)-.37
902 E F0 3.71(,f)C(ollo)-3.71 E 1.21(wed by a pair of)-.25 F 2.938
903 (braces enclosing a series of comma-separated strings, and an optional)
904 72 472.8 R F3(postamble)5.438 E F0 7.938(.T)C 2.938(he preamble is)
905 -7.938 F(prepended to each string within the braces, and the postamble \
906 is then appended to each resulting string:)72 484.8 Q F1 6($e)97 502.8 S
907 (cho a{d,c,b}e)-6 E(ade ace abe)97 514.8 Q F0 .306(As this e)72 536.4 R
908 .306(xample demonstrates, the results of brace e)-.15 F .305
909 (xpansion are not sorted, as the)-.15 F 2.805(ya)-.15 G .305
910 (re by \214lename e)-2.805 F(xpan-)-.15 E(sion.)72 548.4 Q F2 2.5
911 (4.7. Pr)72 572.4 R(ocess Substitution)-.18 E F0 .457
912 (On systems that can support it, Bash pro)97 588 R .457(vides a f)-.15 F
913 .457(acility kno)-.1 F .458(wn as)-.25 F F3(pr)2.958 E .458
914 (ocess substitution)-.45 F F0 5.458(.P)C .458(rocess sub-)-5.458 F .347
915 (stitution is similar to command substitution in that its speci\214cati\
916 on includes a command to e)72 600 R -.15(xe)-.15 G .346(cute, b).15 F
917 .346(ut the)-.2 F .181(shell does not collect the command')72 612 R
918 2.681(so)-.55 G .181(utput and insert it into the command line.)-2.681 F
919 (Rather)5.181 E 2.681(,B)-.4 G .182(ash opens a pipe)-2.681 F 1.861
920 (to the command, which is run in the background.)72 624 R 1.861
921 (The shell uses named pipes \(FIFOs\) or the)6.861 F F3(/de)4.361 E
922 (v/fd)-.15 E F0 .961(method of naming open \214les to e)72 636 R .962(x\
923 pand the process substitution to a \214lename which connects to the pip\
924 e)-.15 F .104(when opened.)72 648 R .103
925 (This \214lename becomes the result of the e)5.104 F 2.603
926 (xpansion. Process)-.15 F .103(substitution can be used to com-)2.603 F
927 (pare the outputs of tw)72 660 Q 2.5(od)-.1 G(if)-2.5 E(ferent v)-.25 E
928 (ersions of an application as part of a re)-.15 E(gression test:)-.15 E
929 F1 6($c)97 678 S(mp <\(old_prog\) <\(new_prog\))-6 E 0 Cg EP
930 %%Page: 7 7
931 %%BeginPageSetup
932 BP
933 %%EndPageSetup
934 /F0 10/Times-Roman@0 SF(-7-)282.17 48 Q/F1 10/Times-Bold@0 SF 2.5
935 (4.8. Pr)72 84 R(ompt Customization)-.18 E F0 2.229
936 (One of the more popular interacti)97 99.6 R 2.529 -.15(ve f)-.25 H
937 2.229(eatures that Bash pro).15 F 2.23
938 (vides is the ability to customize the)-.15 F 3.234(prompt. Both)72
939 111.6 R F1($PS1)3.234 E F0(and)3.234 E F1($PS2,)3.234 E F0 .734
940 (the primary and secondary prompts, are e)3.234 F .733
941 (xpanded before being displayed.)-.15 F -.15(Pa)72 123.6 S .804
942 (rameter and v).15 F .804(ariable e)-.25 F .805
943 (xpansion is performed when the prompt string is e)-.15 F .805
944 (xpanded, so an)-.15 F 3.305(ys)-.15 G .805(hell v)-3.305 F(ariable)-.25
945 E .729(can be put into the prompt \(e.g.,)72 135.6 R F1($SHL)3.228 E(VL)
946 -.92 E F0 3.228(,w)C .728(hich indicates ho)-3.228 F 3.228(wd)-.25 G
947 .728(eeply the current shell is nested\).)-3.228 F(Bash)5.728 E 1.895(s\
948 pecially interprets characters in the prompt string preceded by a backs\
949 lash.)72 147.6 R 1.895(Some of these backslash)6.895 F .874
950 (escapes are replaced with the current time, the date, the current w)72
951 159.6 R .874(orking directory)-.1 F 3.373(,t)-.65 G .873
952 (he username, and the)-3.373 F .78
953 (command number or history number of the command being entered.)72 171.6
954 R .781(There is e)5.781 F -.15(ve)-.25 G 3.281(nab).15 G .781
955 (ackslash escape to)-3.281 F .007
956 (cause the shell to change its prompt when running as root after an)72
957 183.6 R/F2 10/Times-Italic@0 SF(su)2.507 E F0 5.007(.B)C .007
958 (efore printing each primary prompt,)-5.007 F .305(Bash e)72 195.6 R
959 .305(xpands the v)-.15 F(ariable)-.25 E F1($PR)2.805 E(OMPT_COMMAND)-.3
960 E F0 .305(and, if it has a v)2.805 F .306(alue, e)-.25 F -.15(xe)-.15 G
961 .306(cutes the e).15 F .306(xpanded v)-.15 F .306(alue as)-.25 F 3.735
962 (ac)72 207.6 S 1.235(ommand, allo)-3.735 F 1.234
963 (wing additional prompt customization.)-.25 F -.15(Fo)6.234 G 3.734(re)
964 .15 G 1.234(xample, this assignment causes the current)-3.884 F(user)72
965 219.6 Q 2.917(,t)-.4 G .417
966 (he current host, the time, the last component of the current w)-2.917 F
967 .417(orking directory)-.1 F 2.917(,t)-.65 G .418(he le)-2.917 F -.15(ve)
968 -.25 G 2.918(lo).15 G 2.918(fs)-2.918 G .418(hell nest-)-2.918 F(ing, a\
969 nd the history number of the current command to be embedded into the pr\
970 imary prompt:)72 231.6 Q/F3 10/Courier@0 SF 6($P)97 249.6 S
971 (S1='\\u@\\h [\\t] \\W\($SHLVL:\\!\)\\$ ')-6 E
972 (chet@odin [21:03:44] documentation\(2:636\)$ cd ..)97 261.6 Q
973 (chet@odin [21:03:54] src\(2:637\)$)97 273.6 Q F0 .146(The string being\
974  assigned is surrounded by single quotes so that if it is e)72 295.2 R
975 .146(xported, the v)-.15 F .146(alue of)-.25 F F1($SHL)2.646 E(VL)-.92 E
976 F0(will)2.646 E(be updated by a child shell:)72 307.2 Q F3
977 (chet@odin [21:17:35] src\(2:638\)$ export PS1)97 325.2 Q
978 (chet@odin [21:17:40] src\(2:639\)$ bash)97 337.2 Q
979 (chet@odin [21:17:46] src\(3:696\)$)97 349.2 Q F0
980 (The \\$ escape is displayed as \231)72 370.8 Q F1($)A F0 2.5<9a77>C
981 (hen running as a normal user)-2.5 E 2.5(,b)-.4 G(ut as \231)-2.7 E F1
982 (#)A F0 2.5<9a77>C(hen running as root.)-2.5 E F1 2.5(4.9. File)72 394.8
983 R(System V)2.5 E(iews)-.37 E F0 .029(Since Berk)97 410.4 R(ele)-.1 E
984 2.529(yi)-.15 G .029
985 (ntroduced symbolic links in 4.2 BSD, one of their most anno)-2.529 F
986 .03(ying properties has been)-.1 F .764(the \231w)72 422.4 R .764
987 (arping\232 to a completely dif)-.1 F .764
988 (ferent area of the \214le system when using)-.25 F F1(cd)3.263 E F0
989 3.263(,a)C .763(nd the resultant non-intu-)-3.263 F(iti)72 434.4 Q .704
990 -.15(ve b)-.25 H(eha).15 E .405(vior of \231)-.2 F F1 .405(cd ..)B F0
991 2.905(\232. The)B/F4 9/Times-Roman@0 SF(UNIX)2.905 E F0 -.1(ke)2.905 G
992 .405(rnel treats symbolic links).1 F F2(physically)2.905 E F0 5.405(.W)C
993 .405(hen the k)-5.405 F .405(ernel is translating)-.1 F 3.223(ap)72
994 446.4 S .723(athname in which one component is a symbolic link, it repl\
995 aces all or part of the pathname while pro-)-3.223 F .668
996 (cessing the link.)72 458.4 R .668
997 (If the contents of the symbolic link be)5.668 F .669
998 (gin with a slash, the k)-.15 F .669(ernel replaces the pathname)-.1 F
999 .219(entirely; if not, the link contents replace the current component.)
1000 72 470.4 R .219(In either case, the symbolic link is visible.)5.219 F
1001 .058(If the link v)72 482.4 R .058(alue is an absolute pathname, the us\
1002 er \214nds himself in a completely dif)-.25 F .059
1003 (ferent part of the \214le sys-)-.25 F(tem.)72 494.4 Q .704(Bash pro)97
1004 510 R .704(vides a)-.15 F F2(lo)3.203 E(gical)-.1 E F0(vie)3.203 E 3.203
1005 (wo)-.25 G 3.203(ft)-3.203 G .703(he \214le system.)-3.203 F .703
1006 (In this def)5.703 F .703(ault mode, command and \214lename com-)-.1 F
1007 .522(pletion and b)72 522 R .522(uiltin commands such as)-.2 F F1(cd)
1008 3.022 E F0(and)3.022 E F1(pushd)3.022 E F0 .522
1009 (which change the current w)3.022 F .522(orking directory transpar)-.1 F
1010 (-)-.2 E .127(ently follo)72 534 R 2.627(ws)-.25 G .127
1011 (ymbolic links as if the)-2.627 F 2.627(yw)-.15 G .127(ere directories.)
1012 -2.627 F(The)5.126 E F1($PWD)2.626 E F0 -.25(va)2.626 G .126
1013 (riable, which holds the shell').25 F 2.626(si)-.55 G .126(dea of)-2.626
1014 F .366(the current w)72 546 R .366(orking directory)-.1 F 2.866(,d)-.65
1015 G .367
1016 (epends on the path used to reach the directory rather than its ph)
1017 -2.866 F .367(ysical loca-)-.05 F
1018 (tion in the local \214le system hierarch)72 558 Q 3.8 -.65(y. F)-.05 H
1019 (or e).5 E(xample:)-.15 E F3 6($c)97 576 S 6(d/)-6 G(usr/local/bin)-6 E
1020 6($e)97 588 S(cho $PWD)-6 E(/usr/local/bin)97 600 Q 6($p)97 612 S(wd)-6
1021 E(/usr/local/bin)97 624 Q 6($/)97 636 S(bin/pwd)-6 E
1022 (/net/share/sun4/local/bin)97 648 Q 6($c)97 660 S 6(d.)-6 G(.)-6 E 6($p)
1023 97 672 S(wd)-6 E(/usr/local)97 684 Q 6($/)97 696 S(bin/pwd)-6 E
1024 (/net/share/sun4/local)97 708 Q 6($c)97 720 S 6(d.)-6 G(.)-6 E 0 Cg EP
1025 %%Page: 8 8
1026 %%BeginPageSetup
1027 BP
1028 %%EndPageSetup
1029 /F0 10/Times-Roman@0 SF(-8-)282.17 48 Q/F1 10/Courier@0 SF 6($p)97 84 S
1030 (wd)-6 E(/usr)97 96 Q 6($/)97 108 S(bin/pwd)-6 E(/usr)97 120 Q F0 .3(On\
1031 e problem with this, of course, arises when programs that do not unders\
1032 tand the shell')72 141.6 R 2.8(sl)-.55 G .3(ogical notion of)-2.8 F .217
1033 (the \214le system interpret \231..)72 153.6 R 2.718<9a64>-.7 G(if)
1034 -2.718 E(ferently)-.25 E 5.218(.T)-.65 G .218
1035 (his generally happens when Bash completes \214lenames containing)-5.218
1036 F(\231..)72 165.6 Q 3.384<9a61>-.7 G .884
1037 (ccording to a logical hierarch)-3.384 F 3.384(yw)-.05 G .884
1038 (hich does not correspond to their ph)-3.384 F .883(ysical location.)
1039 -.05 F -.15(Fo)5.883 G 3.383(ru).15 G .883(sers who)-3.383 F
1040 (\214nd this troublesome, a corresponding)72 177.6 Q/F2 10
1041 /Times-Italic@0 SF(physical)2.5 E F0(vie)2.5 E 2.5(wo)-.25 G 2.5(ft)-2.5
1042 G(he \214le system is a)-2.5 E -.25(va)-.2 G(ilable:).25 E F1 6($c)97
1043 195.6 S 6(d/)-6 G(usr/local/bin)-6 E 6($p)97 207.6 S(wd)-6 E
1044 (/usr/local/bin)97 219.6 Q 6($s)97 231.6 S(et -o physical)-6 E 6($p)97
1045 243.6 S(wd)-6 E(/net/share/sun4/local/bin)97 255.6 Q/F3 10/Times-Bold@0
1046 SF 2.5(4.10. Inter)72 285.6 R(nationalization)-.15 E F0 .145
1047 (One of the most signi\214cant impro)97 301.2 R -.15(ve)-.15 G .145
1048 (ments in v).15 F .145(ersion 1.13 of Bash w)-.15 F .145
1049 (as the change to \231eight-bit clean-)-.1 F 2.933(liness\232. Pre)72
1050 313.2 R .433(vious v)-.25 F .432
1051 (ersions used the eighth bit of characters to mark whether or not the)
1052 -.15 F 2.932(yw)-.15 G .432(ere quoted when)-2.932 F 1.495(performing w)
1053 72 325.2 R 1.495(ord e)-.1 F 3.995(xpansions. While)-.15 F 1.495
1054 (this did not af)3.995 F 1.496
1055 (fect the majority of users, most of whom used only)-.25 F(se)72 337.2 Q
1056 -.15(ve)-.25 G 1.236(n-bit ASCII characters, some found it con\214ning.)
1057 .15 F(Be)6.236 E 1.236(ginning with v)-.15 F 1.236
1058 (ersion 1.13, Bash implemented a)-.15 F(dif)72 349.2 Q .02(ferent quoti\
1059 ng mechanism that did not alter the eighth bit of characters.)-.25 F
1060 .021(This allo)5.021 F .021(wed Bash to manipulate)-.25 F .427
1061 (\214les with \231odd\232 characters in their names, b)72 361.2 R .427
1062 (ut did nothing to help users enter those names, so v)-.2 F .426
1063 (ersion 1.13)-.15 F 1.458
1064 (introduced changes to readline that made it eight-bit clean as well.)72
1065 373.2 R 1.458(Options e)6.458 F 1.458(xist that force readline to)-.15 F
1066 .744(attach no special signi\214cance to characters with the eighth bit\
1067  set \(the def)72 385.2 R .744(ault beha)-.1 F .744(vior is to con)-.2 F
1068 -.15(ve)-.4 G .744(rt these).15 F .641(characters to meta-pre\214x)72
1069 397.2 R .641(ed k)-.15 F .941 -.15(ey s)-.1 H .642
1070 (equences\) and to output these characters without con).15 F -.15(ve)-.4
1071 G .642(rsion to meta-pre-).15 F<8c78>72 409.2 Q .008(ed sequences.)-.15
1072 F .007(These changes, along with the e)5.007 F .007(xpansion of k)-.15 F
1073 -.15(ey)-.1 G .007(maps to a full eight bits, enable readline to).15 F
1074 -.1(wo)72 421.2 S(rk with most of the ISO-8859 f).1 E
1075 (amily of character sets, used by man)-.1 E 2.5(yE)-.15 G
1076 (uropean countries.)-2.5 E F3 2.5(4.11. POSIX)72 445.2 R(Mode)2.5 E F0
1077 .584(Although Bash is intended to be POSIX.2 conformant, there are area\
1078 s in which the def)97 460.8 R .584(ault beha)-.1 F(vior)-.2 E .463
1079 (is not compatible with the standard.)72 472.8 R -.15(Fo)5.463 G 2.962
1080 (ru).15 G .462(sers who wish to operate in a strict POSIX.2 en)-2.962 F
1081 .462(vironment, Bash)-.4 F .505(implements a)72 484.8 R F2 .505
1082 (POSIX mode)3.005 F F0 5.505(.W)C .505(hen this mode is acti)-5.505 F
1083 -.15(ve)-.25 G 3.005(,B).15 G .505(ash modi\214es its def)-3.005 F .505
1084 (ault operation where it dif)-.1 F(fers)-.25 E .267
1085 (from POSIX.2 to match the standard.)72 496.8 R .266
1086 (POSIX mode is entered when Bash is started with the)5.267 F F3(-posix)
1087 2.766 E F0(option.)2.766 E .149(This feature is also a)72 508.8 R -.25
1088 (va)-.2 G .149(ilable as an option to the).25 F F3(set)2.649 E F0 -.2
1089 (bu)2.649 G(iltin,).2 E F3 .149(set -o posix)2.649 F F0 5.149(.F)C .149
1090 (or compatibility with other GNU)-5.299 F(softw)72 520.8 Q 4.02(are tha\
1091 t attempts to be POSIX.2 compliant, Bash also enters POSIX mode if the \
1092 v)-.1 F(ariable)-.25 E F3($POSIXL)72 532.8 Q(Y_CORRECT)-.92 E F0 5.824
1093 (is set when Bash is started or assigned a v)8.324 F 5.825
1094 (alue during e)-.25 F -.15(xe)-.15 G(cution.).15 E F3($POSIX_PED)72
1095 544.8 Q(ANTIC)-.35 E F0 .27
1096 (is accepted as well, to be compatible with some older GNU utilities.)
1097 2.77 F .27(When Bash is)5.27 F .506(started in POSIX mode, for e)72
1098 556.8 R .506(xample, it sources the \214le named by the v)-.15 F .507
1099 (alue of)-.25 F F3($ENV)3.007 E F0 .507(rather than the \231nor)3.007 F
1100 (-)-.2 E(mal\232 startup \214les, and does not allo)72 568.8 Q 2.5(wr)
1101 -.25 G(eserv)-2.5 E(ed w)-.15 E(ords to be aliased.)-.1 E F3 2.5(5. New)
1102 72 592.8 R -.25(Fe)2.5 G(atur).25 E(es and Futur)-.18 E 2.5(eP)-.18 G
1103 (lans)-2.5 E F0 1.632(There are se)97 608.4 R -.15(ve)-.25 G 1.632
1104 (ral features introduced in the current v).15 F 1.631(ersion of Bash, v)
1105 -.15 F 1.631(ersion 1.14, and a number)-.15 F .241
1106 (under consideration for future releases.)72 620.4 R .242
1107 (This section will brie\215y detail the ne)5.242 F 2.742(wf)-.25 G .242
1108 (eatures in v)-2.742 F .242(ersion 1.14 and)-.15 F(describe se)72 632.4
1109 Q -.15(ve)-.25 G(ral features that may appear in later v).15 E(ersions.)
1110 -.15 E F3 2.5(5.1. New)72 656.4 R -.25(Fe)2.5 G(atur).25 E
1111 (es in Bash-1.14)-.18 E F0 .884(The ne)97 672 R 3.384(wf)-.25 G .884
1112 (eatures a)-3.384 F -.25(va)-.2 G .884(ilable in Bash-1.14 answer se).25
1113 F -.15(ve)-.25 G .883(ral of the most common requests for enhance-).15 F
1114 2.931(ments. Most)72 684 R(notably)2.931 E 2.931(,t)-.65 G .432(here is\
1115  a mechanism for including non-visible character sequences in prompts, \
1116 such)-2.931 F .136
1117 (as those which cause a terminal to print characters in dif)72 696 R
1118 .135(ferent colors or in standout mode.)-.25 F .135(There w)5.135 F .135
1119 (as noth-)-.1 F .558(ing pre)72 708 R -.15(ve)-.25 G .558
1120 (nting the use of these sequences in earlier v).15 F .559(ersions, b)
1121 -.15 F .559(ut the readline redisplay algorithm assumed)-.2 F
1122 (each character occupied ph)72 720 Q(ysical screen space and w)-.05 E
1123 (ould wrap lines prematurely)-.1 E(.)-.65 E 0 Cg EP
1124 %%Page: 9 9
1125 %%BeginPageSetup
1126 BP
1127 %%EndPageSetup
1128 /F0 10/Times-Roman@0 SF(-9-)282.17 48 Q .13(Readline has a fe)97 84 R
1129 2.63(wn)-.25 G .63 -.25(ew va)-2.63 H .13(riables, se).25 F -.15(ve)-.25
1130 G .13(ral ne).15 F 2.63(wb)-.25 G .13
1131 (indable commands, and some additional emacs mode)-2.63 F(def)72 96 Q
1132 .918(ault k)-.1 F 1.218 -.15(ey b)-.1 H 3.418(indings. A).15 F(ne)3.418
1133 E 3.418(wh)-.25 G .919(istory search mode has been implemented: in this\
1134  mode, readline searches)-3.418 F .336(the history for lines be)72 108 R
1135 .336(ginning with the characters between the be)-.15 F .336
1136 (ginning of the current line and the cursor)-.15 F(.)-.55 E .555(The e)
1137 72 120 R .556(xisting readline incremental search commands no longer ma\
1138 tch identical lines more than once.)-.15 F(File-)5.556 E 1.979
1139 (name completion no)72 132 R 4.479(we)-.25 G 1.979(xpands v)-4.629 F
1140 1.979(ariables in directory names.)-.25 F 1.978(The history e)6.978 F
1141 1.978(xpansion f)-.15 F 1.978(acilities are no)-.1 F(w)-.25 E 1.449
1142 (nearly completely csh-compatible: missing modi\214ers ha)72 144 R 1.749
1143 -.15(ve b)-.2 H 1.449(een added and history substitution has been).15 F
1144 -.15(ex)72 156 S(tended.).15 E(Se)97 171.6 Q -.15(ve)-.25 G .474
1145 (ral of the features described earlier).15 F 2.973(,s)-.4 G .473(uch as)
1146 -2.973 F/F1 10/Times-Bold@0 SF .473(set -o posix)2.973 F F0(and)2.973 E
1147 F1($POSIX_PED)2.973 E(ANTIC)-.35 E F0 2.973(,a)C .473(re ne)-2.973 F
1148 2.973(wi)-.25 G(n)-2.973 E -.15(ve)72 183.6 S .106(rsion 1.14.).15 F
1149 .106(There is a ne)5.106 F 2.606(ws)-.25 G .106(hell v)-2.606 F
1150 (ariable,)-.25 E F1(OSTYPE)2.606 E F0 2.606(,t)C 2.606(ow)-2.606 G .106
1151 (hich Bash assigns a v)-2.606 F .106(alue that identi\214es the v)-.25 F
1152 (er)-.15 E(-)-.2 E 1.38(sion of)72 195.6 R/F2 9/Times-Roman@0 SF(UNIX)
1153 3.88 E F0(it')3.88 E 3.879(sr)-.55 G 1.379(unning on \(great for puttin\
1154 g architecture-speci\214c binary directories into the)-3.879 F F1($P)
1155 3.879 E -.95(AT)-.74 G(H).95 E F0(\).)A -1 -.8(Tw o)72 207.6 T -.25(va)
1156 6.215 G 2.915(riables ha).25 F 3.215 -.15(ve b)-.2 H 2.915(een renamed:)
1157 .15 F F1($HISTCONTR)5.416 E(OL)-.3 E F0(replaces)5.416 E F1
1158 ($history_contr)5.416 E(ol)-.18 E F0 5.416(,a)C(nd)-5.416 E F1
1159 ($HOSTFILE)5.416 E F0(replaces)72 219.6 Q F1
1160 ($hostname_completion_\214le)2.521 E F0 5.021(.I)C 2.521(nb)-5.021 G
1161 .021(oth cases, the old names are accepted for backw)-2.521 F .02
1162 (ards compatibil-)-.1 F(ity)72 231.6 Q 5.788(.T)-.65 G .788(he ksh)
1163 -5.788 F/F3 10/Times-Italic@0 SF(select)3.288 E F0 .788
1164 (construct, which allo)3.288 F .788
1165 (ws the generation of simple menus, has been implemented.)-.25 F(Ne)
1166 5.788 E(w)-.25 E 1.496(capabilities ha)72 243.6 R 1.796 -.15(ve b)-.2 H
1167 1.496(een added to e).15 F 1.495(xisting v)-.15 F(ariables:)-.25 E F1
1168 ($auto_r)3.995 E(esume)-.18 E F0 1.495(can no)3.995 F 3.995(wt)-.25 G
1169 (ak)-3.995 E 3.995(ev)-.1 G 1.495(alues of)-4.245 F F3 -.2(ex)3.995 G
1170 (act).2 E F0(or)3.995 E F3(sub-)3.995 E(string)72 255.6 Q F0 4.843(,a)C
1171 (nd)-4.843 E F1($HISTCONTR)4.843 E(OL)-.3 E F0 2.343(understands the v)
1172 4.843 F(alue)-.25 E F3(ignor)4.844 E(eboth)-.37 E F0 4.844(,w)C 2.344
1173 (hich combines the tw)-4.844 F 4.844(op)-.1 G(re)-4.844 E(viously)-.25 E
1174 1.556(acceptable v)72 267.6 R 4.056(alues. The)-.25 F F1(dirs)4.056 E F0
1175 -.2(bu)4.056 G 1.556(iltin has acquired options to print out speci\214c\
1176  members of the directory).2 F 3.062(stack. The)72 279.6 R F1($nolinks)
1177 3.062 E F0 -.25(va)3.062 G .562(riable, which forces a ph).25 F .562
1178 (ysical vie)-.05 F 3.062(wo)-.25 G 3.062(ft)-3.062 G .563
1179 (he \214le system, has been superseded by the)-3.062 F F1<ad50>72 291.6
1180 Q F0 .494(option to the)2.994 F F1(set)2.994 E F0 -.2(bu)2.994 G .494
1181 (iltin \(equi).2 F -.25(va)-.25 G .494(lent to).25 F F1 .494(set -o ph)
1182 2.994 F(ysical)-.15 E F0 .493(\); the v)B .493
1183 (ariable is retained for backw)-.25 F .493(ards compati-)-.1 F(bility)72
1184 303.6 Q 5.196(.T)-.65 G .196(he v)-5.196 F .196
1185 (ersion string contained in)-.15 F F1($B)2.696 E(ASH_VERSION)-.3 E F0
1186 (no)2.696 E 2.696(wi)-.25 G .196(ncludes an indication of the patch le)
1187 -2.696 F -.15(ve)-.25 G 2.696(la).15 G(s)-2.696 E .85(well as the \231b)
1188 72 315.6 R .85(uild v)-.2 F 3.35(ersion\232. Some)-.15 F .85
1189 (little-used features ha)3.35 F 1.15 -.15(ve b)-.2 H .85(een remo).15 F
1190 -.15(ve)-.15 G 3.35(d: the).15 F F1(by)3.35 E(e)-.1 E F0(synon)3.35 E
1191 .85(ym for)-.15 F F1(exit)3.35 E F0(and)3.35 E(the)72 327.6 Q F1($NO_PR)
1192 3.498 E(OMPT_V)-.3 E(ARS)-1.35 E F0 -.25(va)3.498 G .998
1193 (riable are gone.).25 F .998(There is no)5.998 F 3.498(wa)-.25 G 3.498
1194 (no)-3.498 G -2.19 -.18(rg a)-3.498 H .998
1195 (nized test suite that can be run as a).18 F(re)72 339.6 Q
1196 (gression test when b)-.15 E(uilding a ne)-.2 E 2.5(wv)-.25 G
1197 (ersion of Bash.)-2.65 E 1.696(The documentation has been thoroughly o)
1198 97 355.2 R -.15(ve)-.15 G 1.696(rhauled: there is a ne).15 F 4.196(wm)
1199 -.25 G 1.695(anual page on the readline)-4.196 F .467(library and the)72
1200 367.2 R F3(info)2.967 E F0 .467
1201 (\214le has been updated to re\215ect the current v)2.967 F 2.968
1202 (ersion. As)-.15 F(al)2.968 E -.1(wa)-.1 G .468(ys, as man).1 F 2.968
1203 (yb)-.15 G .468(ugs as possi-)-3.168 F(ble ha)72 379.2 Q .3 -.15(ve b)
1204 -.2 H(een \214x).15 E(ed, although some surely remain.)-.15 E F1 2.5
1205 (5.2. Other)72 403.2 R -.25(Fe)2.5 G(atur).25 E(es)-.18 E F0 1.68
1206 (There are a fe)97 418.8 R 4.18(wf)-.25 G 1.68
1207 (eatures that I hope to include in later Bash releases.)-4.18 F 1.68
1208 (Some are based on w)6.68 F(ork)-.1 E(already done in other shells.)72
1209 430.8 Q .958(In addition to simple v)97 446.4 R .959(ariables, a future\
1210  release of Bash will include one-dimensional arrays, using)-.25 F .206
1211 (the ksh implementation of arrays as a model.)72 458.4 R .205
1212 (Additions to the ksh syntax, such as)5.205 F F3(varname)2.705 E F0 .205
1213 (=\( ... \) to assign)B 2.587(al)72 470.4 S .087(ist of w)-2.587 F .088
1214 (ords directly to an array and a mechanism to allo)-.1 F 2.588(wt)-.25 G
1215 (he)-2.588 E F1 -.18(re)2.588 G(ad).18 E F0 -.2(bu)2.588 G .088
1216 (iltin to read a list of v).2 F .088(alues directly)-.25 F .092
1217 (into an array)72 482.4 R 2.592(,w)-.65 G .092(ould be desirable.)-2.692
1218 F(Gi)5.092 E -.15(ve)-.25 G 2.592(nt).15 G .092(hose e)-2.592 F .092
1219 (xtensions, the ksh)-.15 F F1 .092(set \255A)2.592 F F0 .091
1220 (syntax may not be w)2.591 F .091(orth support-)-.1 F(ing \(the)72 494.4
1221 Q F1<ad41>2.5 E F0(option assigns a list of v)2.5 E(alues to an array)
1222 -.25 E 2.5(,b)-.65 G(ut is a rather peculiar special case\).)-2.7 E .76
1223 (Some shells include a means of)97 510 R F3(pr)3.26 E -.1(og)-.45 G -.15
1224 (ra).1 G(mmable).15 E F0 -.1(wo)3.26 G .76
1225 (rd completion, where the user speci\214es on a per).1 F(-)-.2 E .163
1226 (command basis ho)72 522 R 2.663(wt)-.25 G .163(he ar)-2.663 F .163(gum\
1227 ents of the command are to be treated when completion is attempted: as \
1228 \214le-)-.18 F .194(names, hostnames, e)72 534 R -.15(xe)-.15 G .194
1229 (cutable \214les, and so on.).15 F .195
1230 (The other aspects of the current Bash implementation could)5.195 F .482
1231 (remain as-is; the e)72 546 R .482(xisting heuristics w)-.15 F .481
1232 (ould still be v)-.1 F 2.981(alid. Only)-.25 F .481
1233 (when completing the ar)2.981 F .481(guments to a simple)-.18 F
1234 (command w)72 558 Q(ould the programmable completion be in ef)-.1 E
1235 (fect.)-.25 E .479(It w)97 573.6 R .479(ould also be nice to gi)-.1 F
1236 .779 -.15(ve t)-.25 H .479(he user \214ner).15 F .479
1237 (-grained control o)-.2 F -.15(ve)-.15 G 2.98(rw).15 G .48
1238 (hich commands are sa)-2.98 F -.15(ve)-.2 G 2.98(do).15 G .48(nto the)
1239 -2.98 F 1.786(history list.)72 585.6 R 1.786(One proposal is for a v)
1240 6.786 F 1.786(ariable, tentati)-.25 F -.15(ve)-.25 G 1.786(ly named).15
1241 F F1(HISTIGNORE)4.286 E F0 4.285(,w)C 1.785(hich w)-4.285 F 1.785
1242 (ould contain a)-.1 F .496(colon-separated list of commands.)72 597.6 R
1243 .496(Lines be)5.496 F .496
1244 (ginning with these commands, after the restrictions of)-.15 F F1($HIST)
1245 2.997 E(-)-.92 E(CONTR)72 609.6 Q(OL)-.3 E F0(ha)2.65 E .45 -.15(ve b)
1246 -.2 H .15(een applied, w).15 F .15
1247 (ould not be placed onto the history list.)-.1 F .15
1248 (The shell pattern-matching capa-)5.15 F(bilities could also be a)72
1249 621.6 Q -.25(va)-.2 G(ilable when specifying the contents of).25 E F1
1250 ($HISTIGNORE)2.5 E F0(.)A .729(One thing that ne)97 637.2 R .729
1251 (wer shells such as)-.25 F F1(wksh)3.229 E F0 .729(\(also kno)3.229 F
1252 .729(wn as)-.25 F F1(dtksh)3.23 E F0 3.23(\)p)C(ro)-3.23 E .73
1253 (vide is a command to dynami-)-.15 F 1.189
1254 (cally load code implementing additional b)72 649.2 R 1.189
1255 (uiltin commands into a running shell.)-.2 F 1.188(This ne)6.188 F 3.688
1256 (wb)-.25 G 1.188(uiltin w)-3.888 F(ould)-.1 E(tak)72 661.2 Q 2.875(ea)
1257 -.1 G 2.875(no)-2.875 G .375
1258 (bject \214le or shared library implementing the \231body\232 of the b)
1259 -2.875 F .375(uiltin \()-.2 F F3(xxx_b)A(uiltin\(\))-.2 E F0 .375
1260 (for those f)2.875 F(amiliar)-.1 E .052
1261 (with Bash internals\) and a structure containing the name of the ne)72
1262 673.2 R 2.552(wc)-.25 G .051(ommand, the function to call when the)
1263 -2.552 F(ne)72 685.2 Q 3.458(wb)-.25 G .958(uiltin is in)-3.658 F -.2
1264 (vo)-.4 G -.1(ke).2 G 3.458(d\().1 G .959
1265 (presumably de\214ned in the shared object speci\214ed as an ar)-3.458 F
1266 .959(gument\), and the docu-)-.18 F 1.352
1267 (mentation to be printed by the)72 697.2 R F1(help)3.851 E F0 1.351
1268 (command \(possibly present in the shared object as well\).)3.851 F
1269 1.351(It w)6.351 F(ould)-.1 E(manage the details of e)72 709.2 Q
1270 (xtending the internal table of b)-.15 E(uiltins.)-.2 E 0 Cg EP
1271 %%Page: 10 10
1272 %%BeginPageSetup
1273 BP
1274 %%EndPageSetup
1275 /F0 10/Times-Roman@0 SF(-10-)279.67 48 Q 3.291(Af)97 84 S 1.291 -.25
1276 (ew o)-3.291 H .791(ther b).25 F .791(uiltins w)-.2 F .791
1277 (ould also be desirable: tw)-.1 F 3.291(oa)-.1 G .791(re the POSIX.2)
1278 -3.291 F/F1 10/Times-Bold@0 SF(getconf)3.292 E F0 .792
1279 (command, which prints)3.292 F 1.412(the v)72 96 R 1.412
1280 (alues of system con\214guration v)-.25 F 1.411
1281 (ariables de\214ned by POSIX.2, and a)-.25 F F1(diso)3.911 E(wn)-.1 E F0
1282 -.2(bu)3.911 G 1.411(iltin, which causes a).2 F .547
1283 (shell running with job control acti)72 108 R .847 -.15(ve t)-.25 H
1284 3.047<6f99>.15 G(for)-3.047 E .547
1285 (get about\232 one or more background jobs in its internal jobs ta-)-.18
1286 F 3.866(ble. Using)72 120 R F1(getconf)3.866 E F0 3.866(,f)C 1.366(or e)
1287 -3.866 F 1.366(xample, a user could retrie)-.15 F 1.666 -.15(ve a v)-.25
1288 H 1.365(alue for)-.1 F F1($P)3.865 E -.95(AT)-.74 G(H).95 E F0 1.365
1289 (guaranteed to \214nd all of the)3.865 F .884
1290 (POSIX standard utilities, or \214nd out ho)72 132 R 3.385(wl)-.25 G
1291 .885
1292 (ong \214lenames may be in the \214le system containing a speci\214ed)
1293 -3.385 F(directory)72 144 Q(.)-.65 E 1.521
1294 (There are no implementation timetables for an)97 159.6 R 4.021(yo)-.15
1295 G 4.021(ft)-4.021 G 1.52(hese features, nor are there concrete plans to)
1296 -4.021 F(include them.)72 171.6 Q(If an)5 E(yone has comments on these \
1297 proposals, feel free to send me electronic mail.)-.15 E F1 2.5
1298 (6. Re\215ections)72 195.6 R(and Lessons Lear)2.5 E(ned)-.15 E F0 .433
1299 (The lesson that has been repeated most often during Bash de)97 211.2 R
1300 -.15(ve)-.25 G .433(lopment is that there are dark corners).15 F .181
1301 (in the Bourne shell, and people use all of them.)72 223.2 R .18
1302 (In the original description of the Bourne shell, quoting and)5.181 F
1303 .073(the shell grammar are both poorly speci\214ed and incomplete; subs\
1304 equent descriptions ha)72 235.2 R .373 -.15(ve n)-.2 H .073
1305 (ot helped much.).15 F 1.856(The grammar presented in Bourne')72 247.2 R
1306 4.356(sp)-.55 G 1.856(aper describing the shell distrib)-4.356 F 1.855
1307 (uted with the Se)-.2 F -.15(ve)-.25 G 1.855(nth Edition of).15 F/F2 9
1308 /Times-Roman@0 SF(UNIX)72 259.2 Q F0 2.5<8769>C 2.5(ss)-2.5 G 2.5(of)
1309 -2.5 G(ar of)-2.6 E 2.5(ft)-.25 G(hat it does not allo)-2.5 E 2.5(wt)
1310 -.25 G(he command)-2.5 E/F3 10/Courier@0 SF(who|wc)2.5 E F0 5(.I)C 2.5
1311 (nf)-5 G(act, as T)-2.6 E(om Duf)-.8 E 2.5(fs)-.25 G(tates:)-2.5 E 1.375
1312 (Nobody really kno)97 274.8 R 1.375(ws what the Bourne shell')-.25 F
1313 3.875(sg)-.55 G 1.375(rammar is.)-3.875 F(Ev)6.376 E 1.376(en e)-.15 F
1314 1.376(xamination of the source)-.15 F(code is little help.\210)97 286.8
1315 Q .382(The POSIX.2 standard includes a)72 302.4 R/F4 10/Times-Italic@0
1316 SF(yacc)2.882 E F0 .382
1317 (grammar that comes close to capturing the Bourne shell')2.882 F 2.882
1318 (sb)-.55 G(eha)-2.882 E(vior)-.2 E(,)-.4 E -.2(bu)72 314.4 S 3.246(ti).2
1319 G 3.246(td)-3.246 G(isallo)-3.246 E .747(ws some constructs which sh ac\
1320 cepts without complaint \255 and there are scripts out there that)-.25 F
1321 .501(use them.)72 326.4 R .501(It took a fe)5.501 F 3.001(wv)-.25 G .501
1322 (ersions and se)-3.151 F -.15(ve)-.25 G .501(ral b).15 F .5
1323 (ug reports before Bash implemented sh-compatible quoting,)-.2 F .279
1324 (and there are still some \231le)72 338.4 R -.05(ga)-.15 G .279
1325 (l\232 sh constructs which Bash \215ags as syntax errors.).05 F .28
1326 (Complete sh compatibility)5.28 F(is a tough nut.)72 350.4 Q 1.231
1327 (The shell is bigger and slo)97 366 R 1.231(wer than I w)-.25 F 1.231
1328 (ould lik)-.1 F 1.23(e, though the current v)-.1 F 1.23
1329 (ersion is substantially f)-.15 F(aster)-.1 E .086(than pre)72 378 R
1330 (viously)-.25 E 5.086(.T)-.65 G .087
1331 (he readline library could stand a substantial re)-5.086 F 2.587
1332 (write. A)-.25 F .087(hand-written parser to replace the)2.587 F
1333 (current)72 390 Q F4(yacc)2.978 E F0 .478(-generated one w)B .477
1334 (ould probably result in a speedup, and w)-.1 F .477(ould solv)-.1 F
1335 2.977(eo)-.15 G .477(ne glaring problem:)-2.977 F(the)5.477 E .384
1336 (shell could parse commands in \231$\(...\)\232 constructs as the)72 402
1337 R 2.884(ya)-.15 G .385
1338 (re entered, rather than reporting errors when the)-2.884 F
1339 (construct is e)72 414 Q(xpanded.)-.15 E 1.064(As al)97 429.6 R -.1(wa)
1340 -.1 G 1.064(ys, there is some chaf).1 F 3.564(ft)-.25 G 3.564(og)-3.564
1341 G 3.564(ow)-3.564 G 1.064(ith the wheat.)-3.564 F 1.063
1342 (Areas of duplicated functionality need to be)6.063 F .382(cleaned up.)
1343 72 441.6 R .382(There are se)5.382 F -.15(ve)-.25 G .382
1344 (ral cases where Bash treats a v).15 F .382
1345 (ariable specially to enable functionality a)-.25 F -.25(va)-.2 G
1346 (ilable).25 E .185(another w)72 453.6 R .185(ay \()-.1 F F1($notify)A F0
1347 (vs.)2.684 E F1 .184(set -o notify)5.184 F F0(and)2.684 E F1($nolinks)
1348 2.684 E F0(vs.)2.684 E F1 .184(set -o ph)2.684 F(ysical)-.15 E F0 2.684
1349 (,f)C .184(or instance\); the special treatment)-2.684 F 3.421(of the v)
1350 72 465.6 R 3.421(ariable name should probably be remo)-.25 F -.15(ve)
1351 -.15 G 5.921(d. A).15 F(fe)5.921 E 5.921(wm)-.25 G 3.422
1352 (ore things could stand remo)-5.921 F -.25(va)-.15 G 3.422(l; the).25 F
1353 F1($allo)72 477.6 Q(w_null_glob_expansion)-.1 E F0(and)4.112 E F1
1354 ($glob_dot_\214lenames)4.112 E F0 -.25(va)4.111 G 1.611
1355 (riables are of particularly questionable v).25 F(alue.)-.25 E(The)72
1356 489.6 Q F1($[...])3.977 E F0 1.477(arithmetic e)3.977 F -.25(va)-.25 G
1357 1.478(luation syntax is redundant no).25 F 3.978(wt)-.25 G 1.478
1358 (hat the POSIX-mandated)-3.978 F F1($\(\(...\)\))3.978 E F0 1.478
1359 (construct has)3.978 F .326(been implemented, and could be deleted.)72
1360 501.6 R .326(It w)5.326 F .326(ould be nice if the te)-.1 F .326
1361 (xt output by the)-.15 F F1(help)2.825 E F0 -.2(bu)2.825 G .325
1362 (iltin were e).2 F(xter)-.15 E(-)-.2 E .061
1363 (nal to the shell rather than compiled into it.)72 513.6 R .062
1364 (The beha)5.062 F .062(vior enabled by)-.2 F F1
1365 ($command_oriented_history)2.562 E F0 2.562(,w)C(hich)-2.562 E 1.125
1366 (causes the shell to attempt to sa)72 525.6 R 1.424 -.15(ve a)-.2 H
1367 1.124(ll lines of a multi-line command in a single history entry).15 F
1368 3.624(,s)-.65 G 1.124(hould be)-3.624 F(made the def)72 537.6 Q
1369 (ault and the v)-.1 E(ariable remo)-.25 E -.15(ve)-.15 G(d.).15 E F1 2.5
1370 (7. A)72 561.6 R -.1(va)-1 G(ilability).1 E F0 .047
1371 (As with all other GNU softw)97 577.2 R .047(are, Bash is a)-.1 F -.25
1372 (va)-.2 G .047(ilable for anon).25 F .047(ymous FTP from)-.15 F F4(pr)
1373 2.547 E(ep.ai.mit.edu:/pub/gnu)-.37 E F0 1.05(and from other GNU softw)
1374 72 589.2 R 1.05(are mirror sites.)-.1 F 1.049(The current v)6.049 F
1375 1.049(ersion is in)-.15 F F4(bash-1.14.1.tar)3.549 E(.gz)-1.11 E F0
1376 1.049(in that directory)3.549 F(.)-.65 E(Use)72 601.2 Q F4(ar)5.965 E
1377 -.15(ch)-.37 G(ie).15 E F0 3.465(to \214nd the nearest archi)5.965 F
1378 3.766 -.15(ve s)-.25 H 5.966(ite. The).15 F 3.466(latest v)5.966 F 3.466
1379 (ersion is al)-.15 F -.1(wa)-.1 G 3.466(ys a).1 F -.25(va)-.2 G 3.466
1380 (ilable for FTP from).25 F F4(bash.CWR)72 613.2 Q -.25(U.)-.4 G
1381 (Edu:/pub/dist.).25 E F0(Bash documentation is a)5 E -.25(va)-.2 G
1382 (ilable for FTP from).25 E F4(bash.CWR)2.5 E -.25(U.)-.4 G
1383 (Edu:/pub/bash.).25 E F0 1.169(The Free Softw)97 628.8 R 1.169(are F)-.1
1384 F 1.169(oundation sells tapes and CD-R)-.15 F 1.168
1385 (OMs containing Bash; send electronic mail to)-.4 F F3
1386 (gnu@prep.ai.mit.edu)72 640.8 Q F0(or call)2.5 E F3(+1-617-876-3296)2.5
1387 E F0(for more information.)2.5 E .694(Bash is also distrib)97 656.4 R
1388 .694(uted with se)-.2 F -.15(ve)-.25 G .694(ral v).15 F .694(ersions of)
1389 -.15 F F2(UNIX)3.194 E F0 .694(-compatible systems.)B .695
1390 (It is included as /bin/sh)5.694 F .948(and /bin/bash on se)72 668.4 R
1391 -.15(ve)-.25 G .948(ral Linux distrib).15 F .948
1392 (utions \(more about the dif)-.2 F .948
1393 (ference in a moment\), and as contrib)-.25 F(uted)-.2 E .32 LW 144
1394 678.2 72 678.2 DL/F5 8/Times-Roman@0 SF .781
1395 (\207S. R. Bourne, \231UNIX T)72 688.2 R .781(ime-Sharing System:)-.28 F
1396 .781(The UNIX Shell\232,)4.781 F/F6 8/Times-Italic@0 SF .78
1397 (Bell System T)2.78 F(ec)-.736 E .78(hnical J)-.12 F(ournal)-.2 E F5
1398 2.78(,5)C .78(7\(6\), July-)-2.78 F(August, 1978, pp. 1971-1990.)72
1399 698.2 Q<8854>72 710 Q .431(om Duf)-.64 F .431
1400 (f, \231Rc \255 A Shell for Plan 9 and)-.2 F/F7 7/Times-Roman@0 SF(UNIX)
1401 2.432 E F5(systems\232,)2.432 E F6(Pr)2.432 E .432
1402 (oc. of the Summer 1990 EUUG Confer)-.36 F(ence)-.296 E F5 2.432(,L)C
1403 (on-)-2.432 E(don, July)72 720 Q 2(,1)-.52 G(990, pp. 21-33.)-2 E 0 Cg
1404 EP
1405 %%Page: 11 11
1406 %%BeginPageSetup
1407 BP
1408 %%EndPageSetup
1409 /F0 10/Times-Roman@0 SF(-11-)279.67 48 Q(softw)72 84 Q(are in BSDI')-.1
1410 E 2.5(sB)-.55 G(SD/386* and FreeBSD.)-2.5 E .598(The Linux distrib)97
1411 99.6 R .598(ution deserv)-.2 F .598(es special mention.)-.15 F .598
1412 (There are tw)5.598 F 3.099(oc)-.1 G .599
1413 (on\214gurations included in the stan-)-3.099 F .733(dard Bash distrib)
1414 72 111.6 R .732(ution: a \231normal\232 con\214guration, in which all o\
1415 f the standard features are included, and a)-.2 F .519(\231minimal\232 \
1416 con\214guration, which omits job control, aliases, history and command \
1417 line editing, the directory)72 123.6 R .886(stack and)72 135.6 R/F1 10
1418 /Times-Bold@0 SF(pushd/popd/dirs,)3.386 E F0 .886(process substitution,\
1419  prompt string special character decoding, and the)3.386 F/F2 10
1420 /Times-Italic@0 SF(select)3.385 E F0 3.368(construct. This)72 147.6 R
1421 .868(minimal v)3.368 F .869
1422 (ersion is designed to be a drop-in replacement for the traditional)-.15
1423 F/F3 9/Times-Roman@0 SF(UNIX)3.369 E F0(/bin/sh,)3.369 E
1424 (and is included as the Linux /bin/sh in se)72 159.6 Q -.15(ve)-.25 G
1425 (ral packagings.).15 E F1 2.5(8. Conclusion)72 183.6 R F0 .8
1426 (Bash is a w)97 199.2 R(orth)-.1 E 3.3(ys)-.05 G .8(uccessor to sh.)-3.3
1427 F .8(It is suf)5.8 F .8(\214ciently portable to run on nearly e)-.25 F
1428 -.15(ve)-.25 G .8(ry v).15 F .8(ersion of)-.15 F F3(UNIX)3.299 E F0 .31
1429 (from 4.3 BSD to SVR4.2, and se)72 211.2 R -.15(ve)-.25 G(ral).15 E F3
1430 (UNIX)2.81 E F0 -.1(wo)2.81 G(rkalik).1 E 2.81(es. It)-.1 F .311(is rob)
1431 2.81 F .311(ust enough to replace sh on most of those)-.2 F 1.515
1432 (systems, and pro)72 223.2 R 1.515(vides more functionality)-.15 F 6.515
1433 (.I)-.65 G 4.015(th)-6.515 G 1.515(as se)-4.015 F -.15(ve)-.25 G 1.515
1434 (ral thousand re).15 F 1.515(gular users, and their feedback has)-.15 F
1435 (helped to mak)72 235.2 Q 2.5(ei)-.1 G 2.5(ta)-2.5 G 2.5(sg)-2.5 G
1436 (ood as it is today \255 a testament to the bene\214ts of free softw)
1437 -2.5 E(are.)-.1 E .32 LW 144 710 72 710 DL/F4 8/Times-Roman@0 SF
1438 (*BSD/386 is a trademark of Berk)72 720 Q(ele)-.08 E 2(yS)-.12 G(oftw)-2
1439 E(are Design, Inc.)-.08 E 0 Cg EP
1440 %%Trailer
1441 end
1442 %%EOF