%!PS-Adobe-1.0 %%Creator: devps (Pipeline Associates, Inc.) %%CreationDate: Fri Sep 13 13:03:10 1996 %%Pages: (atend) %%DocumentFonts: (atend) /devps 180 dict def devps begin /res 10.000000 def /y_offset 843 def /X{exch}bind def /mm {transform round X round X itransform} bind def /r{rmoveto}bind def /m{moveto}bind def /l{lineto}bind def /rl{rlineto}bind def /st{stroke}bind def /gs{gsave}bind def /gr{grestore}bind def /cp{currentpoint}bind def /np{newpath}bind def /ct{curveto}bind def systemdict /setpacking known { /savepacking currentpacking def true setpacking } if /m0{0 0 moveto}bind def /xc{//res div}bind def /yc{//res neg div //y_offset add}bind def /lc{yc X xc X l st}bind def /mc{yc X xc X m}bind def /el{gs /a X def a div 1 X scale cp np a xc 2 div 0 360 arc st gr}bind def /ar{cp 7 2 roll np xc 5 1 roll atan 3 1 roll atan X arc st}bind def /sp{yc X xc X 6 2 roll yc X xc X 6 2 roll yc X xc X 6 2 roll ct}bind def /V{//res neg div //y_offset add currentpoint pop X m}bind def /H{//res div 0 transform X round X itransform pop currentpoint X pop moveto}bind def /h{//res div 0 r}bind def /v{//res neg div 0 X r}bind def /S{X H show}bind def /A{H //res div 1 index stringwidth pop sub 1 index length div 0 3 2 roll ashow}bind def /psize 10 def /height 0 def /cheight { height 0 ne { height } { psize } ifelse } bind def /slant 0 def /FF{findfont X dup 30 div 0 mm pop setlinewidth /psize X def [psize 0 cheight slant sin slant cos div mul cheight 0 0] makefont setfont}bind def /shade{gs /dy X def /dx X def np m 0 /dy rl /dx 0 rl 0 /dy neg rl /dx neg 0 rl closepath .9 setgray fill gr}bind def 1 setlinecap /resolution res 72 mul def /startFig { /SavedState save def userdict maxlength dict begin currentpoint transform DocumentInitState setmiterlimit setgray setdash setlinejoin setlinecap setlinewidth setmatrix itransform moveto /ury exch def /urx exch def /lly exch def /llx exch def /y exch 72 mul resolution div def /x exch 72 mul resolution div def currentpoint /cy exch def /cx exch def /sx x urx llx sub div def /sy y ury lly sub div def sx sy scale cx sx div llx sub cy sy div ury sub translate /DefFigCTM matrix currentmatrix def /initmatrix { DefFigCTM setmatrix } def /defaultmatrix { DefFigCTM exch copy } def /initgraphics { DocumentInitState setmiterlimit setgray setdash setlinejoin setlinecap setlinewidth setmatrix DefFigCTM setmatrix } def /showpage { initgraphics } def }bind def /clipFig { currentpoint 6 2 roll newpath 4 copy 4 2 roll moveto 6 -1 roll exch lineto exch lineto exch lineto closepath clip newpath moveto }bind def /doclip { llx lly urx ury clipFig } def /endFig { end SavedState restore }bind def /globalstart { fontnum psize slant height resolution currentpoint pagesave restore gsave }bind def /globalend { grestore moveto /resolution exch def /height exch def /slant exch def /psize exch def /fontnum exch def F /pagesave save def }bind def /fontnum 1 def systemdict /setpacking known { savepacking setpacking} if end /BP{ save mark devps begin m0 /DocumentInitState [ matrix currentmatrix currentlinewidth currentlinecap currentlinejoin currentdash currentgray currentmiterlimit ] cvx def }bind def /EP{ end cleartomark restore showpage}def /Encoding-1 256 array def 0 1 255 {Encoding-1 exch /.notdef put} for Encoding-1 8#301 StandardEncoding 8#101 26 getinterval putinterval %A-B Encoding-1 8#341 StandardEncoding 8#141 26 getinterval putinterval %a-b Encoding-1 8#241 StandardEncoding 8#301 16 getinterval putinterval %accents Encoding-1 8#373 StandardEncoding 8#365 1 getinterval putinterval %dotlessi Encoding-1 dup 8#41 /copyright put dup 8#42 /registered put dup 8#43 /trademark put dup 8#44 /logicalnot put dup 8#45 /Eth put dup 8#46 /eth put dup 8#47 /Thorn put dup 8#50 /thorn put dup 8#51 /brokenbar put dup 8#52 /degree put dup 8#53 /divide put dup 8#54 /multiply put dup 8#55 /minus put dup 8#56 /onehalf put dup 8#57 /onequarter put dup 8#60 /threequarters put dup 8#101 /Aacute put dup 8#102 /Acircumflex put dup 8#103 /Adieresis put dup 8#104 /Agrave put dup 8#105 /Aring put dup 8#106 /Atilde put dup 8#107 /Ccedilla put dup 8#110 /Eacute put dup 8#111 /Ecircumflex put dup 8#112 /Edieresis put dup 8#113 /Egrave put dup 8#114 /Iacute put dup 8#115 /Icircumflex put dup 8#116 /Idieresis put dup 8#117 /Igrave put dup 8#120 /Ntilde put dup 8#121 /Oacute put dup 8#122 /Ocircumflex put dup 8#123 /Odieresis put dup 8#124 /Ograve put dup 8#125 /Otilde put dup 8#126 /Scaron put dup 8#127 /Uacute put dup 8#130 /Ucircumflex put dup 8#131 /Udieresis put dup 8#132 /Ugrave put dup 8#133 /Ydieresis put dup 8#134 /Zcaron put dup 8#135 /aacute put dup 8#136 /acircumflex put dup 8#137 /adieresis put dup 8#140 /agrave put dup 8#141 /aring put dup 8#142 /atilde put dup 8#143 /ccedilla put dup 8#144 /eacute put dup 8#145 /ecircumflex put dup 8#146 /edieresis put dup 8#147 /egrave put dup 8#150 /iacute put dup 8#151 /icircumflex put dup 8#152 /idieresis put dup 8#153 /igrave put dup 8#154 /ntilde put dup 8#155 /oacute put dup 8#156 /ocircumflex put dup 8#157 /odieresis put dup 8#160 /ograve put dup 8#161 /otilde put dup 8#162 /scaron put dup 8#163 /uacute put dup 8#164 /ucircumflex put dup 8#165 /udieresis put dup 8#166 /ugrave put dup 8#167 /ydieresis put dup 8#170 /zcaron put pop /Enc-dict 30 dict def Enc-dict /tmpstr1 50 string put Enc-dict /tmpstr2 50 string put Enc-dict /tmpstr3 50 string dup (Encoding-) exch cvs pop put /AEnc-def { % arguments: the original font's name, encoding nr Enc-dict begin tmpstr2 cvs /Enc-no exch def % Remember the number in a string dup /OrigName exch def % remember the name findfont dup maxlength dict /newdict exch def % get dictionary for new font { exch dup /FID ne { exch newdict 3 1 roll put } { pop pop } % Ignore FID ifelse } forall newdict begin /Encoding tmpstr3 9 Enc-no putinterval tmpstr3 0 9 Enc-no length add getinterval cvn load def % Replace encoding currentdict /UniqueID known { /UniqueID UniqueID Enc-no cvi 49999 mul add def } if % Derive New UniqueID end % newdict /FNlength OrigName tmpstr1 cvs length def % convert name, remember length FNlength 1 add Enc-no length add string dup 0 OrigName tmpstr1 cvs putinterval dup FNlength (-) putinterval dup FNlength 1 add Enc-no putinterval dup 0 tmpstr1 0 FNlength getinterval putinterval % Add old name cvn dup newdict /FontName 3 2 roll put newdict definefont end % Enc-dict } def /Times-Roman 1 AEnc-def pop /R-1{/Times-Roman-1 FF}def /R{/Times-Roman FF}def /B{/Times-Bold FF}def /I{/Times-Italic FF}def %%EndProlog %%Page: 1 1 BP /slant 0 def /height 0 def 480 V 10 R 720(SH)S 857(\()S 899(1)S 957(\))S 2696(Eighth)S (Edition)296 2989 A 4990(SH)S 5127(\()S 5169(1)S 5227(\))S 960 V 9 R 720(N)S 722(NA)S 790(AM)S 858(ME)S 940(E)S 1080 V 10 R 1080(ash,)S 1264(command,)S 1710(getopts,)S 2050(hash,)S 2284(jobs,)S 2501(local,)S 2747(return,)S 3038(setvar,)S 3329(unset)S 10 R-1 3566(-)S 10 R 3648(a)S 3718(shell)S 1248 V 9 R 720(S)S 722(SY)S 774(YN)S 842(NO)S 910(OP)S 978(PS)S 1030(SI)S 1082(IS)S 1115(S)S 1368 V 10 B 1080(ash)S 10 R 1263([)S 10 B 1335(-efIijnsxz)S 10 R 1777(])S 1849([)S 10 B 1921(+efIijnsxz)S 10 R 2386(])S 2458([)S 10 B 2530(-c)S 10 I (command)391 2647 A 10 R 3076(])S 3148([)S 10 I 3220(arg)S 10 R 3397(])S (...)75 3469 A 1536 V 9 R 720(C)S 722(CO)S 784(OP)S 852(PY)S 904(YR)S 972(RI)S 1034(IG)S 1067(GH)S 1135(HT)S 1203(T)S 1656 V 10 R (Copyright)407 1080 A (1989)200 1512 A 1737(by)S 1862(Kenneth)S 2228(Almquist.)S 1824 V 9 R 720(D)S 722(DE)S 790(ES)S 848(SC)S 900(CR)S 962(RI)S 1024(IP)S 1057(PT)S 1109(TI)S 1167(IO)S 1200(ON)S 1268(N)S 1944 V 10 I 1080(Ash)S 10 R 1262(is)S 1360(a)S 1436(version)S 1763(of)S 10 I 1879(sh)S 10 R 2000(with)S 2211(features)S 2563(similar)S 2875(to)S 2985(those)S 3229(of)S 3345(the)S 3500(System)S 3828(V)S 3933(shell.)S 4205(This)S 4416(manual)S 4744(page)S 4966(lists)S 5160(all)S 2064 V 1080(the)S 1228(features)S 1573(of)S 10 I 1682(ash)S 10 R 1846(but)S 1999(concentrates)S 2528(on)S 2653(the)S 2801(ones)S 3010(not)S 3163(in)S 3266(other)S 3498(shells.)S 2304 V 10 B 864(Invocation)S 2472 V 10 R 1080(If)S 1182(the)S 10 B 1339(-c)S 10 R 1452(options)S 1781(is)S 1882(given,)S 2164(then)S 2371(the)S 2529(shell)S 2754(executes)S 3136(the)S 3294(speci\256ed)S 3687(shell)S 3912(command.)S 4393(The)S 10 B 4585(-s)S 10 R 4693(\257ag)S 4879(cause)S 5138(the)S 2592 V 1080(shell)S 1307(to)S 1422(read)S 1633(commands)S 2105(from)S 2338(the)S 2498(standard)S (input)206 2876 A 3118(\(after)S 3374(executing)S 3801(any)S 3982(command)S 4414(speci\256ed)S 4808(with)S 5023(the)S 10 B 5182(-c)S 2712 V 10 R 1080(option.)S 1420(If)S 1522(neither)S 1836(the)S 10 B 1993(-s)S 10 R 2100(or)S 10 B 2219(-c)S 10 R 2333(options)S 2663(are)S 2822(set,)S 2994(then)S 3202(the)S 3360(\256rst)S 10 I 3552(arg)S 10 R 3726(is)S 3828(taken)S 4081(as)S 4200(the)S 4358(name)S 4611(of)S 4730(a)S 4810(\256le)S 4974(to)S 5087(read)S 2832 V 1080(commands)S 1547(from.)S 1825(If)S 1925(this)S 2102(is)S 2201(impossible)S (because)319 2668 A 3019(there)S 3253(are)S 3409(no)S 3541(arguments)S 3991(following)S 4413(the)S 4567(options,)S 4918(then)S 10 I 5122(ash)S 2952 V 10 R (will)157 1080 A 1262(set)S 1399(the)S 10 B 1547(-s)S 10 R 1645(\257ag)S 1821(and)S (will)157 1991 A 2173(read)S 2372(commands)S 2832(from)S 3053(the)S 3201(standard)S (input.)231 3567 A 3120 V 1080(The)S 1266(shell)S 1485(sets)S 1665(the)S (initial)235 1817 A 2081(value)S 2328(of)S 2441(the)S (positional)396 2593 A 3018(parameters)S 3490(from)S 3715(the)S 10 I 3867(arg)S 10 R 4014(s)S 4082(remaining)S 4519(after)S 4734(any)S 10 I 4908(arg)S 10 R 5077(used)S 3240 V 1080(as)S 1189(the)S 1337(name)S 1580(of)S 1689(a)S 1759(\256le)S 1913(of)S 2022(commands)S 2482(is)S 2574(deleted.)S 3408 V 1080(The)S 1264(\257ags)S 1481(\(other)S 1749(than)S 10 B 1949(-c)S 10 R 2028(\))S 2089(are)S 2240(set)S 2379(by)S (preceding)397 2506 A 2930(them)S 3158(with)S (``-'')170 3364 A 3561(and)S 3733(cleared)S 4052(by)S (preceding)397 4179 A 4604(them)S 4833(with)S 5040(``+'';)S 3528 V 1080(see)S 1240(the)S 10 I 1394(set)S 10 R (builtin)262 1537 A 1830(command)S 2257(for)S 2406(a)S 2482(list)S 2636(of)S 2751(\257ags.)S 3022(If)S 3121(no)S 3252(value)S 3501(is)S 3599(speci\256ed)S 3988(for)S 4137(the)S 10 B 4291(-i)S 10 R 4384(\257ag,)S 4590(the)S 10 B 4743(-s)S 10 R 4846(\257ag)S 5027(is)S 5124(set,)S 3648 V 1080(and)S 1253(the)S 1404(standard)S (input)206 1773 A 2007(and)S 2180(output)S 2464(of)S 2576(the)S 2727(shell)S 2945(are)S (connected)408 3097 A 3533(to)S 3639(terminals,)S 4067(then)S 4269(the)S 10 B 4421(-i)S 10 R 4512(\257ag)S (will)157 4692 A 4878(be)S 5002(set.)S 5193(If)S 3768 V 1080(no)S 1205(value)S 1448(is)S 1540(speci\256ed)S 1923(for)S 2066(the)S 10 B 2214(-j)S 10 R 2307(\257ag,)S 2508(then)S 2706(the)S 10 B 2854(-j)S 10 R 2947(\257ag)S (will)157 3123 A 3305(be)S 3425(set)S 3562(if)S 3649(the)S 10 B 3797(-i)S 10 R 3884(\257ag)S 4060(is)S 4152(set.)S 3936 V 1080(When)S 1352(the)S 1507(shell)S 1729(is)S (invoked)323 1828 A 2183(with)S 2394(the)S 10 B 2549(-c)S 10 R 2660(option,)S 2973(it)S 3061(is)S (good)200 3160 A 3392(practice)S 3744(to)S 3854(include)S 4182(the)S 10 I 4337(-i)S 10 R 4431(\257ag)S 4614(if)S 4709(the)S 4865(command)S 4056 V 1080(was)S 1274(entered)S 1608(interactively)S 2149(by)S 2286(a)S 2368(user.)S 2623(For)S (compatibility)536 2800 A 3373(with)S 3589(the)S 3749(System)S 4082(V)S 4192(shell,)S 4444(the)S 10 I 4604(-i)S 10 R 4702(option)S (should)267 4994 A 4176 V 1080(come)S 1323(after)S 1534(the)S 10 B 1682(-c)S 10 R 1786(option.)S 4344 V 1080(If)S 1179(the)S 1333(\256rst)S 1521(character)S 1923(of)S 2038(argument)S 2449(zero)S 2654(to)S 2763(the)S 2917(shell)S 3138(is)S (``-'',)195 3236 A 3463(the)S 3618(shell)S 3840(is)S 3939(assumed)S 4317(to)S 4427(be)S 4554(a)S 4631(login)S 4869(shell,)S 5116(and)S 4464 V 1080(the)S 1237(\256les)S 10 B 1439(/etc/pro\256le)S 10 R 1933(and)S 10 B 2112(.pro\256le)S 10 R 2451(are)S 2609(read)S 2817(if)S 2913(they)S 3120(exist.)S 3394(If)S 3496(the)S 3652(environment)S 4193(variable)S 4551(SHINIT)S 4916(is)S 5016(set)S 5161(on)S 4584 V 1080(entry)S 1318(to)S 1427(the)S 1581(shell,)S 1827(the)S 1982(commands)S 2449(in)S 2559(SHINIT)S 2923(are)S 3079(normally)S 3474(parsed)S 3769(and)S 3946(executed.)S 4386(SHINIT)S 4750(is)S 4849(not)S 5009(exam-)S 4704 V 1080(ined)S 1281(if)S 1371(the)S 1522(shell)S 1740(is)S 1835(a)S 1908(login)S 2142(shell,)S 2385(or)S 2497(if)S 2587(it)S 2671(the)S 2822(shell)S 3040(is)S (running)312 3135 A 3475(a)S 3548(shell)S 3766(procedure.)S 4272(\(A)S 4407(shell)S 4625(is)S 4720(considered)S 5183(to)S 4824 V 1080(be)S (running)312 1200 A 1537(a)S 1607(shell)S 1822(procedure)S 2250(if)S 2337(neither)S 2642(the)S 10 B 2790(-s)S 10 R 2888(nor)S 3047(the)S 10 B 3195(-c)S 10 R 3299(options)S 3619(are)S 3768(set.\))S 5064 V 10 B 864(Control)S 1225(Structures)S 5232 V 10 R 1080(A)S 10 I 1181(list)S 10 R 1332(is)S 1427(a)S 1500(sequence)S 1897(of)S 2009(zero)S 2211(or)S 2323(more)S 2558(commands)S 3021(separated)S 3430(by)S 3558(newlines,)S 3969(semicolons,)S 4474(or)S 4587(ampersands,)S 5116(and)S 5352 V 1080(optionally)S 1522(terminated)S 1988(by)S 2123(one)S 2303(of)S 2422(these)S 2664(three)S 2901(characters.)S 3396(\(This)S 3644(differs)S 3942(from)S 4172(the)S 4329(System)S 4659(V)S 4766(shell,)S 5015(which)S 5472 V 1080(requires)S 1433(a)S 1506(list)S 1657(to)S 1763(contain)S 2088(at)S 2190(least)S 2404(one)S 2578(command)S 3003(in)S 3110(most)S 3334(cases.\))S 3660(The)S 3846(commands)S 4310(in)S 4417(a)S 4491(list)S 4643(are)S 4796(executed)S 5183(in)S 5592 V 1080(the)S 1232(order)S 1473(they)S 1674(are)S (written.)311 1826 A 2190(If)S 2286(command)S 2710(is)S 2805(followed)S 3191(by)S 3319(an)S 3442(ampersand,)S 3931(the)S 4082(shell)S 4300(starts)S 4541(the)S 4692(command)S 5116(and)S 5712 V 1080(immediately)S (proceed)319 1614 A 1964(onto)S 2174(the)S 2329(next)S 2534(command;)S 2990(otherwise)S 3414(it)S 3502(waits)S 3747(for)S 3897(the)S 4052(command)S 4480(to)S 4590(terminate)S 5003(before)S 5832 V (proceeding)447 1080 A 1552(to)S 1655(the)S 1803(next)S 2001(one.)S 6000 V 1080(``&&'')S 1417(and)S 1607(``||'')S 1828(are)S 1997(binary)S 2299(operators.)S 2769(``&&'')S 3106(executes)S 3498(the)S 3666(\256rst)S 3868(command,)S 4335(and)S 4526(then)S 4745(executes)S 5138(the)S 6120 V (second)279 1080 A 1401(command)S 1839(iff)S 1977(the)S 2142(exit)S 2335(status)S 2606(of)S 2732(the)S 2897(\256rst)S 3096(command)S 3534(is)S 3643(zero.)S 3909(``||'')S 4127(is)S 4235(similar,)S 4581(but)S 4750(executes)S 5138(the)S 6240 V (second)279 1080 A 1394(command)S 1825(iff)S 1956(the)S 2114(exit)S 2300(status)S 2564(of)S 2683(the)S 2841(\256rst)S 3033(command)S 3464(is)S (nonzero.)349 3567 A 3977(``&&'')S 4305(and)S 4486(``||'')S 4698(both)S 4912(have)S 5138(the)S 6360 V 1080(same)S 1312(priority.)S 6528 V 1080(The)S 1272(``|'')S 1463(operator)S 1834(is)S 1937(a)S 2018(binary)S 2311(operator)S 2683(which)S 2965(feeds)S 3214(the)S 3373(standard)S 3750(output)S 4042(of)S 4162(the)S 4321(\256rst)S 4514(command)S 4946(into)S 5138(the)S 6648 V 1080(standard)S (input)206 1460 A 1705(of)S 1828(the)S (second)279 1990 A 2308(command.)S 2792(The)S 2987(exit)S 3176(status)S 3443(of)S 3565(the)S 3726(``|'')S 3920(operator)S 4294(is)S 4399(the)S 4560(exit)S 4749(status)S 5016(of)S 5138(the)S 6768 V (second)279 1080 A 1384(command.)S 1855(``|'')S 2036(has)S 2195(a)S 2265(higher)S 2547(priority)S 2874(than)S 3072(``||'')S 3273(or)S 3382(``&&''.)S 6936 V 1080(An)S 10 I 1228(if)S 10 R 1309(command)S (looks)217 1730 A 1972(like)S 7176 V 10 B 1480(if)S 10 R 1567(list)S 7296 V 10 B 1480(then)S 10 R 1840(list)S 7416 V 1421([)S 10 B 1480(elif)S 10 R 1640(list)S 7536 V 10 B 1530(then)S 10 R 1840(list)S 1988(])S (...)75 2047 A 7903 V 720(Page)S 941(1)S 2654(\()S 2696(March)S 2984(7,)S (1991)200 3084 A 3292(\))S 4455(September)S 4911(13,)S (1996)200 5061 A 8143 V EP %%Page: 2 2 BP /slant 0 def /height 0 def 480 V 10 R 720(SH)S 857(\()S 899(1)S 957(\))S 2696(Eighth)S (Edition)296 2989 A 4990(SH)S 5127(\()S 5169(1)S 5227(\))S 960 V 1421([)S 10 B 1480(else)S 10 R 1781(list)S 1929(])S 1080 V 10 B 1480(\256)S 1368 V 10 R 1080(A)S 10 I 1178(while)S 10 R 1421(command)S (looks)217 1842 A 2084(like)S 1608 V 10 B 1480(while)S 10 R 1735(list)S 1728 V 10 B 1480(do)S 10 R 1840(list)S 1848 V 10 B 1480(done)S 2088 V 10 R 1080(The)S 1263(two)S 1440(lists)S 1628(are)S 1778(executed)S 2162(repeatedly)S 2608(while)S 2858(the)S 3007(exit)S 3184(status)S 3439(of)S 3549(the)S 3698(\256rst)S 3881(list)S 4031(is)S 4125(zero.)S 4376(The)S 10 I (until)184 4560 A 10 R 4771(command)S 5194(is)S 2208 V 1080(similar,)S 1410(but)S 1563(has)S 1722(the)S 1870(word)S 10 B 2102(until)S 10 R 2329(in)S (place)213 2432 A 2670(of)S 10 B 2779(while)S 2328 V 10 R 1105(repeats)S (until)184 1416 A 1625(the)S 1773(exit)S 1949(status)S 2203(of)S 2312(the)S 2460(\256rst)S 2642(list)S 2790(is)S 2882(zero.)S 2496 V 1080(The)S 10 I 1262(for)S 10 R 1404(command)S (looks)217 1825 A 2067(like)S 2736 V 10 B 1480(for)S 10 R 1634(variable)S 10 B 1984(in)S 10 R (word...)282 2093 A 2856 V 10 B 1480(do)S 10 R 1840(list)S 2976 V 10 B 1480(done)S 3216 V 10 R 1080(The)S 1267(words)S 1543(are)S 1697(expanded,)S 2137(and)S 2312(then)S 2515(the)S 2668(list)S 2821(is)S 2918(executed)S 3306(repeatedly)S 3757(with)S 3967(the)S 4121(variable)S 4477(set)S 4620(to)S (each)185 4729 A 4945(word)S 5183(in)S 3336 V 1080(turn.)S 10 B 1317(do)S 10 R 1448(and)S 10 B 1618(done)S 10 R 1850(may)S 2048(be)S (replaced)342 2168 A 2535(with)S 2739(``{'')S 2948(and)S 3118(``}''.)S 3504 V 1080(The)S 10 I 1262(break)S 10 R 1516(and)S 10 I 1686(continue)S 10 R 2057(commands)S (look)178 2517 A 2720(like)S 3744 V 10 B 1480(break)S 10 R 1757([)S 1816(num)S 2019(])S 3864 V 10 B 1480(continue)S 10 R 1875([)S 1934(num)S 2137(])S 4104 V 10 I 1080(Break)S 10 R 1353(terminates)S 1805(the)S 10 I 1960(num)S 10 R 2165(innermost)S 10 I 2599(for)S 10 R 2748(or)S 10 I 2864(while)S 10 R (loops.)242 3115 A 10 I 3415(Continue)S 10 R 3816(continues)S 4234(with)S 4446(the)S 4602(next)S 4808(iteration)S 5177(of)S 4224 V 1080(the)S 10 I 1228(num'th)S 10 R 1538(innermost)S (loop.)203 1965 A 2218(These)S 2484(are)S 2633(implemented)S 3183(as)S (builtin)262 3292 A 3579(commands.)S 4392 V 1080(The)S 10 I 1262(case)S 10 R 1466(command)S (looks)217 1887 A 2129(like)S 4632 V 10 B 1480(case)S 10 R 1684(word)S 10 B 1916(in)S 4752 V 10 R 1480(pattern)S 10 B 1760(\))S 10 R 1819(list)S 10 B 1967(;;)S 4872 V 10 R (...)75 1480 A 4992 V 10 B 1480(esac)S 5232 V 10 R 1080(The)S 1262(pattern)S 1567(can)S 1732(actually)S 2076(be)S 2196(one)S 2366(or)S 2475(more)S 2707(patterns)S 3051(\(see)S 10 I 3239(Patterns)S 10 R 3605(below\),)S 3935(separated)S 4341(by)S 4466(``|'')S 4647(characters.)S 5400 V 1080(Commands)S 1562(may)S 1760(be)S (grouped)329 1880 A 2234(by)S (writing)291 2359 A 2675(either)S 5640 V 10 B 1480(\()S 10 R 1514(list)S 10 B 1637(\))S 5880 V 10 R 1080(or)S 6120 V 10 B 1480({)S 10 R 1545(list;)S 10 B 1721(})S 6360 V 10 R 1080(The)S 1262(\256rst)S 1444(of)S 1553(these)S 1785(executes)S 2157(the)S 2305(commands)S 2765(in)S 2868(a)S 2938(subshell.)S 6528 V 1080(A)S 1178(function)S (de\256nition)385 1538 A (looks)217 1948 A 2190(like)S 6768 V 1480(name)S 10 B 1723(\()S 1782(\))S 10 R 1841(command)S 7008 V 1080(A)S 1182(function)S (de\256nition)385 1546 A 1960(is)S 2056(an)S 2180(executable)S 2640(statement;)S 3083(when)S 3330(executed)S 3717(it)S 3802(installs)S 4116(a)S 4190(function)S 4554(named)S 10 B 4851(name)S 10 R 5116(and)S 7128 V 1080(returns)S 1385(an)S 1505(exit)S 1681(status)S 1935(of)S 2044(zero.)S 2293(The)S 2475(command)S 2896(is)S 2988(normally)S 3376(a)S 3446(list)S 3594(enclosed)S 3971(between)S 4332(``{'')S 4541(and)S 4711(``}''.)S 7296 V 1080(Variables)S 1497(may)S 1700(be)S 1825(declared)S 2197(to)S 2305(be)S 2430(local)S 2656(to)S 2764(a)S 2839(function)S 3205(by)S 3336(using)S 3584(a)S 10 I 3660(local)S 10 R 3892(command.)S 4369(This)S (should)267 4579 A 4877(appear)S 5177(as)S 7416 V 1080(the)S 1228(\256rst)S 1410(staement)S 1793(of)S 1902(a)S 1972(function,)S 2357(and)S (looks)217 2527 A 2769(like)S 7903 V 720(September)S 1176(13,)S (1996)200 1326 A 2654(\()S 2696(March)S 2984(7,)S (1991)200 3084 A 3292(\))S 4990(Page)S 5211(2)S 8143 V EP %%Page: 3 3 BP /slant 0 def /height 0 def 480 V 10 R 720(SH)S 857(\()S 899(1)S 957(\))S 2696(Eighth)S (Edition)296 2989 A 4990(SH)S 5127(\()S 5169(1)S 5227(\))S 960 V 10 B 1480(local)S 10 R 1706([)S 1765(variable)S 2115(|)S 10 B 2160(-)S 10 R 2219(])S (...)75 2278 A 1200 V 10 I 1080(Local)S 10 R 1334(is)S 1426(implemented)S 1976(as)S 2085(a)S (builtin)262 2155 A 2442(command.)S 1368 V 1080(When)S 1356(a)S 1438(variable)S 1800(is)S 1904(made)S 2159(local,)S 2417(it)S 2510(inherits)S 2849(the)S (initial)235 3009 A 3281(value)S 3536(and)S (exported)352 3718 A 4107(and)S (readonly)352 4289 A 4678(\257ags)S 4905(from)S 5138(the)S 1488 V 1080(variable)S 1439(with)S 1652(the)S 1809(same)S 2050(name)S 2302(in)S 2414(the)S (surrounding)485 2571 A 3089(scope,)S 3376(if)S 3471(there)S 3706(is)S 3806(one.)S 4034(Otherwise,)S 4507(the)S 4663(variable)S 5021(is)S 5121(ini-)S 1608 V 1080(tially)S 1321(unset.)S 10 I 1617(Ash)S 10 R 1802(uses)S (dynamic)346 2009 A 2389(scoping,)S 2760(so)S 2883(that)S 3068(if)S (you)150 3164 A 3349(make)S 3602(the)S 3760(variable)S 10 B 4120(x)S 10 R 4205(local)S 4436(to)S 4549(function)S 10 I 4919(f)S 10 R 4955(,)S 5015(which)S 1728 V 1080(then)S 1289(calls)S 1510(function)S 10 I 1881(g)S 10 R 1939(,)S 2000(references)S 2452(to)S 2566(the)S 2725(variable)S 10 B 3086(x)S 10 R 3171(made)S 3424(inside)S 10 I 3699(g)S 10 R (will)157 3784 A 3976(refer)S 4203(to)S 4316(the)S 4474(variable)S 10 B 4834(x)S 10 R 4919(declared)S 1848 V 1080(inside)S 10 I 1345(f)S 10 R 1381(,)S 1431(not)S 1584(to)S 1687(the)S 1835(global)S 2111(variable)S 2461(named)S 10 B 2754(x)S 10 R 2804(.)S 2016 V 1080(The)S 1263(only)S 1467(special)S 1773(parameter)S 2203(than)S 2402(can)S 2568(be)S 2689(made)S 2933(local)S 3155(is)S 3248(``)S 10 B 3316(-)S 10 R 3350(''.)S 3494(Making)S 3832(``)S 10 B 3900(-)S 10 R 3934('')S 4028(local)S 4250(any)S 4421(shell)S 4637(options)S 4959(that)S 5137(are)S 2136 V 1080(changed)S 1445(via)S 1598(the)S 10 I 1751(set)S 10 R 1893(command)S 2319(inside)S 2589(the)S 2742(function)S 3107(to)S 3215(be)S 3340(restored)S 3695(to)S 3803(their)S 4018(original)S 4361(values)S 4648(when)S 4896(the)S 5048(func-)S 2256 V 1080(tion)S 1261(returns.)S 2424 V 1080(The)S 10 I 1262(return)S 10 R 1538(command)S (looks)217 1959 A 2201(like)S 2664 V 10 B 1480(return)S 10 R 1786([)S 1845(exitstatus)S 2250(])S 2904 V 1080(It)S 1167(terminates)S 1612(the)S 1760(currently)S 2149(executing)S 2565(function.)S 10 I 2975(Return)S 10 R 3274(is)S 3366(implemented)S 3916(as)S 4025(a)S (builtin)262 4095 A 4382(command.)S 3144 V 10 B 864(Simple)S 1186(Commands)S 3312 V 10 R 1080(A)S 1182(simple)S 1479(command)S 1904(is)S 2000(a)S 2074(sequence)S 2472(of)S 2585(words.)S 2911(The)S 3098(execution)S 3519(of)S 3633(a)S 3708(simple)S 4006(command)S (proceeds)358 4432 A 4820(as)S 4934(follows.)S 3432 V 1080(First,)S 1317(the)S 1467(leading)S 1790(words)S 2063(of)S 2174(the)S 2324(form)S 2547(``name=value'')S 3203(are)S 3353(stripped)S 3703(off)S 3847(and)S 4018(assigned)S 4390(to)S 4494(the)S 4643(environment)S 5177(of)S 3552 V 1080(the)S 1235(command.)S (Second,)321 1713 A 2066(the)S 2221(words)S 2499(are)S 2655(expanded.)S 3122(Third,)S 3403(the)S 3559(\256rst)S 3749(remaining)S 4190(word)S 4430(is)S 4530(taken)S 4781(as)S 4898(the)S 5054(com-)S 3672 V 1080(mand)S 1337(name)S 1589(that)S 1774(command)S 2204(is)S 2305(located.)S 2680(Fourth,)S 3007(any)S 3186(redirections)S 3695(are)S 3852(performed.)S 4355(Fifth,)S 4609(the)S 4765(command)S 5194(is)S 3792 V 1080(executed.)S 1513(We)S (look)178 1678 A 1881(at)S 1979(these)S 2211(operations)S 2655(in)S 2758(reverse)S 3075(order.)S 3960 V 1080(The)S 1265(execution)S 1685(of)S 1798(the)S 1950(command)S 2375(varies)S 2645(with)S 2853(the)S 3005(type)S 3207(of)S 3320(command.)S 3795(There)S 4060(are)S 4213(three)S 4444(types)S 4685(of)S 4798(commands:)S 4080 V 1080(shell)S 1295(functions,)S (builtin)262 1719 A 2006(commands,)S 2491(and)S 2661(normal)S 2971(programs.)S 4248 V 1080(When)S 1359(a)S 1443(shell)S 1672(function)S 2047(is)S 2154(executed,)S 2577(all)S 2718(of)S 2842(the)S 3005(shell)S (positional)396 3235 A 3671(parameters)S 4154(\(except)S 4491($0,)S 4656(which)S 4942(remains)S 4368 V 1080(unchanged\))S 1577(are)S 1729(set)S 1869(to)S 1975(the)S 2126(parameters)S 2597(to)S 2703(the)S 2854(shell)S 3072(function.)S 3485(The)S 3670(variables)S 4062(which)S 4335(are)S (explicitly)380 4486 A (placed)263 4893 A 5183(in)S 4488 V 1080(the)S 1232(environment)S 1769(of)S 1882(the)S 2034(command)S 2459(\(by)S 2622(placing)S 2947(assignments)S 3467(to)S 3574(them)S 3804(before)S 4091(the)S 4243(function)S 4607(name\))S 4889(are)S 5043(made)S 4608 V 1080(local)S 1306(to)S 1413(the)S 1565(function)S 1929(and)S 2103(are)S 2256(set)S 2397(to)S 2504(values)S 2790(given.)S 3092(Then)S 3328(the)S 3480(command)S 3905(given)S 4157(in)S 4264(the)S 4416(function)S (de\256nition)385 4780 A 5194(is)S 4728 V 1080(executed.)S 1513(The)S (positional)396 1695 A 2116(parameters)S 2584(are)S 2733(restored)S 3083(to)S 3186(their)S 3396(original)S 3734(values)S 4016(when)S 4259(the)S 4407(command)S 4828(completes.)S 4896 V 1080(Shell)S (builtins)301 1312 A 1638(are)S 1787(executed)S 2170(internally)S 2581(to)S 2684(the)S 2832(shell,)S (without)307 3072 A 3404(spawning)S 3814(a)S 3884(new)S 4077(process.)S 5064 V 1080(When)S 1367(a)S 1459(normal)S 1791(program)S 2179(is)S 2293(executed,)S 2723(the)S 2893(shell)S 3130(runs)S 3350(the)S 3520(program,)S 3934(passing)S 4283(the)S 4454(parameters)S 4945(and)S 5138(the)S 5184 V 1080(environment)S 1616(to)S 1722(the)S 1873(program.)S 2292(If)S 2388(the)S 2539(program)S 2907(is)S 3001(a)S 3073(shell)S 3290(procedure,)S 3745(the)S 3895(shell)S (will)157 4112 A 4296(interpret)S 4665(the)S 4815(program)S 5183(in)S 5304 V 1080(a)S 1156(subshell.)S 1566(The)S 1754(shell)S (will)157 1975 A (reinitialize)432 2163 A 2626(itself)S 2859(in)S 2968(this)S 3144(case,)S 3374(so)S 3494(that)S 3676(the)S 3830(effect)S (will)157 4092 A 4280(be)S 4407(as)S 4523(if)S 4617(a)S 4694(new)S 4894(shell)S 5116(had)S 5424 V 1080(been)S (invoked)323 1299 A 1651(to)S 1758(handle)S 2055(the)S 2207(shell)S 2426(procedure,)S 2883(except)S 3175(that)S 3355(the)S 3506(location)S 3858(of)S 3970(commands)S 4433(located)S 4752(in)S 4858(the)S 5009(parent)S 5544 V 1080(shell)S (will)157 1300 A 1487(be)S 1612(remembered)S 2146(by)S 2276(the)S 2429(child.)S 2710(If)S 2808(the)S 2961(program)S 3332(is)S 3429(a)S 3505(\256le)S 3665(beginning)S 4097(with)S (``#!'',)245 4307 A 4583(the)S 4737(remainder)S 5177(of)S 5664 V 1080(the)S 1233(\256rst)S 1420(line)S 1601(speci\256es)S 1978(an)S 2103(interpreter)S 2554(for)S 2702(the)S 2855(program.)S 3276(The)S 3463(shell)S 3683(\(or)S 3831(the)S 3984(operating)S 4394(system,)S (under)229 4728 A 4986(Berke-)S 5784 V 1080(ley)S 1239(UNIX\))S (will)157 1562 A 1755(run)S 1926(the)S 2086(interpreter)S 2544(in)S 2659(this)S 2841(case.)S 3102(The)S 3296(arguments)S 3752(to)S 3867(the)S 4027(interpreter)S (will)157 4485 A 4679(consist)S 4995(of)S 5116(any)S 5904 V 1080(arguments)S 1526(given)S 1776(on)S 1903(the)S 2053(\256rst)S 2237(line)S 2415(of)S 2526(the)S 2676(program,)S 3069(followed)S 3454(by)S 3581(the)S 3731(name)S 3976(of)S 4087(the)S 4236(program,)S 4628(followed)S 5012(by)S 5138(the)S 6024 V 1080(arguments)S 1524(passed)S 1817(to)S 1920(the)S 2068(program.)S 6264 V 10 B (Redirection)505 864 A 6432 V 10 R (Input/output)496 1080 A 1601(redirections)S 2102(can)S 2268(be)S 2389(intermixed)S 2851(with)S 3056(the)S 3205(words)S 3477(in)S 3581(a)S 3652(simple)S 3946(command)S 4368(and)S 4539(can)S 4705(be)S (placed)263 4826 A 5115(fol-)S 6552 V 1080(lowing)S 1390(any)S 1566(of)S 1681(the)S 1835(other)S 2073(commands.)S 2589(When)S 2860(redirection)S 3328(occurs,)S 3646(the)S 3799(shell)S 4019(saves)S 4267(the)S 4420(old)S 4578(values)S 4865(of)S 4979(the)S 5132(\256le)S 6672 V 1080(descriptors)S 1554(and)S 1731(restores)S 2077(them)S 2310(when)S 2560(the)S 2715(command)S 3143(completes.)S 3633(The)S 3822(``<'',)S 4073(``>'',)S 4324(and)S 4502(``>>'')S 4785(redirections)S 6792 V 1080(open)S 1309(a)S 1388(\256le)S 1551(for)S (input,)231 1702 A 1966(output,)S 2280(and)S 2458(appending,)S 2934(respectively.)S 3504(The)S 3694(``<&digit'')S 4182(and)S 4360(``>&digit'')S 4848(makes)S 5138(the)S 6912 V (input)206 1080 A 1313(or)S 1424(output)S 1707(a)S (duplicate)369 1779 A 2176(of)S 2288(the)S 2439(\256le)S 2596(descriptor)S 3027(numbered)S 3457(by)S 3585(the)S 3736(digit.)S 3998(If)S 4094(a)S 4167(minus)S 4440(sign)S 4635(is)S 4730(used)S 4942(in)S (place)213 5048 A 7032 V 1080(of)S 1189(a)S 1259(digit,)S 1493(the)S 1641(standard)S (input)206 2007 A 2238(or)S 2347(standard)S 2713(output)S 2994(are)S 3143(closed.)S 7200 V 1080(The)S 1265(``<<)S 1472(word'')S 1775(redirection)S 2240(takes)S (input)206 2475 A 2709(from)S 2933(a)S 10 I 3007(here)S 10 R 3215(document.)S 3690(As)S 3831(the)S 3983(shell)S (encounters)436 4202 A 4667(``<<'')S 4946(redirec-)S 7320 V 1080(tions,)S 1337(it)S 1430(collects)S 1775(them.)S 2063(The)S 2257(next)S 2467(time)S 2682(it)S (encounters)436 2774 A 3246(an)S 3377(unescaped)S 3832(newline,)S 4212(it)S 4304(reads)S 4553(the)S 4712(documents)S 5183(in)S 7440 V 1080(turn.)S 1321(The)S 1507(word)S 1743(following)S 2163(the)S 2315(``<<'')S 2594(speci\256es)S 2970(the)S 3122(contents)S 3486(of)S 3599(the)S 3752(line)S 3933(that)S 4114(terminates)S 4564(the)S 4717(document.)S 5193(If)S 7903 V 720(Page)S 941(3)S 2654(\()S 2696(March)S 2984(7,)S (1991)200 3084 A 3292(\))S 4455(September)S 4911(13,)S (1996)200 5061 A 8143 V EP %%Page: 4 4 BP /slant 0 def /height 0 def 480 V 10 R 720(SH)S 857(\()S 899(1)S 957(\))S 2696(Eighth)S (Edition)296 2989 A 4990(SH)S 5127(\()S 5169(1)S 5227(\))S 960 V (none)195 1080 A 1303(of)S 1415(the)S (quoting)306 1566 A (methods)340 1900 A (\('',)127 2268 A 2423("",)S 2558(or)S 2670(\\\))S 2760(are)S 2912(used)S 3124(to)S 3230(enter)S 3460(the)S 3610(word,)S 3869(then)S 4069(the)S 4219(document)S 4642(is)S 4736(treated)S 5038(like)S 5216(a)S 1080 V 1080(word)S 1326(inside)S (double)273 1605 A (quotes:)290 1917 A 2271(``$'')S 2496(and)S (backquote)413 2680 A 3132(are)S 3295(expanded)S 3719(and)S 3904(backslash)S 4335(can)S 4515(be)S 4650(used)S 4874(to)S 4992(escape)S 1200 V 1080(these)S 1316(and)S 1490(to)S 1597(continue)S (long)178 1972 A 2179(lines.)S 2448(The)S 2634(word)S (cannot)268 2870 A 3167(contain)S 3492(any)S 3666(variable)S 4020(or)S 4132(command)S (substitutions,)532 4556 A 5116(and)S 1320 V 1080(its)S 1200(length)S 1476(\(after)S (quoting\))340 1721 A 2086(must)S 2306(be)S 2426(in)S 2529(the)S 2677(range)S 2926(of)S 3035(1)S 3110(to)S 3214(79)S 3340(characters.)S 3826(If)S (``<<-'')284 3920 A 4230(is)S 4323(used)S 4533(in)S (place)213 4637 A 4876(of)S 4986(``<<'',)S 1440 V 1080(then)S 1281(leading)S 1605(tabs)S 1795(are)S 1947(deleted)S 2266(from)S 2490(the)S 2641(lines)S 2859(of)S 2971(the)S 3122(document.)S 3596(\(This)S 3837(is)S 3932(to)S 4038(allow)S (you)150 4290 A 4468(do)S 4596(indent)S 4875(shell)S 5093(pro-)S 1560 V 1080(cedures)S 1413(containing)S 1862(here)S 2061(documents)S 2521(in)S 2624(a)S 2694(natural)S 2999(fashion.\))S 1728 V 1080(Any)S 1301(of)S 1433(the)S (preceding)397 1604 A 2049(redirection)S 2534(operators)S 2957(may)S 3178(be)S (preceded)364 3321 A 3733(by)S 3881(a)S 3974(single)S 4262(digit)S 4494(specifying)S 4961(the)S 5132(\256le)S 1848 V 1080(descriptor)S 1524(to)S 1643(be)S 1779(redirected.)S 2274(There)S (cannot)268 2551 A 2860(be)S 2996(any)S 3182(white)S (space)224 3447 A 3712(between)S 4089(the)S 4252(digit)S 4476(and)S 4661(the)S 4824(redirection)S 1968 V 1080(operator.)S 2208 V 10 B 864(Path)S 1091(Search)S 2376 V 10 R 1080(When)S 1351(locating)S 1706(a)S 1782(command,)S 2234(the)S 2388(shell)S 2609(\256rst)S (looks)217 2797 A 3045(to)S 3154(see)S 3314(if)S 3407(it)S 3494(has)S 3659(a)S 3735(shell)S 3956(function)S 4322(by)S 4453(that)S 4635(name.)S 4935(Then,)S 5199(if)S 2496 V 1080(PATH)S 1370(does)S 1580(not)S 1734(contain)S 2056(an)S 2177(entry)S 2410(for)S ("%builtin",)453 2554 A 3032(it)S (looks)217 3113 A 3355(for)S 3498(a)S (builtin)262 3568 A 3855(command)S 4276(by)S 4401(that)S 4577(name.)S 4870(Finally,)S 5205(it)S 2616 V 1080(searches)S (each)185 1447 A 1657(entry)S 1889(in)S 1992(PATH)S 2281(in)S 2384(turn)S 2571(for)S 2714(the)S 2862(command.)S 2784 V 1080(The)S 1266(value)S 1513(of)S 1626(the)S 1778(PATH)S 2071(variable)S (should)267 2425 A 2721(be)S 2845(a)S 2919(series)S 3178(of)S 3292(entries)S 3591(separated)S 4002(by)S 4132(colons.)S 4474(Each)S 4706(entry)S 4943(consists)S 2904 V 1080(of)S 1192(a)S 1265(directory)S 1657(name,)S 1928(or)S 2040(a)S 2113(directory)S 2505(name)S 2751(followed)S 3137(by)S 3265(a)S 3338(\257ag)S 3517(beginning)S 3945(with)S 4151(a)S 4223(percent)S 4547(sign.)S 4791(The)S 4975(current)S 3024 V 1080(directory)S (should)267 1469 A 1761(be)S 1881(indicated)S 2275(by)S 2400(an)S 2520(empty)S 2796(directory)S 3185(name.)S 3192 V 1080(If)S 1177(no)S 1306(percent)S 1632(sign)S 1828(is)S 1924(present,)S 2269(then)S 2471(the)S 2623(entry)S 2859(causes)S 3151(the)S 3303(shell)S 3522(to)S 3629(search)S 3916(for)S 4063(the)S 4216(command)S 4642(in)S 4750(the)S 4903(speci\256ed)S 3312 V 1080(directory.)S 1528(If)S 1630(the)S 1787(\257ag)S 1972(is)S (``%builtin'')482 2073 A 2589(then)S 2796(the)S 2953(list)S 3110(of)S 3228(shell)S (builtin)262 3452 A 3748(commands)S 4217(is)S 4317(searched.)S 4753(If)S 4854(the)S 5010(\257ag)S 5194(is)S 3432 V 1080(``%func'')S 1511(then)S 1716(the)S 1871(directory)S 2267(is)S 2366(searched)S 2751(for)S 2901(a)S 2978(\256le)S 3139(which)S 3417(is)S 3517(read)S 3724(as)S (input)206 3841 A 4080(to)S 4191(the)S 4347(shell.)S 4620(This)S 4832(\256le)S (should)267 4994 A 3552 V 1080(de\256ne)S 1351(a)S 1421(function)S 1781(whose)S 2063(name)S 2306(is)S 2398(the)S 2546(name)S 2789(of)S 2898(the)S 3046(command)S 3467(being)S 3715(searched)S 4093(for.)S 3720 V 1080(Command)S 1523(names)S 1805(containing)S 2254(a)S 2324(slash)S 2550(are)S 2699(simply)S 2997(executed)S (without)307 3380 A 3712(performing)S 4190(any)S 4360(of)S 4469(the)S (above)240 4617 A 4882(searches.)S 3960 V 10 B 864(The)S 1057(Environment)S 4128 V 10 R 1080(The)S 1266(environment)S 1803(of)S 1916(a)S 1990(command)S 2415(is)S 2511(a)S 2585(set)S 2726(of)S 2839(name/value)S 3332(pairs.)S 3607(When)S 3877(the)S 4030(shell)S 4250(is)S (invoked,)348 4347 A 4725(it)S 4811(reads)S 5054(these)S 4248 V 1080(names)S 1366(and)S 1540(values,)S 1851(sets)S 2031(the)S 2183(shell)S 2402(variables)S 2794(with)S 3001(these)S 3236(names)S 3521(to)S 3627(the)S (corresponding)575 3778 A 4381(values,)S 4691(and)S 4864(marks)S 5138(the)S 4368 V 1080(variables)S 1469(as)S (exported.)377 1578 A 2005(The)S 10 I 2187(export)S 10 R 2469(command)S 2890(can)S 3055(be)S 3175(used)S 3384(to)S 3487(mark)S (additional)402 3719 A 4146(variables)S 4535(as)S (exported.)377 4644 A 4536 V 1080(The)S 1267(environment)S 1805(of)S 1919(a)S 1995(command)S 2422(is)S 2520(constructed)S 3015(by)S 3146(constructing)S 3674(name/value)S 4169(pairs)S 4396(from)S 4623(all)S 4755(the)S (exported)352 4909 A 4656 V 1080(shell)S 1295(variables,)S 1709(and)S 1879(then)S 2077(modifying)S 2520(this)S 2690(set)S 2827(by)S 2952(the)S 3100(assignments)S 3616(which)S (precede)314 3887 A 4226(the)S 4374(command,)S 4820(if)S 4907(any.)S 4896 V 10 B 864(Expansion)S 5064 V 10 R 1080(The)S 1272(process)S 1609(of)S 1728(evaluating)S 2182(words)S 2463(when)S 2716(a)S 2796(shell)S 3021(procedure)S 3459(is)S 3562(executed)S 3956(is)S 4059(called)S 10 I (expansion)407 4336 A 10 R 4751(.)S 4837(Expansion)S 5184 V 1080(consists)S 1431(of)S 1548(four)S 1748(steps:)S 2034(variable)S (substitution,)493 2391 A 2916(command)S (substitution,)493 3344 A 3869(word)S (splitting,)354 4108 A 4494(and)S 4671(\256le)S 4832(name)S 5082(gen-)S 5304 V 1080(eration.)S 1442(If)S 1542(a)S 1619(word)S 1858(is)S 1957(the)S 2112(expression)S 2574(following)S 2998(the)S 3154(word)S 10 B 3394(case)S 10 R 3606(in)S 3717(a)S 3795(case)S 4002(statement,)S 4446(the)S 4602(\256le)S 4764(name)S 5015(which)S 5424 V 1080(follows)S 1408(a)S 1479(redirection)S 1942(symbol,)S 2288(or)S 2398(an)S 2519(assignment)S 2997(to)S 3101(the)S 3250(environment)S 3784(of)S 3894(a)S 3965(command,)S 4412(then)S 4611(the)S 4760(word)S (cannot)268 4993 A 5544 V 1080(be)S (split)173 1200 A 1398(into)S (multiple)335 1579 A 1939(words.)S 2260(In)S 2369(these)S 2601(cases,)S 2864(the)S 3012(last)S 3177(two)S 3353(steps)S 3579(of)S 3688(the)S 3836(expansion)S 4268(process)S 4595(are)S (omitted.)332 4744 A 5784 V 10 B 864(Variable)S (Substitution)527 1264 A 5952 V 10 R 1080(To)S 1217(be)S (written.)311 1337 A 6192 V 10 B 864(Command)S (Substitution)527 1342 A 6360 V 10 I 1080(Ash)S 10 R (accepts)297 1256 A 1578(two)S 1754(syntaxes)S 2125(for)S 2268(command)S (substitution:)496 2689 A 6600 V 1480(`)S 10 I 1514(list)S 10 R 1637(`)S 6840 V 1080(and)S 7080 V 1480($\()S 10 I 1564(list)S 10 R 1687(\))S 7320 V 1080(Either)S 1362(of)S 1481(these)S 1723(may)S 1931(be)S 2061(included)S 2442(in)S 2555(a)S 2635(word.)S 2927(During)S 3248(the)S 3407(command)S (substitution)468 3839 A 4343(process,)S 4706(the)S 4865(command)S 7440 V 1080(\(syntactly)S 1507(a)S 10 I 1582(list)S 10 R 1713(\))S (will)157 1777 A 1964(be)S 2089(executed)S 2477(and)S 2652(anything)S 3033(that)S 3213(the)S 3365(command)S 3790(writes)S 4066(to)S 4173(the)S 4325(standard)S 4695(output)S (will)157 4980 A 5166(be)S 7903 V 720(September)S 1176(13,)S (1996)200 1326 A 2654(\()S 2696(March)S 2984(7,)S (1991)200 3084 A 3292(\))S 4990(Page)S 5211(4)S 8143 V EP %%Page: 5 5 BP /slant 0 def /height 0 def 480 V 10 R 720(SH)S 857(\()S 899(1)S 957(\))S 2696(Eighth)S (Edition)296 2989 A 4990(SH)S 5127(\()S 5169(1)S 5227(\))S 960 V 1080(captured)S 1452(by)S 1577(the)S 1726(shell.)S 1992(The)S 2175(\256nal)S 2380(newline)S 2725(\(if)S 2847(any\))S 3052(of)S 3162(the)S 3311(output)S (will)157 3593 A 3776(be)S 3897(deleted;)S 4242(the)S 4391(rest)S 4563(of)S 4673(the)S 4822(output)S (will)157 5104 A 1080 V 1080(be)S (substituted)435 1200 A 1660(for)S 1803(the)S 1951(command)S 2372(in)S 2475(the)S 2623(word.)S 1320 V 10 B 864(Word)S 1140(Splitting)S 1488 V 10 R 1080(When)S 1350(the)S 1503(value)S 1751(of)S 1865(a)S 1940(variable)S 2295(or)S 2409(the)S 2562(output)S 2848(of)S 2962(a)S 3037(command)S 3463(is)S (substituted,)460 3560 A 4050(the)S (resulting)352 4204 A 4587(text)S 4769(is)S 4867(subject)S 5183(to)S 1608 V 1080(word)S (splitting,)354 1323 A 1713(unless)S 2000(the)S 2159(dollar)S 2430(sign)S (introducing)463 2633 A 3132(the)S 3291(variable)S 3652(or)S (backquotes)452 3772 A 4260(containing)S 4720(the)S 4878(text)S 5064(were)S 1728 V 1080(enclosed)S 1459(in)S (double)273 1564 A (quotes.)287 1864 A 2203(In)S (addition,)354 2314 A 2695(``$@'')S 3001(is)S 3095(subject)S 3407(to)S 3512(a)S 3584(special)S 3891(type)S 4091(of)S (splitting,)354 4202 A 4584(even)S 4802(in)S 4908(the)S 5059(pres-)S 1848 V 1080(ence)S 1290(of)S (double)273 1399 A (quotes.)287 1697 A 2016 V 1080(Ash)S 1273(uses)S 1477(two)S 1659(different)S (splitting)329 2039 A 2400(algorithms.)S 2912(The)S 3101(normal)S 3418(approach,)S 3844(which)S 4122(is)S 4221(intended)S 4599(for)S (splitting)329 4749 A 5110(text)S 2136 V 1080(separated)S 1487(by)S 1613(which)S (space,)249 1884 A 2158(is)S 2250(used)S 2459(if)S 2546(the)S 2694(\256rst)S 2876(character)S 3272(of)S 3381(the)S 3529(shell)S 3744(variable)S 4094(IFS)S 4265(is)S 4357(a)S (space.)249 4427 A 4726(Otherwise)S 5166(an)S 2256 V 1080(alternative)S 1537(experimental)S 2094(algorithm,)S 2541(which)S 2818(is)S 2916(useful)S 3193(for)S (splitting)329 3343 A 3704(\(possibly)S 4104(empty\))S 4421(\256elds)S 4671(separated)S 5084(by)S 5216(a)S 2376 V 1080(separator)S 1475(character,)S 1896(is)S 1988(used.)S 2544 V 1080(When)S 1347(performing)S (splitting,)354 1827 A 2208(the)S 2358(shell)S 2575(scans)S 2820(the)S (replacement)493 2971 A 3492(text)S (looking)306 3671 A 4005(for)S 4151(a)S 4224(character)S 4623(\(when)S 4903(IFS)S 5077(does)S 2664 V 1080(not)S 1244(begin)S 1503(with)S 1718(a)S (space\))258 1799 A 2093(or)S 2213(a)S 2294(sequence)S 2699(of)S 2819(characters)S 3265(\(when)S 3553(IFS)S 3734(does)S 3953(begin)S 4211(with)S 4425(a)S (space\),)283 4505 A 4823(deletes)S 5138(the)S 2784 V 1080(character)S 1479(or)S 1591(sequence)S 1988(of)S 2100(characters,)S 2563(and)S 2736(spits)S 2948(the)S 3099(word)S 3334(into)S 3518(two)S 3697(strings)S 3993(at)S 4094(that)S 4273(point.)S 4557(When)S 4825(IFS)S 4999(begins)S 2904 V 1080(with)S 1290(a)S (space,)249 1366 A 1646(the)S 1800(shell)S 2021(deletes)S 2332(either)S 2593(of)S 2708(the)S 2861(strings)S 3159(if)S 3251(they)S 3454(are)S 3608(null.)S 3844(As)S 3986(a)S 4061(special)S 4371(case,)S 4600(if)S 4692(the)S 4845(word)S 5082(con-)S 3024 V 1080(taining)S 1384(the)S (replacement)493 1532 A 2050(text)S 2226(is)S 2318(the)S 2466(null)S 2647(string,)S 2926(the)S 3074(word)S 3306(is)S 3398(deleted.)S 3192 V 1080(The)S 1266(variable)S 1620(``$@'')S 1928(is)S 2024(special)S 2333(in)S 2440(two)S 2620(ways.)S 2906(First,)S (splitting)329 3146 A 3505(takes)S (place)213 3742 A 3985(between)S 4351(the)S (positional)396 4504 A 4930(parame-)S 3312 V 1080(ters,)S 1281(even)S 1501(if)S 1593(the)S 1746(text)S 1927(is)S 2023(enclosed)S 2404(in)S (double)273 2511 A (quotes.)287 2813 A (Second,)321 3154 A 3504(if)S 3595(the)S 3747(word)S 3983(containing)S 4436(the)S (replacement)493 4588 A 5110(text)S 3432 V 1080(is)S 1179(the)S 1334(null)S 1522(string)S 1783(and)S 1960(there)S 2194(are)S 2351(no)S (positional)396 2484 A 2913(parameters,)S 3414(then)S 3620(the)S 3776(word)S 4016(is)S 4116(deleted.)S 4490(The)S 4680(result)S 4937(of)S 5054(these)S 3552 V 1080(rules)S 1309(is)S 1409(that)S 1593("$@")S 1851(is)S 1951(equivalent)S 2403(to)S 2514("$1")S 2729("$2")S (...)75 2944 A 3052("$)S 10 I 3143(n)S 10 R 3193(",)S 3292(where)S 10 I 3572(n)S 10 R 3655(is)S 3755(the)S 3910(number)S 4249(of)S (positional)396 4365 A 4793(parameters.)S 3672 V 1080(\(Note)S 1356(that)S 1553(this)S 1744(differs)S 2054(from)S 2297(the)S 2467(System)S 2810(V)S 2930(shell.)S 3217(The)S 3421(System)S 3764(V)S 3884(documentation)S 4528(claims)S 4838(that)S 5036("$@")S 3792 V 1080(behaves)S 1436(this)S 1613(way;)S 1841(in)S 1951(fact)S 2134(on)S 2265(the)S 2419(System)S 2746(V)S 2850(shell)S 3071("$@")S 3327(is)S 3425(equivalent)S 3875(to)S 3984("")S 4097(when)S 4346(there)S 4579(are)S 4734(no)S (positional)396 4865 A 3912 V 1080(paramteters.\))S 4152 V 10 B 864(File)S 1052(Name)S 1329(Generation)S 4320 V 10 R 1080(Unless)S 1382(the)S 10 B 1533(-f)S 10 R 1629(\257ag)S 1808(is)S 1903(set,)S 2068(\256le)S 2225(name)S 2471(generation)S 2925(is)S 3021(performed)S 3470(after)S 3685(word)S (splitting)329 3921 A 4279(is)S 4375(complete.)S 4823(Each)S 5054(word)S 4440 V 1080(is)S 1173(viewed)S 1490(as)S 1600(a)S 1671(series)S 1927(of)S 2036(patterns,)S 2405(separated)S 2811(by)S 2936(slashes.)S 3296(The)S 3478(process)S 3805(of)S 3914(expansion)S (replaces)331 4346 A 4702(the)S 4850(word)S 5082(with)S 4560 V 1080(the)S 1233(names)S 1520(of)S 1634(all)S 1765(existing)S 2113(\256les)S 2311(whose)S 2598(names)S 2885(can)S 3055(be)S 3180(formed)S 3501(by)S 3631(replacing)S (each)185 4037 A 4253(pattern)S 4564(with)S 4774(a)S 4850(string)S 5110(that)S 4680 V 1080(matches)S 1441(the)S 1595(speci\256ed)S 1984(pattern.)S 2345(There)S 2612(are)S 2767(two)S 2949(restrictions)S 3428(on)S 3558(this:)S 3786(\256rst,)S 3998(a)S 4073(pattern)S (cannot)268 4383 A 4681(match)S 4957(a)S 5032(string)S 4800 V 1080(containing)S 1539(a)S 1619(slash,)S 1881(and)S (second,)304 2062 A 2402(a)S 2483(pattern)S (cannot)268 2799 A 3103(match)S 3385(a)S 3466(string)S 3731(starting)S 4069(with)S 4284(a)S 4365(period)S 4658(unless)S 4945(the)S 5104(\256rst)S 4920 V 1080(character)S 1476(of)S 1585(the)S 1733(pattern)S 2038(is)S 2130(a)S 2200(period.)S 5088 V 1080(If)S 1175(a)S 1247(word)S 1481(fails)S 1682(to)S 1787(match)S 2060(any)S 2232(\256les)S 2427(and)S 2599(the)S 10 B 2749(-z)S 10 R 2855(\257ag)S 3033(is)S 3127(not)S 3282(set,)S 3446(then)S 3646(the)S 3796(word)S (will)157 4030 A 4215(be)S 4338(left)S 4501(unchanged)S 4964(\(except)S 5208 V 1080(that)S 1263(the)S 1418(meta-characters)S (will)157 2090 A 2279(be)S (converted)397 2406 A 2835(to)S 2945(normal)S 3262(characters\).)S 3787(If)S 3886(the)S 10 B 4040(-z)S 10 R 4150(\257ag)S 4332(is)S 4430(set,)S 4598(then)S 4802(the)S 4956(word)S 5194(is)S 5328 V 1080(only)S 1290(left)S 1458(unchanged)S 1926(if)S (none)195 2021 A 2249(of)S 2366(the)S 2522(patterns)S 2874(contain)S 3203(a)S 3281(character)S 3685(that)S 3869(can)S 4042(match)S 4321(anything)S 4705(besides)S 5034(itself.)S 5448 V 1080(Otherwise)S 1524(the)S 10 B 1676(-z)S 10 R 1784(\257ag)S 1964(forces)S 2240(the)S 2392(word)S 2628(to)S 2735(be)S (replaced)342 2859 A 3230(with)S 3438(the)S 3590(names)S 3876(of)S 3988(the)S 4139(\256les)S 4335(that)S 4514(it)S 4598(matches,)S 4981(even)S 5199(if)S 5568 V 1080(there)S 1307(are)S 1456(zero)S 1655(names.)S 5808 V 10 B 864(Patterns)S 5976 V 10 R 1080(A)S 10 I 1195(pattern)S 10 R 1527(consists)S 1887(of)S 2013(normal)S 2340(characters,)S 2817(which)S 3106(match)S 3395(themselves,)S 3910(and)S 4098(meta-characters.)S 4831(The)S 5031(meta-)S 6096 V 1080(characters)S 1533(are)S (``!'',)195 1699 A 1936(``*'',)S 2189(``?'',)S 2437(and)S (``[''.)195 2624 A 2886(These)S 3169(characters)S 3621(lose)S 3825(there)S 4069(special)S 4391(meanings)S 4818(if)S 4922(they)S 5137(are)S 6216 V (quoted.)298 1080 A 1428(When)S 1693(command)S 2114(or)S 2223(variable)S (substitution)468 2573 A 3066(is)S 3158(performed)S 3603(and)S 3773(the)S 3921(dollar)S 4181(sign)S 4373(or)S 4482(back)S (quotes)262 4697 A 4984(are)S 5133(not)S 6336 V (double)273 1080 A (quoted,)298 1386 A 1716(the)S 1871(value)S 2121(of)S 2237(the)S 2392(variable)S 2749(or)S 2865(the)S 3020(output)S 3308(of)S 3424(the)S 3579(command)S 4007(is)S 4106(scanned)S 4462(for)S 4612(these)S 4851(characters)S 6456 V 1080(and)S 1250(they)S 1448(are)S 1597(turned)S 1879(into)S 2060(meta-characters.)S 6624 V 1080(Two)S 1293(exclamation)S 1813(points)S 2086(at)S 2187(the)S 2338(beginning)S 2767(of)S 2879(a)S 2952(pattern)S 3260(function)S 3623(as)S 3736(a)S 3810(``not'')S 4103(operator,)S 4493(causing)S 4829(the)S 4981(pattern)S 6744 V 1080(to)S 1187(match)S 1462(any)S 1636(string)S 1893(that)S 2072(the)S 2223(remainder)S 2660(of)S 2772(the)S 2923(pattern)S 3231(does)S 10 I 3443(not)S 10 R 3599(match.)S 3923(Other)S 4181(occurances)S 4657(of)S 4769(exclamation)S 6864 V 1080(points)S 1357(in)S 1467(a)S 1544(pattern)S 1856(match)S 2134(exclamation)S 2658(points.)S 2985(Two)S 3202(exclamation)S 3726(points)S 4004(are)S 4161(required)S 4530(rather)S 4799(than)S 5005(one)S 5183(to)S 6984 V 1080(decrease)S 1468(the)S (incompatibility)614 1631 A 2285(with)S 2504(the)S 2667(System)S 3003(V)S 3116(shell)S 3346(\(which)S 3666(does)S 3890(not)S 4058(treat)S 4278(exclamation)S 4809(points)S 5093(spe-)S 7104 V 1080(cially\).)S 7272 V 1080(An)S 1230(asterisk)S (\(``*''\))254 1566 A 1848(matches)S 2206(any)S 2379(string)S 2636(of)S 2748(characters.)S 3236(A)S 3337(question)S 3705(mark)S 3940(matches)S 4298(any)S 4471(single)S 4739(character.)S 5188(A)S 7392 V 1080(left)S 1244(bracket)S (\(``[''\))238 1570 A (introduces)419 1837 A 2285(a)S 2359(character)S 2759(class.)S 3034(The)S 3220(end)S 3394(of)S 3506(the)S 3657(character)S 4056(class)S 4280(is)S 4375(indicated)S 4772(by)S 4900(a)S (``]'';)198 4973 A 5199(if)S 7512 V 1080(the)S (``]'')170 1233 A 1433(is)S 1530(missing)S 1872(then)S 2075(the)S (``['')170 2228 A 2428(matches)S 2789(a)S (``['')170 2865 A 3066(rather)S 3333(than)S (introducing)463 3537 A 4031(a)S 4107(character)S 4509(class.)S 4786(A)S 4890(character)S 7903 V 720(Page)S 941(5)S 2654(\()S 2696(March)S 2984(7,)S (1991)200 3084 A 3292(\))S 4455(September)S 4911(13,)S (1996)200 5061 A 8143 V EP %%Page: 6 6 BP /slant 0 def /height 0 def 480 V 10 R 720(SH)S 857(\()S 899(1)S 957(\))S 2696(Eighth)S (Edition)296 2989 A 4990(SH)S 5127(\()S 5169(1)S 5227(\))S 960 V 1080(class)S 1325(matches)S 1704(any)S 1898(of)S 2031(the)S 2203(characters)S 2662(between)S 3046(the)S 3217(square)S 3528(brackets.)S 3962(A)S 4083(range)S 4355(of)S 4487(characters)S 4945(may)S 5166(be)S 1080 V 1080(speci\256ed)S 1475(using)S 1729(a)S 1811(minus)S 2093(sign.)S 2347(The)S 2542(character)S 2951(class)S 3185(may)S 3396(be)S 3529(complemented)S 4159(by)S 4297(making)S 4636(an)S 4769(exclamation)S 1200 V 1080(point)S 1311(the)S 1459(\256rst)S 1641(character)S 2037(of)S 2146(the)S 2294(character)S 2690(class.)S 1368 V 1080(To)S 1231(include)S 1567(a)S (``]'')170 1652 A 1862(in)S 1980(a)S 2065(character)S 2476(class,)S 2737(make)S 2995(it)S 3091(the)S 3254(\256rst)S 3451(character)S 3862(listed)S 4120(\(after)S 4380(the)S (``!'',)195 4543 A 4778(if)S 4880(any\).)S 5149(To)S 1488 V 1080(include)S 1401(a)S 1471(minus)S 1741(sign,)S 1958(make)S 2201(it)S 2282(the)S 2430(\256rst)S 2612(or)S 2721(last)S 2886(character)S 3282(listed.)S 1728 V 10 B 864(The)S 1057(/u)S (Directory)415 1166 A 1896 V 10 R 1080(By)S (convention,)471 1227 A 1728(the)S 1881(name)S (``/u/user'')410 2129 A 2569(refers)S 2830(to)S 2938(the)S 3091(home)S 3344(directory)S 3738(of)S 3852(the)S 4005(speci\256ed)S 4393(user.)S 4641(There)S 4907(are)S (good)200 5061 A 2016 V 1080(reasons)S 1409(why)S 1609(this)S 1781(feature)S (should)267 2089 A 2383(be)S (supported)396 2505 A 2928(by)S 3054(the)S 3203(\256le)S 3358(system)S 3663(\(using)S 3940(a)S 4011(feature)S 4318(such)S 4528(as)S 4638(symbolic)S 5032(links\))S 2136 V 1080(rather)S 1343(than)S 1543(by)S 1670(the)S 1821(shell,)S 2064(but)S 10 I 2220(ash)S 10 R 2387(is)S 2482(capable)S 2818(of)S 2930(performing)S 3411(this)S 3584(mapping)S 3963(if)S 4053(the)S 4204(\256le)S 4361(system)S 4668(doesn't.)S 5042(If)S 5138(the)S 2256 V 1080(mapping)S 1456(is)S (done)195 1548 A 1768(by)S 10 I 1893(ash)S 10 R 2040(,)S (setting)268 2090 A 2383(the)S 10 B 2531(-f)S 10 R 2624(\257ag)S (will)157 2800 A 2982(turn)S 3169(it)S 3250(off.)S 2496 V 10 B 864(Character)S 1332(Set)S 2664 V 10 I 1080(Ash)S 10 R 1265(silently)S 1595(discards)S 1959(nul)S 2121(characters.)S 2615(Any)S 2823(other)S 3065(character)S (will)157 3471 A 3663(be)S 3793(handled)S 4146(correctly)S 4540(by)S 10 I 4675(ash)S 10 R 4822(,)S 4882(including)S 2784 V 1080(characters)S 1515(with)S 1719(the)S 1867(high)S 2070(order)S 2308(bit)S 2439(set.)S 3024 V 10 B 864(Job)S 1045(Names)S 1361(and)S 1548(Job)S 1729(Control)S 3192 V 10 R 1080(The)S 1267(term)S 10 I 1482(job)S 10 R 1640(refers)S 1901(to)S 2009(a)S 2084(process)S 2416(created)S 2738(by)S 2868(a)S 2944(shell)S 3165(command,)S 3617(or)S 3732(in)S 3841(the)S 3995(case)S 4200(of)S 4315(a)S 4391(pipeline,)S 4771(to)S 4880(the)S 5034(set)S 5177(of)S 3312 V 1080(processes)S 1491(in)S 1594(the)S 1742(pipeline.)S 2141(The)S 2323(ways)S 2555(to)S 2658(refer)S 2875(to)S 2978(a)S 3048(job)S 3201(are:)S 3552 V 1480(%)S 10 I 1564(number)S 3672 V 10 R 1480(%)S 10 I 1564(string)S 3792 V 10 R 1480(%%)S 3912 V 10 I 1480(process_id)S 4152 V 10 R 1080(The)S 1262(\256rst)S 1444(form)S 1665(identi\256es)S 2059(a)S 2129(job)S 2283(by)S 2409(job)S 2563(number.)S 2946(When)S 3212(a)S 3283(command)S 3705(is)S 3798(run,)S 10 I 3983(ash)S 10 R 4148(assigns)S 4464(it)S 4546(a)S 4617(job)S 4771(number)S 5104(\(the)S 4272 V 1080(lowest)S (unused)284 1379 A 1699(number)S 2042(is)S 2145(assigned\).)S 2611(The)S (second)279 2804 A 3119(form)S 3351(identi\256es)S 3756(a)S 3837(job)S 4001(by)S 4136(giving)S 4427(a)S 4507(pre\256x)S 4777(of)S 4896(the)S 5054(com-)S 4392 V 1080(mand)S 1335(used)S 1551(to)S 1661(create)S 1935(the)S 2090(job.)S 2300(The)S 2489(pre\256x)S 2756(must)S 2983(be)S 3110(unique.)S 3465(If)S 3565(there)S 3800(is)S 3900(only)S 4111(one)S 4289(job,)S 4475(then)S 4681(the)S 4837(null)S 5026(pre\256x)S 4512 V (will)157 1080 A 1268(identify)S 1612(the)S 1766(job,)S 1949(so)S (you)150 2068 A 2248(can)S 2418(refer)S 2640(to)S 2748(the)S 2901(job)S 3059(by)S (writing)291 3189 A 3510(``%''.)S 3810(The)S 3997(third)S 4217(form)S 4443(refers)S 4704(to)S 4812(the)S 10 I 4965(current)S 4632 V 1080(job)S 10 R 1208(.)S 1291(The)S 1481(current)S 1800(job)S 1961(is)S 2061(the)S 2217(last)S 2390(job)S 2551(to)S 2662(be)S (stopped)312 2790 A 3136(while)S 3394(it)S 3484(was)S 3675(in)S 3787(the)S (foreground.)472 3944 A 4475(\(See)S 4689(the)S 4846(next)S 5053(para-)S 4752 V 1080(graph.\))S 1418(The)S 1600(last)S 1765(form)S 1986(identi\256es)S 2380(a)S 2450(job)S 2603(by)S 2728(giving)S 3009(the)S 3157(process)S 3484(id)S 3587(of)S 3696(the)S 3844(last)S 4009(process)S 4336(in)S 4439(the)S 4587(job.)S 4920 V 1080(If)S 1176(the)S 1327(operating)S 1735(system)S 2042(that)S 10 I 2221(ash)S 10 R 2388(is)S (running)312 2483 A 2823(on)S (supports)340 2951 A 3319(job)S 3475(control,)S 10 I 3813(ash)S 10 R (will)157 3980 A 4166(allow)S (you)150 4419 A 4598(to)S 4705(use)S 4868(it.)S 5003(In)S 5116(this)S 5040 V 1080(case,)S 1311(typing)S 1599(the)S 1754(suspend)S 2109(character)S 2512(\(typically)S 2930(\303Z\))S 3092(while)S (running)312 3348 A 3692(a)S 3769(command)S (will)157 4196 A 4384(return)S (you)150 4656 A 4837(to)S 10 I 4946(ash)S 10 R 5116(and)S 5160 V (will)157 1080 A 1269(make)S 1519(the)S 1674(suspended)S 2124(command)S 2553(the)S 2709(current)S 3028(job.)S 3239(You)S 3445(can)S 3618(then)S 3824(continue)S 4203(the)S 4359(job)S 4520(in)S 4631(the)S (background)474 4787 A 5280 V 1080(by)S 1205(typing)S 10 I 1486(bg)S 10 R 1594(,)S 1644(or)S (you)150 1753 A 1928(can)S 2093(continue)S 2464(it)S 2545(in)S 2648(the)S (foreground)447 2796 A 3268(by)S 3393(typing)S 10 I 3674(fg)S 10 R 3760(.)S 5520 V 10 B 864(Atty)S 5688 V 10 R 1080(If)S 1182(the)S 1339(shell)S 1563(variable)S 1922(ATTY)S 2226(is)S 2327(set,)S 2498(and)S 2677(the)S 2834(shell)S 3058(variable)S 3417(TERM)S 3731(is)S 3832(not)S 3994(set)S 4140(to)S 4252(``emacs'',)S 4700(then)S 10 I 4908(ash)S 10 R 5082(gen-)S 5808 V 1080(erates)S 1341(appropriate)S 1825(escape)S 2119(sequences)S 2552(to)S 2655(talk)S 2831(to)S 10 I 2934(atty)S 10 R 3093(\(1\).)S 6048 V 10 B 864(Exit)S 1068(Statuses)S 6216 V 10 R 1080(By)S (tradition,)366 1223 A 1615(an)S 1737(exit)S 1915(status)S 2171(of)S 2282(zero)S 2483(means)S 2767(that)S 2945(a)S 3017(command)S 3440(has)S (succeeded)414 3601 A 4042(and)S 4214(a)S (nonzero)324 4286 A 4637(exit)S 4815(status)S 5071(indi-)S 6336 V 1080(cates)S 1315(that)S 1499(the)S 1655(command)S 2084(failed.)S 2397(This)S 2609(is)S 2709(better)S 2971(than)S 3176(no)S (convention)446 3308 A 3786(at)S 3891(all,)S 4049(but)S 4209(in)S 4319(practice)S 4671(it)S 4759(is)S 4858(extremely)S 6456 V 1080(useful)S 1365(to)S 1482(allow)S 1745(commands)S 2219(that)S (succeed)319 2409 A 2767(to)S 2884(use)S 3057(the)S 3219(exit)S 3409(status)S 3678(to)S 3796(return)S 4077(information)S 4592(to)S 4710(the)S 4873(caller.)S 5188(A)S 6576 V 1080(variety)S 1395(of)S 1513(better)S (conventions)485 1777 A 2296(have)S 2520(been)S (proposed,)393 2744 A 3171(but)S (none)195 3333 A 3562(of)S 3680(them)S 3915(has)S 4083(met)S 4268(with)S 4481(universal)S 4884(approval.)S 6696 V 1080(The)S (convention)446 1262 A 1733(used)S 1942(by)S 10 I 2067(ash)S 10 R 2231(and)S 2401(all)S 2527(the)S 2675(programs)S 3080(included)S 3451(in)S 3554(the)S 10 I 3702(ash)S 10 R 3866(distribution)S 4354(is)S 4446(as)S 4555(follows:)S 6816 V 1800(0)S (Success.)344 2520 A 6936 V 1800(1)S 2520(Alternate)S (success.)327 2921 A 7056 V 1800(2)S 2520(Failure.)S 7176 V (129-...)259 1800 A 2520(Command)S 2963(terminated)S 3419(by)S 3544(a)S 3614(signal.)S 7296 V 1080(The)S 10 I 1269(alternate)S (success)302 1664 A 10 R 1998(return)S 2271(is)S 2370(used)S 2586(by)S 2718(commands)S 3185(to)S 3296(indicate)S 3648(various)S (conditions)418 3977 A 4428(which)S 4707(are)S 4864(not)S 5025(errors)S 7416 V 1080(but)S 1248(which)S 1534(can,)S 1738(with)S 1956(a)S (little)185 2040 A 2264(imagination,)S 2808(be)S 2942(conceived)S 3389(of)S 3512(as)S 3635(less)S (successful)414 3825 A 4278(than)S 4490(plain)S (success.)327 4730 A 5121(For)S 7536 V 1080(example,)S 10 I 1474(test)S 10 R 1642(returns)S 1950(1)S 2028(when)S 2274(the)S 2425(tested)S (condition)379 2689 A 3097(is)S 3193(false)S 3413(and)S 10 I 3587(getopts)S 10 R 3906(returns)S 4215(1)S 4294(when)S 4541(there)S 4772(are)S 4925(no)S 5054(more)S 7903 V 720(September)S 1176(13,)S (1996)200 1326 A 2654(\()S 2696(March)S 2984(7,)S (1991)200 3084 A 3292(\))S 4990(Page)S 5211(6)S 8143 V EP %%Page: 7 7 BP /slant 0 def /height 0 def 480 V 10 R 720(SH)S 857(\()S 899(1)S 957(\))S 2696(Eighth)S (Edition)296 2989 A 4990(SH)S 5127(\()S 5169(1)S 5227(\))S 960 V 1080(options.)S (Because)336 1459 A 1829(this)S (convention)446 2008 A 2488(is)S 2589(not)S 2751(used)S 2969(universally,)S 3475(the)S 10 B 3632(-e)S 10 R 3745(option)S 4035(of)S 10 I 4152(ash)S 10 R 4324(causes)S 4620(the)S 4776(shell)S 4999(to)S 5110(exit)S 1080 V 1080(when)S 1323(a)S 1393(command)S 1814(returns)S 2119(1)S 2194(even)S (though)278 2409 A 2712(that)S 2888(contradicts)S 3355(the)S (convention)446 3503 A 3974(described)S 4385(here.)S 1248 V 1080(When)S 1346(a)S 1417(command)S 1839(is)S 1932(terminated)S 2389(by)S 2515(a)S 2586(signal,)S 2877(the)S 3026(uses)S (128)150 3225 A 3401(plus)S 3594(the)S 3743(signal)S 4009(number)S 4342(as)S 4452(the)S 4601(exit)S 4778(code)S 4994(for)S 5138(the)S 1368 V 1080(command.)S 1608 V 10 B 864(Builtin)S 1186(Commands)S 1776 V 10 R 1080(This)S 1299(concluding)S 1785(section)S 2111(lists)S 2314(the)S (builtin)262 2478 A 2781(commands)S 3257(which)S 3544(are)S (builtin)262 3709 A (because)319 4012 A 4372(they)S 4586(need)S 4817(to)S 4936(perform)S 1896 V 1080(some)S 1327(operation)S 1742(that)S 1928(can't)S 2165(be)S 2295(performed)S 2750(by)S 2885(a)S 2965(separate)S 3331(process.)S 3718(In)S (addition)329 3837 A 4201(to)S 4314(these,)S 4581(there)S 4817(are)S 4975(several)S 2016 V 1080(other)S 1314(commands)S 1776(\()S 10 I 1810(catf)S 10 R 1969(,)S 10 I 2021(echo)S 10 R 2219(,)S 10 I 2271(expr)S 10 R 2458(,)S 10 I 2510(line)S 10 R 2669(,)S 10 I 2721(nlecho)S 10 R 2997(,)S 10 I 3050(test)S 10 R 3198(,)S 3251(``)S 10 I 3319(:)S 10 R 3361('',)S 3482(and)S 10 I 3655(true)S 10 R 3825(\))S 3887(which)S 4161(can)S 4329(optionally)S 4764(be)S 4887(compiled)S 2136 V 1080(into)S 1267(the)S 1421(shell.)S 1691(The)S (builtin)262 1878 A 2170(commands)S 2635(described)S 3051(below)S 3327(that)S (accept)258 3508 A 3796(options)S 4121(use)S 4285(the)S 4438(System)S 4764(V)S 4867(Release)S 5211(2)S 2256 V 10 I 1080(getopt)S 10 R 1339(\(3\))S 1482(syntax.)S 2544 V 10 B 1080(bg)S 10 R 1211([)S 10 I 1270(job)S 10 R 1423(])S (...)75 1482 A 2664 V 1230(Continue)S 1629(the)S 1783(speci\256ed)S 2172(jobs)S 2370(\(or)S 2519(the)S 2674(current)S 2992(job)S 3152(if)S 3246(no)S 3378(jobs)S 3577(are)S 3733(given\))S 4022(in)S 4132(the)S (background.)499 4287 A 4843(This)S 5054(com-)S 2784 V 1230(mand)S 1478(is)S 1570(only)S 1773(available)S 2162(on)S 2287(systems)S 2630(with)S 2834(Bekeley)S 3189(job)S 3342(control.)S 2952 V 10 B 1080(command)S 10 I (command)391 1530 A 1946(arg)S 10 R (...)75 2093 A 3072 V 1230(Execute)S 1592(the)S 1752(speci\256ed)S (builtin)262 2147 A 2446(command.)S 2929(\(This)S 3179(is)S 3283(useful)S 3566(when)S (you)150 3821 A 4009(have)S 4237(a)S 4320(shell)S 4548(function)S 4921(with)S 5138(the)S 3192 V 1230(same)S 1462(name)S 1705(as)S 1814(a)S (builtin)262 1884 A 2171(command.\))S 3360 V 10 B 1080(cd)S 10 R 1206([)S 10 I 1265(directory)S 10 R 1659(])S 3480 V 1230(Switch)S 1547(to)S 1662(the)S 1822(speci\256ed)S 2217(directory)S 2618(\(default)S 2969($HOME\).)S 3437(If)S 3542(the)S 3702(an)S 3834(entry)S 4078(for)S 4234(CDPATH)S 4676(appears)S 5022(in)S 5138(the)S 3600 V 1230(environment)S 1769(of)S 1884(the)S 2038(cd)S 2164(command)S 2591(or)S 2706(the)S 2859(shell)S 3079(variable)S 3434(CDPATH)S 3868(is)S 3965(set)S 4107(and)S 4282(the)S 4435(directory)S 4829(name)S 5077(does)S 3720 V 1230(not)S 1395(begin)S 1655(with)S 1871(a)S 1953(slash,)S 2217(then)S 2428(the)S 2589(directories)S 3053(listed)S 3309(in)S 3425(CDPATH)S (will)157 3867 A 4062(be)S 4195(searched)S 4586(for)S 4742(the)S 4903(speci\256ed)S 3840 V 1230(directory.)S 1682(The)S 1877(format)S 2184(of)S 2306(CDPATH)S 2748(is)S 2853(the)S 3013(same)S 3257(as)S 3378(that)S 3566(of)S 3687(PATH.)S 4038(In)S 4159(an)S 4291(interactive)S 4754(shell,)S 5006(the)S 5166(cd)S 3960 V 1230(command)S (will)157 1652 A 1835(print)S 2051(out)S 2205(the)S 2354(name)S 2598(of)S 2708(the)S 2857(directory)S 3247(that)S 3424(it)S 3506(actually)S 3851(switched)S 4235(to)S 4339(if)S 4427(this)S 4598(is)S 4691(different)S 5065(from)S 4080 V 1230(the)S 1384(name)S 1633(that)S 1815(the)S 1969(user)S 2168(gave.)S 2439(These)S 2711(may)S 2915(be)S 3041(different)S 3420(either)S (because)319 3680 A 4029(the)S 4182(CDPATH)S 4616(mechanism)S 5104(was)S 4200 V 1230(used)S 1439(or)S (because)319 1548 A 1892(a)S 1962(symbolic)S 2355(link)S 2536(was)S 2718(crossed.)S 4368 V 10 B 1080(.)S 10 I 1130(\256le)S 4488 V 10 R 1230(The)S 1414(commands)S 1876(in)S 1981(the)S 2131(speci\256ed)S 2516(\256le)S 2672(are)S 2823(read)S 3024(and)S 3196(executed)S 3581(by)S 3708(the)S 3858(shell.)S 4125(A)S 4225(path)S 4425(search)S 4710(is)S 4804(not)S (done)195 4960 A 5183(to)S 4608 V 1230(\256nd)S 1424(the)S 1585(\256le)S (because)319 1752 A 2109(the)S 2270(directories)S 2734(in)S 2850(PATH)S 3152(generally)S 3565(contain)S 3899(\256les)S 4105(that)S 4294(are)S 4456(intended)S 4840(to)S 4955(be)S 5087(exe-)S 4728 V 1230(cuted,)S 1498(not)S 1651(read.)S 4896 V 10 B 1080(eval)S 10 I 1278(string)S 10 R (...)75 1520 A 5016 V 1230(The)S 1425(strings)S 1731(are)S 1893(parsed)S 2194(as)S 2316(shell)S 2544(commands)S 3017(and)S 3200(executed.)S 3647(\(This)S 3899(differs)S 4202(from)S 4437(the)S 4599(System)S 4934(V)S 5046(shell,)S 5136 V 1230(which)S 1519(concatenates)S 2077(the)S 2243(arguments)S 2705(\(separated)S 3163(by)S (spaces\))297 3306 A 3646(and)S 3834(parses)S 4128(the)S 4293(result)S 4559(as)S 4685(a)S 4772(single)S 5054(com-)S 5256 V 1230(mand.\))S 5424 V 10 B 1080(exec)S 10 R 1290([)S 10 I (command)391 1349 A 1765(arg)S 10 R (...)75 1912 A 2037(])S 5544 V 1230(Unless)S 10 I (command)391 1537 A 10 R 1961(is)S (omitted,)332 2061 A 2426(the)S 2582(shell)S 2805(process)S 3140(is)S (replaced)342 3240 A 3615(with)S 3828(the)S 3985(speci\256ed)S 4377(program)S 4752(\(which)S 5066(must)S 5664 V 1230(be)S 1367(a)S 1454(real)S 1648(program,)S 2056(not)S 2226(a)S 2313(shell)S (builtin)262 2545 A 2849(or)S 2975(function\).)S 3436(Any)S 3651(redirections)S 4169(on)S 4310(the)S 4474(exec)S 4700(command)S 5137(are)S 5784 V 1230(marked)S 1566(as)S 1684(permanent,)S 2169(so)S 2293(that)S 2479(they)S 2687(are)S 2846(not)S (undone)295 3009 A 3339(when)S 3592(the)S 3750(exec)S 3970(command)S 4401(\256nishes.)S 4793(If)S 4896(the)S 5054(com-)S 5904 V 1230(mand)S 1478(is)S 1570(not)S (found,)259 1723 A 2007(the)S 2155(exec)S 2365(command)S 2786(causes)S 3074(the)S 3222(shell)S 3437(to)S 3540(exit.)S 6072 V 10 B 1080(exit)S 10 R 1262([)S 10 I 1321(exitstatus)S 10 R 1726(])S 6192 V 1230(Terminate)S 1672(the)S 1822(shell)S 2040(process.)S 2420(If)S 10 I 2516(exitstatus)S 10 R 2924(is)S 3019(given)S 3270(it)S 3354(is)S 3449(used)S 3661(as)S 3773(the)S 3924(exit)S 4103(status)S 4360(of)S 4472(the)S (shell;)218 4623 A 4869(otherwise)S 6312 V 1230(the)S 1378(exit)S 1554(status)S 1808(of)S 1917(the)S (preceding)397 2065 A 2487(command)S 2908(is)S 3000(used.)S 6480 V 10 B 1080(export)S 10 I 1385(name)S 10 R (...)75 1611 A 6600 V 1230(The)S 1420(speci\256ed)S 1811(names)S 2101(are)S (exported)352 2258 A 2643(so)S 2765(that)S 2949(they)S (will)157 3155 A 3345(appear)S 3647(in)S 3758(the)S 3914(environment)S 4456(of)S 4574(subsequent)S 5054(com-)S 6720 V 1230(mands.)S 1569(The)S 1753(only)S 1958(way)S 2153(to)S (un-export)391 2258 A 2676(a)S 2748(variable)S 3100(is)S 3194(to)S 3299(unset)S 3538(it.)S 10 I 3671(Ash)S 10 R 3848(allows)S 4137(the)S 4286(value)S 4530(of)S 4640(a)S 4711(variable)S 5062(to)S 5166(be)S 6840 V 1230(set)S 1367(at)S 1465(the)S 1613(same)S 1845(time)S 2049(it)S 2130(is)S (exported)352 2222 A 2599(by)S (writing)291 2724 A 7080 V 10 B 1630(export)S 10 R 1935(name=value)S 7320 V 1230(With)S 1456(no)S 1581(arguments)S 2025(the)S (export)257 2173 A 2455(command)S 2876(lists)S 3063(the)S 3211(names)S 3493(of)S 3602(all)S (exported)352 3728 A 4105(variables.)S 7903 V 720(Page)S 941(7)S 2654(\()S 2696(March)S 2984(7,)S (1991)200 3084 A 3292(\))S 4455(September)S 4911(13,)S (1996)200 5061 A 8143 V EP %%Page: 8 8 BP /slant 0 def /height 0 def 480 V 10 R 720(SH)S 857(\()S 899(1)S 957(\))S 2696(Eighth)S (Edition)296 2989 A 4990(SH)S 5127(\()S 5169(1)S 5227(\))S 960 V 10 B 1080(fg)S 10 R 1189([)S 10 I 1248(job)S 10 R 1401(])S 1080 V 1230(Move)S 1500(the)S 1659(speci\256ed)S 2053(job)S 2217(or)S 2337(the)S 2496(current)S 2818(job)S 2983(to)S 3098(the)S (foreground.)472 3258 A 3792(This)S 4008(command)S 4441(is)S 4545(only)S 4760(available)S 5161(on)S 1200 V 1230(systems)S 1573(with)S 1777(Bekeley)S 2132(job)S 2285(control.)S 1368 V 10 B 1080(getopts)S 10 I 1413(optstring)S 1800(var)S 1488 V 10 R 1230(The)S 1412(System)S 1733(V)S 10 I 1831(getopts)S 10 R 2146(command.)S 1656 V 10 B 1080(hash)S 1306(-rv)S 10 I (command)391 1460 A 10 R (...)75 1859 A 1776 V 1230(The)S 1415(shell)S 1633(maintains)S 2052(a)S 2125(hash)S 2337(table)S 2561(which)S 2835(remembers)S 3312(the)S 3464(locations)S 3856(of)S 3969(commands.)S 4483(With)S 4713(no)S 4842(arguments)S 1896 V 1230(whatsoever,)S 1749(the)S 1907(hash)S 2126(command)S 2557(prints)S 2820(out)S 2982(the)S 3139(contents)S 3508(of)S 3626(this)S 3805(table.)S 4085(Entries)S 4405(which)S 4685(have)S 4909(not)S 5071(been)S 2016 V (looked)273 1230 A 1534(at)S 1638(since)S 1876(the)S 2030(last)S 10 I 2201(cd)S 10 R 2327(command)S 2754(are)S 2909(marked)S 3242(with)S 3452(an)S 3578(asterisk;)S 3945(it)S 4033(is)S 4132(possible)S 4493(for)S 4643(these)S 4882(entries)S 5183(to)S 2136 V 1230(be)S 1350(invalid.)S 2376 V 1230(With)S 1465(arguments,)S 1943(the)S 2100(hash)S 2318(command)S 2748(removes)S 3123(the)S 3280(speci\256ed)S 3672(commands)S 4141(from)S 4371(the)S 4528(hash)S 4746(table)S 4976(\(unless)S 2496 V 1230(they)S 1431(are)S 1583(functions\))S 2019(and)S 2192(then)S 2393(locates)S 2701(them.)S 2980(With)S 3209(the)S 10 B 3360(-v)S 10 R 3472(option,)S 10 I 3781(hash)S 10 R 3997(prints)S 4253(the)S 4403(locations)S 4793(of)S 4904(the)S 5054(com-)S 2616 V 1230(mands)S 1519(as)S 1630(it)S 1713(\256nds)S 1935(them.)S 2213(The)S 10 B 2397(-r)S 10 R 2503(option)S 2786(causes)S 3076(the)S 10 I 3227(hash)S 10 R 3444(command)S 3868(to)S 3974(delete)S 4243(all)S 4372(the)S 4523(entries)S 4820(in)S 4926(the)S 5077(hash)S 2736 V 1230(table)S 1451(except)S 1739(for)S 1882(functions.)S 2904 V 10 B 1080(jobid)S 10 R 1329([)S 10 I 1388(job)S 10 R 1541(])S 3024 V 1230(Print)S 1451(the)S 1599(process)S 1926(id's)S 2102(of)S 2211(the)S 2359(processes)S 2770(in)S 2873(the)S 3021(job.)S 3224(If)S 3317(the)S 3465(job)S 3618(argument)S 4023(is)S (omitted,)332 4115 A 4472(use)S 4631(the)S 4779(current)S 5090(job.)S 3192 V 10 B 1080(jobs)S 3312 V 10 R 1230(This)S 1444(command)S 1875(lists)S 2072(out)S 2235(all)S 2371(the)S (background)474 2529 A 3038(processes)S 3459(which)S 3740(are)S 3900(children)S 4266(of)S 4386(the)S 4545(current)S 4867(shell)S 5093(pro-)S 3432 V 1230(cess.)S 3600 V 10 B 1080(pwd)S 3720 V 10 R 1230(Print)S 1459(the)S 1615(current)S 1934(directory.)S 2382(The)S (builtin)262 2573 A 2869(command)S 3299(may)S 3506(differ)S 3765(from)S 3995(the)S 4152(program)S 4527(of)S 4645(the)S 4802(same)S 5043(name)S 3840 V (because)319 1230 A 1586(the)S (builtin)262 1746 A 2045(command)S 2478(remembers)S 2963(what)S 3196(the)S 3355(current)S 3677(directory)S 4077(is)S 4180(rather)S 4452(than)S 4661(recomputing)S 5205(it)S 3960 V (each)185 1230 A 1441(time.)S 1696(This)S 1901(makes)S 2184(it)S 2266(faster.)S 2567(However,)S 2988(if)S 3076(the)S 3225(current)S 3537(directory)S 3927(is)S 4020(renamed,)S 4418(the)S (builtin)262 4567 A 4855(version)S 5177(of)S 4080 V 1230(pwd)S (will)157 1428 A 1610(continue)S 1981(to)S 2084(print)S 2299(the)S 2447(old)S 2600(name)S 2843(for)S 2986(the)S 3134(directory.)S 4248 V 10 B 1080(read)S 10 R 1301([)S 10 B 1360(-p)S 10 I 1475(prompt)S 10 R 1790(])S 1849([)S 10 B 1908(-e)S 10 R 2012(])S 10 I 2071(variable)S 10 R (...)75 2414 A 4368 V 1230(The)S 1416(prompt)S 1735(is)S 1831(printed)S 2145(if)S 2236(the)S 10 B 2388(-p)S 10 R 2507(option)S 2792(is)S 2888(speci\256ed)S 3275(and)S 3450(the)S 3603(standard)S (input)206 3974 A 4210(is)S 4307(a)S 4382(terminal.)S 4798(Then)S 5035(a)S 5110(line)S 4488 V 1230(is)S 1326(read)S 1529(from)S 1754(the)S 1906(standard)S (input.)231 2275 A 2559(The)S (trailing)291 2744 A 3063(newline)S 3410(is)S 3505(deleted)S 3824(from)S 4048(the)S 4199(line)S 4378(and)S 4551(the)S 4702(line)S 4881(is)S (split)173 4976 A 5177(as)S 4608 V 1230(described)S 1655(in)S 1772(the)S 1934(section)S 2258(on)S 2397(word)S (splitting)329 2643 A (above,)265 3011 A 3315(and)S 3499(the)S (pieces)252 3661 A 3952(are)S 4115(assigned)S 4500(to)S 4617(the)S 4779(variables)S 5183(in)S 4728 V 1230(order.)S 1528(If)S 1631(there)S 1868(are)S 2027(more)S (pieces)252 2269 A 2556(than)S 2764(variables,)S 3188(the)S 3346(remaining)S (pieces)252 3789 A (\(along)257 4076 A 4368(with)S 4582(the)S 4739(characters)S 5183(in)S 4848 V 1230(IFS)S 1408(that)S 1591(separated)S 2004(them\))S 2271(are)S 2427(assigned)S 2805(to)S 2915(the)S 3070(last)S 3242(variable.)S 3649(If)S 3749(there)S 3984(are)S 4141(more)S 4381(variables)S 4778(than)S (pieces,)277 4984 A 4968 V 1230(the)S 1378(remaining)S 1811(variables)S 2200(are)S 2349(assigned)S 2720(the)S 2868(null)S 3049(string.)S 5208 V 1230(The)S 10 B 1414(-e)S 10 R 1520(option)S 1803(causes)S 2093(any)S 2265(backslashes)S 2767(in)S 2872(the)S (input)206 3022 A 3255(to)S 3360(be)S 3482(treated)S 3784(specially.)S 4220(If)S 4316(a)S 4389(backslash)S 4808(is)S 4903(followed)S 5328 V 1230(by)S 1356(a)S 1427(newline,)S 1797(the)S 1946(backslash)S 2363(and)S 2534(the)S 2683(newline)S (will)157 3028 A 3211(be)S 3332(deleted.)S 3699(If)S 3793(a)S 3864(backslash)S 4281(is)S 4374(followed)S 4758(by)S 4884(any)S 5054(other)S 5448 V 1230(character,)S 1651(the)S 1799(backslash)S (will)157 2215 A 2397(be)S 2517(deleted)S 2833(and)S 3003(the)S 3151(following)S 3567(character)S (will)157 3963 A 4146(be)S 4267(treated)S 4568(as)S (though)278 4678 A 4982(it)S 5064(were)S 5568 V 1230(not)S 1383(in)S 1486(IFS,)S 1682(even)S 1897(if)S 1984(it)S 2065(is.)S 5736 V 10 B 1080(readonly)S 10 I 1485(name)S 10 R (...)75 1711 A 5856 V 1230(The)S 1429(speci\256ed)S 1829(names)S 2128(are)S 2294(marked)S 2638(as)S 2764(read)S 2980(only,)S 3225(so)S 3356(that)S 3549(they)S (cannot)268 3764 A 4074(be)S 4211(subsequently)S 4777(modi\256ed)S 5177(or)S 5976 V 1230(unset.)S 10 I 1517(Ash)S 10 R 1693(allows)S 1981(the)S 2129(value)S 2372(of)S 2481(a)S 2551(variable)S 2901(to)S 3004(be)S 3124(set)S 3261(at)S 3359(the)S 3507(same)S 3739(time)S 3943(it)S 4024(is)S 4116(marked)S 4443(read)S 4642(only)S 4845(by)S (writing)291 4970 A 6216 V 10 B 1630(readonly)S 10 R 2035(name=value)S 6456 V 1230(With)S 1456(no)S 1581(arguments)S 2025(the)S (readonly)352 2173 A 2550(command)S 2971(lists)S 3158(the)S 3306(names)S 3588(of)S 3697(all)S 3823(read)S 4022(only)S 4225(variables.)S 6624 V 10 B 1080(set)S 10 R 1223([)S 1282({)S 10 B 1355(-)S 10 I 1389(options)S 10 R 1709(|)S 10 B 1754(+)S 10 I 1811(options)S 10 R 2131(|)S 10 B 2176(--)S 10 R 2269(})S 2342(])S 10 I 2401(arg)S 10 R (...)75 2548 A 6744 V 1230(The)S 10 I 1412(set)S 10 R 1549(command)S 1970(performs)S 2359(three)S 2586(different)S 2959(functions.)S 6984 V 1230(With)S 1456(no)S 1581(arguments,)S 2050(it)S 2131(lists)S 2318(the)S 2466(values)S 2748(of)S 2857(all)S 2983(shell)S 3198(variables.)S 7224 V 1230(If)S 1333(options)S 1663(are)S 1822(given,)S 2105(it)S 2196(sets)S 2382(the)S 2540(speci\256ed)S 2933(option)S 3224(\257ags,)S 3474(or)S 3593(clears)S 3865(them)S 4102(if)S 4200(the)S 4359(option)S 4651(\257ags)S 4877(are)S 5037(intro-)S 7344 V 1230(duced)S 1507(with)S 1723(a)S 10 B 1805(+)S 10 R 1899(rather)S 2172(than)S 2382(a)S 10 B 2463(-)S 10 R 2497(.)S 2583(Only)S 2820(the)S 2979(\256rst)S 3172(argument)S 3588(to)S 10 I 3702(set)S 10 R 3850(can)S 4026(contain)S 4358(options.)S 4739(The)S 4932(possible)S 7464 V 1230(options)S 1550(are:)S 7903 V 720(September)S 1176(13,)S (1996)200 1326 A 2654(\()S 2696(March)S 2984(7,)S (1991)200 3084 A 3292(\))S 4990(Page)S 5211(8)S 8143 V EP %%Page: 9 9 BP /slant 0 def /height 0 def 480 V 10 R 720(SH)S 857(\()S 899(1)S 957(\))S 2696(Eighth)S (Edition)296 2989 A 4990(SH)S 5127(\()S 5169(1)S 5227(\))S 960 V 10 B 1230(-e)S 10 R 1518(Causes)S 1829(the)S 1978(shell)S 2195(to)S 2300(exit)S 2478(when)S 2723(a)S 2795(command)S 3218(terminates)S 3665(with)S 3871(a)S (nonzero)324 3943 A 4294(exit)S 4472(status,)S 4753(except)S 5043(when)S 1080 V 1518(the)S 1679(exit)S 1868(status)S 2135(of)S 2257(the)S 2418(command)S 2851(is)S (explicitly)380 2955 A 3372(tested.)S 3694(The)S 3888(exit)S 4076(status)S 4342(of)S 4463(a)S 4545(command)S 4978(is)S 5082(con-)S 1200 V 1518(sidered)S 1835(to)S 1939(be)S (explicitly)380 2061 A 2468(tested)S 2730(if)S 2819(the)S 2969(command)S 3392(is)S 3486(used)S 3697(to)S 3802(control)S 4114(an)S 10 I 4236(if)S 10 R 4300(,)S 10 I (elif)129 4352 A 10 R 4489(,)S 10 I 4541(while)S 10 R 4767(,)S 4819(or)S 10 I (until)184 4930 A 10 R 5122(;)S 5177(or)S 1320 V 1518(if)S 1605(the)S 1753(command)S 2174(is)S 2266(the)S 2414(left)S 2574(hand)S 2794(operand)S 3143(of)S 3252(an)S 3372(``&&'')S 3689(or)S 3798(``||'')S 3999(operator.)S 1560 V 10 B 1230(-f)S 10 R 1518(Turn)S 1739(off)S 1882(\256le)S 2036(name)S 2279(generation.)S 1800 V 10 B 1230(-I)S 10 R 1518(Cause)S 1794(the)S 1947(shell)S 2167(to)S (ignore)257 2275 A 2562(end)S 2738(of)S 2853(\256le)S (conditions.)443 3013 A 3512(\(This)S 3756(doesn't)S 4083(apply)S 4337(when)S 4586(the)S 4740(shell)S 4961(a)S 5037(script)S 1920 V 1518(sourced)S 1856(using)S 2098(the)S 2246(``.'')S 2457(command.\))S 2962(The)S 3144(shell)S (will)157 3359 A 3541(in)S 3644(fact)S 3821(exit)S 3997(if)S 4084(it)S 4165(gets)S 4352(50)S 4477(eof's)S 4704(in)S 4807(a)S 4877(row.)S 2160 V 10 B 1230(-i)S 10 R 1518(Make)S 1782(the)S 1940(shell)S 2165(interactive.)S 2676(This)S 2890(causes)S 3188(the)S 3346(shell)S 3571(to)S 3684(prompt)S 4009(for)S (input,)231 4162 A 4429(to)S 4543(trap)S 4736(interrupts,)S 5183(to)S 2280 V (ignore)257 1518 A 1807(quit)S 1994(and)S 2170(terminate)S 2582(signals,)S 2917(and)S 3093(to)S 3202(return)S 3474(to)S 3583(the)S 3737(main)S 3969(command)S (loop)178 4396 A 4605(rather)S 4872(than)S 5076(exit-)S 2400 V 1518(ing)S 1671(on)S 1796(error.)S 2640 V 10 B 1230(-j)S 10 R 1518(Turns)S 1781(on)S 1909(Berkeley)S 2301(job)S 2457(control,)S 2795(on)S 2923(systems)S 3269(that)S (support)301 3448 A 3777(it.)S 3911(When)S 4179(the)S 4330(shell)S 4549(starts)S 4791(up,)S 4945(the)S 10 B 5097(-j)S 10 R 5194(is)S 2760 V 1518(set)S 1655(by)S 1780(default)S 2085(if)S 2172(the)S 10 B 2320(-i)S 10 R 2407(\257ag)S 2583(is)S 2675(set.)S 3000 V 10 B 1230(-n)S 10 R 1518(Causes)S 1843(the)S 2006(shell)S 2236(to)S 2354(read)S 2568(commands)S 3043(but)S 3211(not)S 3379(execute)S 3727(them.)S 4018(\(This)S 4271(is)S 4379(marginally)S 4856(useful)S 5143(for)S 3120 V 1518(checking)S 1906(the)S 2054(syntax)S 2341(of)S 2450(scripts.\))S 3360 V 10 B 1230(-s)S 10 R 1518(If)S 1615(this)S 1789(\257ag)S 1969(is)S 2066(set)S 2208(when)S 2456(the)S 2609(shell)S 2829(starts)S 3072(up,)S 3227(the)S 3380(shell)S 3600(reads)S 3843(commands)S 4308(from)S 4534(its)S 4659(standard)S (input.)231 5030 A 3480 V 1518(The)S 1700(shell)S 1915(doesn't)S 2236(examine)S 2602(the)S 2750(value)S 2993(of)S 3102(this)S 3272(\257ag)S 3448(any)S 3618(other)S 3850(time.)S 3720 V 10 B 1230(-x)S 10 R 1518(If)S 1611(this)S 1781(\257ag)S 1957(is)S 2049(set,)S 2211(the)S 2359(shell)S (will)157 2574 A 2756(print)S 2971(out)S (each)185 3124 A 3334(command)S 3755(before)S 4038(executing)S 4454(it.)S 3960 V 10 B 1230(-z)S 10 R 1518(If)S 1620(this)S 1799(\257ag)S 1984(is)S 2085(set,)S 2256(the)S 2413(\256le)S 2576(name)S 2828(generation)S 3287(process)S 3623(may)S 3830(generate)S 4206(zero)S 4414(\256les.)S 4666(If)S 4768(it)S 4859(is)S 4961(not)S 5124(set,)S 4080 V 1518(then)S 1717(a)S 1788(pattern)S 2094(which)S 2366(does)S 2576(not)S 2730(match)S 3001(any)S 3171(\256les)S (will)157 3364 A 3546(be)S (replaced)342 3666 A 4033(by)S 4158(a)S (quoted)273 4228 A 4526(version)S 4847(of)S 4956(the)S 5104(pat-)S 4200 V 1518(tern.)S 4440 V 1230(The)S 1425(third)S 1653(use)S 1825(of)S 1947(the)S 2108(set)S 2258(command)S 2692(is)S 2797(to)S 2913(set)S 3063(the)S 3224(values)S 3519(of)S 3641(the)S 3802(shell's)S (positional)396 4104 A 4539(parameters)S 5021(to)S 5138(the)S 4560 V 1230(speci\256ed)S 10 I 1617(args)S 10 R 1803(.)S 1881(To)S 2021(change)S 2334(the)S (positional)396 2485 A 2909(parameters)S (without)307 3380 A 3715(changing)S 4111(any)S 4284(options,)S 4632(use)S 4794(``)S 10 B 4862(--)S 10 R 4930('')S 5026(as)S 5138(the)S 4680 V 1230(\256rst)S 1416(argument)S 1825(to)S 10 I 1932(set)S 10 R 2052(.)S 2131(If)S 2228(no)S 2357(args)S 2554(are)S 2707(present,)S 3052(the)S 3204(set)S 3345(command)S (will)157 3770 A 3956(leave)S 4198(the)S 4350(value)S 4598(of)S 4712(the)S (positional)396 4865 A 4800 V 1230(parameters)S 1704(unchanged,)S 2195(so)S 2315(to)S 2424(set)S 2567(the)S (positional)396 2721 A 3148(parameters)S 3621(to)S 3729(set)S 3871(of)S 3985(values)S 4272(that)S 4453(may)S 4656(be)S 4781(empty,)S 5087(exe-)S 4920 V 1230(cute)S 1423(the)S 1571(command)S 5160 V 1630(shift)S 1834($#)S 5400 V 1230(\256rst)S 1412(to)S 1515(clear)S 1737(out)S 1890(the)S 2038(old)S 2191(values)S 2473(of)S 2582(the)S (positional)396 2730 A 3151(parameters.)S 5568 V 10 B 1080(setvar)S 10 I 1368(variable)S 1728(value)S 5688 V 10 R 1230(Assigns)S 10 I 1577(value)S 10 R 1824(to)S 10 I 1931(variable)S 10 R 2274(.)S 2353(\(In)S 2500(general)S 2826(it)S 2912(is)S 3009(better)S 3269(to)S 3377(write)S 10 I 3615(variable=value)S 10 R 4266(rather)S 4532(than)S 4735(using)S 10 I 4982(setvar)S 10 R 5236(.)S 5808 V 10 I 1230(Setvar)S 10 R 1515(is)S 1610(intended)S 1983(to)S 2088(be)S 2210(used)S 2421(in)S 2526(functions)S 2927(that)S 3105(assign)S 3383(values)S 3667(to)S 3772(variables)S 4163(whose)S 4447(names)S 4731(are)S 4882(passed)S 5177(as)S 5928 V 1230(parameters.\))S 6096 V 10 B 1080(shift)S 10 R 1296([)S 10 I 1355(n)S 10 R 1430(])S 6216 V 1230(Shift)S 1454(the)S (positional)396 1605 A 2029(parameters)S 10 I 2500(n)S 10 R 2578(times.)S 2874(A)S 2976(shift)S 3184(sets)S 3364(the)S 3516(value)S 3763(of)S 3876($1)S 4005(to)S 4112(the)S 4264(value)S 4511(of)S 4624($2,)S 4778(the)S 4930(value)S 5177(of)S 6336 V 1230($2)S 1367(to)S 1482(the)S 1642(value)S 1897(of)S 2018($3,)S 2180(and)S 2362(so)S 2488(on,)S 2650(decreasing)S 3117(the)S 3276(value)S 3530(of)S 3650($#)S 3786(by)S 3922(one.)S 4153(If)S 4257(there)S 4495(are)S 4655(zero)S (positional)396 4865 A 6456 V 1230(parameters,)S 1723(shifting)S 2055(doesn't)S 2376(do)S 2501(anything.)S 6624 V 10 B 1080(trap)S 10 R 1290([)S 10 I 1349(action)S 10 R 1625(])S 10 I (signal)245 1684 A 10 R (...)75 1937 A 6744 V 1230(Cause)S 1502(the)S 1651(shell)S 1867(to)S 1971(parse)S 2210(and)S 2381(execute)S 10 I 2715(action)S 10 R 2992(when)S 3236(any)S 3407(of)S 3517(the)S 3666(speci\256ed)S 4050(signals)S 4356(are)S (received.)367 4507 A 4926(The)S 5110(sig-)S 6864 V 1230(nals)S 1420(are)S 1572(speci\256ed)S 1958(by)S 2086(signal)S 2354(number.)S 10 I 2739(Action)S 10 R 3030(may)S 3231(be)S 3354(null)S 3538(or)S (omitted;)335 3649 A 4011(the)S 4161(former)S 4463(causes)S 4753(the)S 4903(speci\256ed)S 6984 V 1230(signal)S 1499(to)S 1606(be)S (ignored)307 1730 A 2066(and)S 2240(the)S 2392(latter)S 2629(causes)S 2921(the)S 3073(default)S 3382(action)S 3657(to)S 3765(be)S 3890(taken.)S 4188(When)S 4458(the)S 4611(shell)S 4831(forks)S 5068(off)S 5216(a)S 7104 V 1230(subshell,)S 1613(it)S 1698(resets)S 1957(trapped)S 2288(\(but)S 2479(not)S (ignored\))341 2636 A 3006(signals)S 3314(to)S 3421(the)S 3573(default)S 3881(action.)S 4205(The)S 4390(trap)S 4575(command)S 4999(has)S 5161(no)S 7224 V 1230(effect)S 1486(on)S 1611(signals)S 1915(that)S 2091(were)S (ignored)307 2313 A 2645(on)S 2770(entry)S 3002(to)S 3105(the)S 3253(shell.)S 7392 V 10 B 1080(umask)S 10 R 1390([)S 10 I 1449(mask)S 10 R 1681(])S 7512 V 1230(Set)S 1389(the)S 1542(value)S 1790(of)S 1904(umask)S 2196(\(see)S 10 I 2389(umask)S 10 R 2654(\(2\)\))S 2836(to)S 2944(the)S 3098(speci\256ed)S 3487(octal)S 3714(value.)S 4013(If)S 4112(the)S 4266(argument)S 4677(is)S (omitted,)332 4775 A 5138(the)S 7903 V 720(Page)S 941(9)S 2654(\()S 2696(March)S 2984(7,)S (1991)200 3084 A 3292(\))S 4455(September)S 4911(13,)S (1996)200 5061 A 8143 V EP %%Page: 10 10 BP /slant 0 def /height 0 def 480 V 10 R 720(SH)S 857(\()S 899(1)S 957(\))S 2696(Eighth)S (Edition)296 2989 A 4990(SH)S 5127(\()S 5169(1)S 5227(\))S 960 V 1230(umask)S 1517(value)S 1760(is)S 1852(printed.)S 1128 V 10 B 1080(unset)S 10 I 1335(name)S 10 R (...)75 1561 A 1248 V 1230(The)S 1425(speci\256ed)S 1821(variables)S 2223(and)S 2406(functions)S 2818(are)S 2980(unset)S 3230(and)S (unexported.)477 3413 A 3953(If)S 4059(a)S 4142(given)S 4403(name)S (corresponds)486 4659 A 5183(to)S 1368 V 1230(both)S 1433(a)S 1503(variable)S 1853(and)S 2023(a)S 2093(function,)S 2478(both)S 2681(the)S 2829(variable)S 3179(and)S 3349(the)S 3497(function)S 3857(are)S 4006(unset.)S 1536 V 10 B 1080(wait)S 10 R 1290([)S 10 I 1349(job)S 10 R 1502(])S 1656 V 1230(Wait)S 1453(for)S 1598(the)S 1748(speci\256ed)S 2133(job)S 2288(to)S 2393(complete)S 2789(and)S 2962(return)S 3231(the)S 3382(exit)S 3561(status)S 3818(of)S 3930(the)S 4081(last)S 4249(process)S 4579(in)S 4685(the)S 4836(job.)S 5042(If)S 5138(the)S 1776 V 1230(argument)S 1635(is)S (omitted,)332 1727 A 2084(wait)S 2283(for)S 2426(all)S 2552(jobs)S 2744(to)S 2847(complete)S 3241(and)S 3411(the)S 3559(return)S 3825(an)S 3945(exit)S 4121(status)S 4375(of)S 4484(zero.)S 1944 V 9 R 720(E)S 722(EX)S 780(XA)S 848(AM)S 916(MP)S 998(PL)S 1050(LE)S 1108(ES)S 1166(S)S 2064 V 10 R 1080(The)S 1262(following)S 1678(function)S 2038(rede\256nes)S 2427(the)S 10 I 2575(cd)S 10 R 2695(command:)S 2304 V 1480(cd\(\))S 1668({)S 2424 V 1768(if)S 1855(command)S 2276(cd)S 2396("$@")S 2544 V 1768(thenif)S 2028(test)S 2193(-f)S 2286(.enter)S 2664 V 1768(then.)S 1991(.enter)S 2784 V 1768(elsereturn)S 2191(0)S 2904 V 1768(\256)S 3024 V 1768(\256)S 3144 V 1480(})S 3384 V 1080(This)S 1286(function)S 1648(causes)S 1938(the)S 2088(\256le)S (``.enter'')363 2244 A 2634(to)S 2739(be)S 2861(read)S 3062(when)S (you)150 3307 A 3484(enter)S 3714(a)S 3787(directory,)S 4204(if)S 4294(it)S 4378(exists.)S 4685(The)S 10 I (command)391 4870 A 3504 V 10 R 1080(command)S 1505(is)S 1601(used)S 1814(to)S (access)258 1921 A 2208(the)S 2360(real)S 10 I 2541(cd)S 10 R 2665(command.)S 3140(The)S (``return)309 3326 A 3664(0'')S 3811(ensures)S 4142(that)S 4321(the)S 4472(function)S (will)157 4835 A 5020(return)S 3624 V 1080(an)S 1214(exit)S 1404(status)S 1672(of)S 1795(zero)S 2008(if)S 2109(it)S (successfully)492 2204 A 2735(changes)S 3098(to)S 3215(a)S 3299(directory)S 3702(that)S 3892(does)S 4115(not)S 4283(contain)S 4619(a)S (``.enter'')363 4704 A 5107(\256le.)S 3744 V 1080(Rede\256ning)S 1552(existing)S 1901(commands)S 2367(is)S 2465(not)S 2624(always)S 2935(a)S (good)200 3011 A 3242(idea,)S 3466(but)S 3625(this)S 3800(example)S 4171(shows)S 4452(that)S (you)150 4633 A 4813(can)S 4983(do)S 5113(it)S 5199(if)S 3864 V (you)150 1080 A 1255(want)S 1476(to.)S 4032 V 1080(The)S 1262(suspend)S 1610(function)S 1970(distributed)S 2425(with)S 10 I 2629(ash)S 10 R (looks)217 2793 A 3035(like)S 4272 V 1480(#)S (Copyright)407 1555 A 1987(\(C\))S (1989)200 2147 A 2372(by)S 2497(Kenneth)S 2863(Almquist.)S 3312(All)S 3466(rights)S 3720(reserved.)S 4392 V 1480(#)S 1555(This)S 1759(\256le)S 1913(is)S 2005(part)S 2187(of)S 2296(ash,)S 2480(which)S 2751(is)S 2843(distributed)S (under)229 3298 A 3552(the)S 3700(terms)S 4512 V 1480(#)S 1555(speci\256ed)S 1938(by)S 2063(the)S 2211(Ash)S 2398(General)S 2743(Public)S 3025(License.)S 4752 V 1480(suspend\(\))S 1896({)S 4872 V 1768(local)S 1989(-)S 4992 V 1768(set)S 1905(+j)S 5112 V (kill)134 1768 A 1927(-TSTP)S 2222(0)S 5232 V 1480(})S 5472 V 1080(This)S 1286(turns)S 1514(off)S 1659(job)S 1814(control)S 2126(and)S 2298(then)S 2499(sends)S 2750(a)S 2823(stop)S 3018(signal)S 3286(to)S 3392(the)S 3543(current)S 3857(process)S (group,)259 4187 A 4474(which)S 4748(suspends)S 5138(the)S 5592 V 1080(shell.)S 1355(\(When)S 1664(job)S 1826(control)S 2145(is)S 2246(turned)S 2537(on,)S 2696(the)S 2853(shell)S (ignores)296 3077 A 3407(the)S 3564(TSTP)S 3834(signal.\))S 4192(Job)S 4365(control)S (will)157 4684 A 4875(be)S 5004(turned)S 5712 V 1080(back)S 1299(on)S 1428(when)S 1675(the)S 1827(function)S 2191(returns)S (because)319 2500 A (``-'')170 2848 A 3048(is)S 3145(local)S 3371(to)S 3479(the)S 3632(function.)S 4047(As)S 4189(an)S 4314(example)S 4685(of)S 4799(what)S 10 I 5025(not)S 10 R 5183(to)S 5832 V 1080(do,)S 1230(consider)S 1596(an)S 1716(earlier)S 2000(version)S 2321(of)S 10 I 2430(suspend)S 10 R 2753(:)S 6072 V 1480(suspend\(\))S 1896({)S 6192 V (suspend_\257ag=$-)665 1768 A 6312 V 1768(set)S 1905(+j)S 6432 V (kill)134 1768 A 1927(-TSTP)S 2222(0)S 6552 V 1768(set)S (-$suspend_\257ag)608 1905 A 6672 V 1480(})S 6912 V 1080(There)S 1356(are)S 1520(two)S 1711(problems)S 2125(with)S 2344(this.)S 2580(First,)S 10 B 2831(suspend_\257ag)S 10 R 3425(is)S 3533(a)S 3619(global)S 3911(variable)S 4277(rather)S 4554(than)S 4768(a)S 4854(local)S 5091(one,)S 7032 V 1080(which)S (will)157 1359 A 1549(cause)S 1806(problems)S 2213(in)S 2324(the)S 2480(\(unlikely\))S 2909(circumstance)S 3473(that)S 3656(the)S 3811(user)S 4011(is)S 4110(using)S 4359(that)S 4542(variable)S 4899(for)S 5049(some)S 7152 V 1080(other)S 1315(purpose.)S (Second,)321 1711 A 2060(consider)S 2429(what)S 2654(happens)S 3012(if)S 3103(shell)S (received)342 3322 A 3693(an)S 3817(interrupt)S 4193(signal)S 4462(after)S 4677(it)S 4762(executes)S 5138(the)S 7272 V 1080(\256rst)S 10 I 1267(set)S 10 R 1409(command)S 1835(but)S 1992(before)S 2279(it)S 2364(executes)S 2740(the)S (second)279 2892 A 3200(one.)S 3424(The)S 3610(interrupt)S 3986(signal)S (will)157 4255 A 4441(abort)S 4677(the)S 4829(shell)S 5048(func-)S 7392 V 1080(tion,)S 1292(so)S 1412(that)S 1594(the)S (second)279 1748 A 10 I 2058(set)S 10 R 2201(command)S (will)157 2628 A 2816(never)S 3071(be)S 3197(executed)S 3586(and)S 3762(job)S 3921(control)S (will)157 4237 A 4425(be)S 4551(left)S 4717(off.)S 4916(The)S 5104(\256rst)S 7512 V 1080(version)S 1417(of)S 10 I 1542(suspend)S 10 R 1906(avoids)S 2209(this)S 2395(problem)S 2771(by)S 2911(turning)S 3241(job)S 3409(control)S 3734(off)S 3892(only)S 4110(in)S 4228(a)S 4313(local)S (copy)195 4549 A 4784(of)S 4908(the)S 5071(shell)S 7903 V 720(September)S 1176(13,)S (1996)200 1326 A 2654(\()S 2696(March)S 2984(7,)S (1991)200 3084 A 3292(\))S 4940(Page)S 5161(10)S 8143 V EP %%Page: 11 11 BP /slant 0 def /height 0 def 480 V 10 R 720(SH)S 857(\()S 899(1)S 957(\))S 2696(Eighth)S (Edition)296 2989 A 4990(SH)S 5127(\()S 5169(1)S 5227(\))S 960 V 1080(options.)S 1461(The)S 1654(local)S (copy)195 1886 A 2117(of)S 2237(the)S 2396(shell)S 2623(options)S 2955(is)S 3059(discarded)S 3482(when)S 3737(the)S 3897(function)S 4269(is)S 4373(terminated,)S 4866(no)S 5003(matter)S 1080 V 1080(how)S 1278(it)S 1359(is)S 1451(terminated.)S 1248 V 9 R 720(H)S 722(HI)S 790(IN)S 823(NT)S 891(TS)S 949(S)S 1368 V 10 R 1080(Shell)S 1318(variables)S 1713(can)S 1884(be)S 2010(used)S 2226(to)S 2336(provide)S 2675(abbreviations)S 3249(for)S 3399(things)S 3676(which)S (you)150 3954 A 4136(type)S 4341(frequently.)S 4837(For)S 5009(exam-)S 1488 V 1080(ple,)S 1253(I)S 1312(set)S 1608 V (export)257 1800 A 2082(h=$HOME)S 1728 V 1080(in)S 1183(my)S 1336(.pro\256le)S 1649(so)S 1763(that)S 1939(I)S 1998(can)S 2163(type)S 2361(the)S 2509(name)S 2752(of)S 2861(my)S 3014(home)S 3262(directory)S 3651(simply)S 3949(by)S 4074(typing)S 4355(``$h''.)S 1896 V 1080(When)S (writing)291 1350 A 1671(shell)S 1891(procedures,)S 2388(try)S 2530(not)S 2688(to)S 2796(make)S 3044(assumptions)S (about)223 3570 A 3823(what)S 4049(is)S 4146(imported)S 4539(from)S 4766(the)S 4920(environ-)S 2016 V 1080(ment.)S (Explicitly)397 1358 A 1782(unset)S 2021(or)S (initialize)353 2132 A 2512(all)S 2639(variables,)S 3054(rather)S 3316(than)S 3515(assuming)S 3920(they)S (will)157 4119 A 4302(be)S 4423(unset.)S 4711(If)S (you)150 4805 A 4981(use)S 5141(cd,)S 2136 V 1080(it)S 1161(is)S 1253(a)S (good)200 1323 A 1548(idea)S 1741(to)S 1844(unset)S 2081(CDPATH.)S 2304 V 1080(People)S 1379(sometimes)S 1834(use)S (``<&-'')305 1993 A 2323(or)S (``>&-'')305 2432 A 2762(to)S 2865(provide)S 3197(no)S (input)206 3322 A 3553(to)S 3656(a)S 3726(command)S 4147(or)S 4256(to)S 4359(discard)S 4675(the)S 4824(output)S 5106(of)S 5216(a)S 2424 V 1080(command.)S 1551(A)S 1649(better)S 1904(way)S 2097(to)S 2200(do)S 2325(this)S 2495(is)S 2587(to)S 2690(redirect)S 3024(the)S (input)206 3172 A 3403(or)S 3512(output)S 3793(of)S 3902(the)S 4050(command)S 4471(to)S 10 B 4574(/dev/null)S 10 R 4949(.)S 2592 V 1080(Word)S (splitting)329 1334 A 1688(and)S 1858(\256le)S 2012(name)S 2255(generation)S 2705(are)S 2854(performed)S 3299(by)S 3424(default,)S 3755(and)S (you)150 3926 A 4102(have)S 4318(to)S (explicitly)380 4422 A 4828(use)S (double)273 4988 A 2712 V (quotes)262 1080 A 1371(to)S (suppress)346 1478 A 1853(it.)S 1987(This)S 2194(is)S 2289(backwards,)S 2773(but)S (you)150 2929 A 3107(can)S 3275(learn)S 3505(to)S 3611(live)S 3790(with)S 3997(it.)S 4131(Just)S 4315(get)S 4466(in)S 4572(the)S 4723(habit)S 4952(of)S 5064(writ-)S 2832 V 1080(ing)S (double)273 1246 A (quotes)262 1557 A (around)279 1857 A 2174(variable)S 2537(and)S 2720(command)S (substitutions,)532 3154 A 3724(and)S 3907(omit)S 4129(them)S 4368(only)S 4585(when)S (you)150 4842 A 5031(really)S 2952 V 1080(want)S 1306(word)S (splitting)329 1543 A 1902(and)S 2077(\256le)S 2236(name)S 2484(generation.)S 2989(If)S (you)150 3087 A 3267(want)S 3493(word)S (splitting)329 3730 A 4089(but)S 4247(not)S 4405(\256le)S 4564(name)S 4811(generation,)S 3072 V 1080(use)S 1239(the)S 10 B 1387(-f)S 10 R 1480(option.)S 3240 V 9 R 720(A)S 722(AU)S 790(UT)S 858(TH)S 916(HO)S 984(OR)S 1052(RS)S 1114(S)S 3360 V 10 R 1080(Kenneth)S 1446(Almquist)S 3528 V 9 R 720(S)S 722(SE)S 774(EE)S 832(E)S 913(A)S 915(AL)S 983(LS)S 1041(SO)S 1093(O)S 3648 V 10 R 1080(echo\(1\),)S 1438(expr\(1\),)S 1785(line\(1\),)S 2104(pwd\(1\),)S 2445(true\(1\).)S 3816 V 9 R 720(B)S 722(BU)S 784(UG)S 852(GS)S 920(S)S 3936 V 10 R 1080(When)S 1354(command)S (substitution)468 1784 A 2286(occurs)S 2583(inside)S 2857(a)S 2936(here)S 3144(document,)S 3599(the)S 3756(commands)S 4225(inside)S 4499(the)S 4656(here)S 4865(document)S 4056 V 1080(are)S 1230(run)S 1390(with)S 1595(their)S 1806(standard)S (input)206 2173 A 2405(closed.)S 2738(For)S 2904(example,)S 3296(the)S 3445(following)S (will)157 3861 A 4043(not)S 4196(word)S (because)319 4428 A 4772(the)S 4920(standard)S 4176 V (input)206 1080 A 1311(of)S 1420(the)S 10 I 1568(line)S 10 R 1744(command)S (will)157 2165 A 2347(be)S 2467(closed)S 2749(when)S 2992(the)S 3140(command)S 3561(is)S 3653(run:)S 4416 V 1480(cat)S 1623(<<-!)S 4536 V 1480(Line)S 1690(1:)S 1793($\(line\))S 4656 V 1480(Line)S 1690(2:)S 1793($\(line\))S 4776 V 1480(!)S 5064 V (Unsetting)391 1080 A 1496(a)S 1566(function)S 1926(which)S 2197(is)S 2289(currently)S 2678(being)S 2926(executed)S 3309(may)S 3507(cause)S 3756(strange)S 4072(behavior.)S 5232 V 1080(The)S 1264(shell)S 1481(syntax)S 1770(allows)S 2060(a)S 2132(here)S 2333(document)S 2756(to)S 2861(be)S 2983(terminated)S 3441(by)S 3568(an)S 3690(end)S 3862(of)S 3973(\256le)S 4129(as)S 4240(well)S 4441(as)S 4552(by)S 4679(a)S 4752(line)S 4931(contain-)S 5352 V 1080(ing)S 1238(the)S 1391(terminator)S 1841(word)S 2078(which)S 2354(follows)S 2686(the)S 2838(``<<''.)S 3167(What)S 3414(this)S 3588(means)S 3874(is)S 3970(that)S 4150(if)S (you)150 4241 A 4420(mistype)S 4767(the)S 4919(termina-)S 5472 V 1080(tor)S 1217(line,)S 1418(the)S 1566(shell)S (will)157 1781 A 1963(silently)S 2284(swallow)S 2645(up)S 2770(the)S 2918(rest)S 3089(of)S (your)184 3198 A 3407(shell)S 3622(script)S 3871(and)S 4041(stick)S 4256(it)S 4337(in)S 4440(the)S 4588(here)S 4787(document.)S 7903 V 720(Page)S 941(11)S 2654(\()S 2696(March)S 2984(7,)S (1991)200 3084 A 3292(\))S 4455(September)S 4911(13,)S (1996)200 5061 A 8143 V EP %%Trailer %%DocumentFonts: Times-Roman Times-Bold Times-Italic %%Pages: 11