📄 ash.1
字号:
4425(a)S(space\),)283 4505 A4823(deletes)S5138(the)S2784 V1080(character)S1479(or)S1591(sequence)S1988(of)S2100(characters,)S2563(and)S2736(spits)S2948(the)S3099(word)S3334(into)S3518(two)S3697(strings)S3993(at)S4094(that)S4273(point.)S4557(When)S4825(IFS)S4999(begins)S2904 V1080(with)S1290(a)S(space,)249 1366 A1646(the)S1800(shell)S2021(deletes)S2332(either)S2593(of)S2708(the)S2861(strings)S3159(if)S3251(they)S3454(are)S3608(null.)S3844(As)S3986(a)S4061(special)S4371(case,)S4600(if)S4692(the)S4845(word)S5082(con-)S3024 V1080(taining)S1384(the)S(replacement)493 1532 A2050(text)S2226(is)S2318(the)S2466(null)S2647(string,)S2926(the)S3074(word)S3306(is)S3398(deleted.)S3192 V1080(The)S1266(variable)S1620(``$@'')S1928(is)S2024(special)S2333(in)S2440(two)S2620(ways.)S2906(First,)S(splitting)329 3146 A3505(takes)S(place)213 3742 A3985(between)S4351(the)S(positional)396 4504 A4930(parame-)S3312 V1080(ters,)S1281(even)S1501(if)S1593(the)S1746(text)S1927(is)S2023(enclosed)S2404(in)S(double)273 2511 A(quotes.)287 2813 A(Second,)321 3154 A3504(if)S3595(the)S3747(word)S3983(containing)S4436(the)S(replacement)493 4588 A5110(text)S3432 V1080(is)S1179(the)S1334(null)S1522(string)S1783(and)S1960(there)S2194(are)S2351(no)S(positional)396 2484 A2913(parameters,)S3414(then)S3620(the)S3776(word)S4016(is)S4116(deleted.)S4490(The)S4680(result)S4937(of)S5054(these)S3552 V1080(rules)S1309(is)S1409(that)S1593("$@")S1851(is)S1951(equivalent)S2403(to)S2514("$1")S2729("$2")S(...)75 2944 A3052("$)S10 I3143(n)S10 R3193(",)S3292(where)S10 I3572(n)S10 R3655(is)S3755(the)S3910(number)S4249(of)S(positional)396 4365 A4793(parameters.)S3672 V1080(\(Note)S1356(that)S1553(this)S1744(differs)S2054(from)S2297(the)S2467(System)S2810(V)S2930(shell.)S3217(The)S3421(System)S3764(V)S3884(documentation)S4528(claims)S4838(that)S5036("$@")S3792 V1080(behaves)S1436(this)S1613(way;)S1841(in)S1951(fact)S2134(on)S2265(the)S2419(System)S2746(V)S2850(shell)S3071("$@")S3327(is)S3425(equivalent)S3875(to)S3984("")S4097(when)S4346(there)S4579(are)S4734(no)S(positional)396 4865 A3912 V1080(paramteters.\))S4152 V10 B864(File)S1052(Name)S1329(Generation)S4320 V10 R1080(Unless)S1382(the)S10 B1533(-f)S10 R1629(\257ag)S1808(is)S1903(set,)S2068(\256le)S2225(name)S2471(generation)S2925(is)S3021(performed)S3470(after)S3685(word)S(splitting)329 3921 A4279(is)S4375(complete.)S4823(Each)S5054(word)S4440 V1080(is)S1173(viewed)S1490(as)S1600(a)S1671(series)S1927(of)S2036(patterns,)S2405(separated)S2811(by)S2936(slashes.)S3296(The)S3478(process)S3805(of)S3914(expansion)S(replaces)331 4346 A4702(the)S4850(word)S5082(with)S4560 V1080(the)S1233(names)S1520(of)S1634(all)S1765(existing)S2113(\256les)S2311(whose)S2598(names)S2885(can)S3055(be)S3180(formed)S3501(by)S3631(replacing)S(each)185 4037 A4253(pattern)S4564(with)S4774(a)S4850(string)S5110(that)S4680 V1080(matches)S1441(the)S1595(speci\256ed)S1984(pattern.)S2345(There)S2612(are)S2767(two)S2949(restrictions)S3428(on)S3558(this:)S3786(\256rst,)S3998(a)S4073(pattern)S(cannot)268 4383 A4681(match)S4957(a)S5032(string)S4800 V1080(containing)S1539(a)S1619(slash,)S1881(and)S(second,)304 2062 A2402(a)S2483(pattern)S(cannot)268 2799 A3103(match)S3385(a)S3466(string)S3731(starting)S4069(with)S4284(a)S4365(period)S4658(unless)S4945(the)S5104(\256rst)S4920 V1080(character)S1476(of)S1585(the)S1733(pattern)S2038(is)S2130(a)S2200(period.)S5088 V1080(If)S1175(a)S1247(word)S1481(fails)S1682(to)S1787(match)S2060(any)S2232(\256les)S2427(and)S2599(the)S10 B2749(-z)S10 R2855(\257ag)S3033(is)S3127(not)S3282(set,)S3446(then)S3646(the)S3796(word)S(will)157 4030 A4215(be)S4338(left)S4501(unchanged)S4964(\(except)S5208 V1080(that)S1263(the)S1418(meta-characters)S(will)157 2090 A2279(be)S(converted)397 2406 A2835(to)S2945(normal)S3262(characters\).)S3787(If)S3886(the)S10 B4040(-z)S10 R4150(\257ag)S4332(is)S4430(set,)S4598(then)S4802(the)S4956(word)S5194(is)S5328 V1080(only)S1290(left)S1458(unchanged)S1926(if)S(none)195 2021 A2249(of)S2366(the)S2522(patterns)S2874(contain)S3203(a)S3281(character)S3685(that)S3869(can)S4042(match)S4321(anything)S4705(besides)S5034(itself.)S5448 V1080(Otherwise)S1524(the)S10 B1676(-z)S10 R1784(\257ag)S1964(forces)S2240(the)S2392(word)S2628(to)S2735(be)S(replaced)342 2859 A3230(with)S3438(the)S3590(names)S3876(of)S3988(the)S4139(\256les)S4335(that)S4514(it)S4598(matches,)S4981(even)S5199(if)S5568 V1080(there)S1307(are)S1456(zero)S1655(names.)S5808 V10 B864(Patterns)S5976 V10 R1080(A)S10 I1195(pattern)S10 R1527(consists)S1887(of)S2013(normal)S2340(characters,)S2817(which)S3106(match)S3395(themselves,)S3910(and)S4098(meta-characters.)S4831(The)S5031(meta-)S6096 V1080(characters)S1533(are)S(``!'',)195 1699 A1936(``*'',)S2189(``?'',)S2437(and)S(``[''.)195 2624 A2886(These)S3169(characters)S3621(lose)S3825(there)S4069(special)S4391(meanings)S4818(if)S4922(they)S5137(are)S6216 V(quoted.)298 1080 A1428(When)S1693(command)S2114(or)S2223(variable)S(substitution)468 2573 A3066(is)S3158(performed)S3603(and)S3773(the)S3921(dollar)S4181(sign)S4373(or)S4482(back)S(quotes)262 4697 A4984(are)S5133(not)S6336 V(double)273 1080 A(quoted,)298 1386 A1716(the)S1871(value)S2121(of)S2237(the)S2392(variable)S2749(or)S2865(the)S3020(output)S3308(of)S3424(the)S3579(command)S4007(is)S4106(scanned)S4462(for)S4612(these)S4851(characters)S6456 V1080(and)S1250(they)S1448(are)S1597(turned)S1879(into)S2060(meta-characters.)S6624 V1080(Two)S1293(exclamation)S1813(points)S2086(at)S2187(the)S2338(beginning)S2767(of)S2879(a)S2952(pattern)S3260(function)S3623(as)S3736(a)S3810(``not'')S4103(operator,)S4493(causing)S4829(the)S4981(pattern)S6744 V1080(to)S1187(match)S1462(any)S1636(string)S1893(that)S2072(the)S2223(remainder)S2660(of)S2772(the)S2923(pattern)S3231(does)S10 I3443(not)S10 R3599(match.)S3923(Other)S4181(occurances)S4657(of)S4769(exclamation)S6864 V1080(points)S1357(in)S1467(a)S1544(pattern)S1856(match)S2134(exclamation)S2658(points.)S2985(Two)S3202(exclamation)S3726(points)S4004(are)S4161(required)S4530(rather)S4799(than)S5005(one)S5183(to)S6984 V1080(decrease)S1468(the)S(incompatibility)614 1631 A2285(with)S2504(the)S2667(System)S3003(V)S3116(shell)S3346(\(which)S3666(does)S3890(not)S4058(treat)S4278(exclamation)S4809(points)S5093(spe-)S7104 V1080(cially\).)S7272 V1080(An)S1230(asterisk)S(\(``*''\))254 1566 A1848(matches)S2206(any)S2379(string)S2636(of)S2748(characters.)S3236(A)S3337(question)S3705(mark)S3940(matches)S4298(any)S4471(single)S4739(character.)S5188(A)S7392 V1080(left)S1244(bracket)S(\(``[''\))238 1570 A(introduces)419 1837 A2285(a)S2359(character)S2759(class.)S3034(The)S3220(end)S3394(of)S3506(the)S3657(character)S4056(class)S4280(is)S4375(indicated)S4772(by)S4900(a)S(``]'';)198 4973 A5199(if)S7512 V1080(the)S(``]'')170 1233 A1433(is)S1530(missing)S1872(then)S2075(the)S(``['')170 2228 A2428(matches)S2789(a)S(``['')170 2865 A3066(rather)S3333(than)S(introducing)463 3537 A4031(a)S4107(character)S4509(class.)S4786(A)S4890(character)S7903 V720(Page)S941(5)S2654(\()S2696(March)S2984(7,)S(1991)200 3084 A3292(\))S4455(September)S4911(13,)S(1996)200 5061 A8143 VEP%%Page: 6 6BP/slant 0 def/height 0 def480 V10 R720(SH)S857(\()S899(1)S957(\))S2696(Eighth)S(Edition)296 2989 A4990(SH)S5127(\()S5169(1)S5227(\))S960 V1080(class)S1325(matches)S1704(any)S1898(of)S2031(the)S2203(characters)S2662(between)S3046(the)S3217(square)S3528(brackets.)S3962(A)S4083(range)S4355(of)S4487(characters)S4945(may)S5166(be)S1080 V1080(speci\256ed)S1475(using)S1729(a)S1811(minus)S2093(sign.)S2347(The)S2542(character)S2951(class)S3185(may)S3396(be)S3529(complemented)S4159(by)S4297(making)S4636(an)S4769(exclamation)S1200 V1080(point)S1311(the)S1459(\256rst)S1641(character)S2037(of)S2146(the)S2294(character)S2690(class.)S1368 V1080(To)S1231(include)S1567(a)S(``]'')170 1652 A1862(in)S1980(a)S2065(character)S2476(class,)S2737(make)S2995(it)S3091(the)S3254(\256rst)S3451(character)S3862(listed)S4120(\(after)S4380(the)S(``!'',)195 4543 A4778(if)S4880(any\).)S5149(To)S1488 V1080(include)S1401(a)S1471(minus)S1741(sign,)S1958(make)S2201(it)S2282(the)S2430(\256rst)S2612(or)S2721(last)S2886(character)S3282(listed.)S1728 V10 B864(The)S1057(/u)S(Directory)415 1166 A1896 V10 R1080(By)S(convention,)471 1227 A1728(the)S1881(name)S(``/u/user'')410 2129 A2569(refers)S2830(to)S2938(the)S3091(home)S3344(directory)S3738(of)S3852(the)S4005(speci\256ed)S4393(user.)S4641(There)S4907(are)S(good)200 5061 A2016 V1080(reasons)S1409(why)S1609(this)S1781(feature)S(should)267 2089 A2383(be)S(supported)396 2505 A2928(by)S3054(the)S3203(\256le)S3358(system)S3663(\(using)S3940(a)S4011(feature)S4318(such)S4528(as)S4638(symbolic)S5032(links\))S2136 V1080(rather)S1343(than)S1543(by)S1670(the)S1821(shell,)S2064(but)S10 I2220(ash)S10 R2387(is)S2482(capable)S2818(of)S2930(performing)S3411(this)S3584(mapping)S3963(if)S4053(the)S4204(\256le)S4361(system)S4668(doesn't.)S5042(If)S5138(the)S2256 V1080(mapping)S1456(is)S(done)195 1548 A1768(by)S10 I1893(ash)S10 R2040(,)S(setting)268 2090 A2383(the)S10 B2531(-f)S10 R2624(\257ag)S(will)157 2800 A2982(turn)S3169(it)S3250(off.)S2496 V10 B864(Character)S1332(Set)S2664 V10 I1080(Ash)S10 R1265(silently)S1595(discards)S1959(nul)S2121(characters.)S2615(Any)S2823(other)S3065(character)S(will)157 3471 A3663(be)S3793(handled)S4146(correctly)S4540(by)S10 I4675(ash)S10 R4822(,)S4882(including)S2784 V1080(characters)S1515(with)S1719(the)S1867(high)S2070(order)S2308(bit)S2439(set.)S3024 V10 B864(Job)S1045(Names)S1361(and)S1548(Job)S1729(Control)S3192 V10 R1080(The)S1267(term)S10 I1482(job)S10 R1640(refers)S1901(to)S2009(a)S2084(process)S2416(created)S2738(by)S2868(a)S2944(shell)S3165(command,)S3617(or)S3732(in)S3841(the)S3995(case)S4200(of)S4315(a)S4391(pipeline,)S4771(to)S4880(the)S5034(set)S5177(of)S3312 V1080(processes)S1491(in)S1594(the)S1742(pipeline.)S2141(The)S2323(ways)S2555(to)S2658(refer)S2875(to)S2978(a)S3048(job)S3201(are:)S3552 V1480(%)S10 I1564(number)S3672 V10 R1480(%)S10 I1564(string)S3792 V10 R1480(%%)S3912 V10 I1480(process_id)S4152 V10 R1080(The)S1262(\256rst)S1444(form)S1665(identi\256es)S2059(a)S2129(job)S2283(by)S2409(job)S2563(number.)S2946(When)S3212(a)S3283(command)S3705(is)S3798(run,)S10 I3983(ash)S10 R4148(assigns)S4464(it)S4546(a)S4617(job)S4771(number)S5104(\(the)S4272 V1080(lowest)S(unused)284 1379 A1699(number)S2042(is)S2145(assigned\).)S2611(The)S(second)279 2804 A3119(form)S3351(identi\256es)S3756(a)S3837(job)S4001(by)S4136(giving)S4427(a)S4507(pre\256x)S4777(of)S4896(the)S5054(com-)S4392 V1080(mand)S1335(used)S1551(to)S1661(create)S1935(the)S2090(job.)S2300(The)S2489(pre\256x)S2756(must)S2983(be)S3110(unique.)S3465(If)S3565(there)S3800(is)S3900(only)S4111(one)S4289(job,)S4475(then)S4681(the)S4837(null)S5026(pre\256x)S4512 V(will)157 1080 A1268(identify)S1612(the)S1766(job,)S1949(so)S(you)150 2068 A2248(can)S2418(refer)S2640(to)S2748(the)S2901(job)S3059(by)S(writing)291 3189 A3510(``%''.)S3810(The)S3997(third)S4217(form)S4443(refers)S4704(to)S4812(the)S10 I4965(current)S4632 V1080(job)S10 R1208(.)S1291(The)S1481(current)S1800(job)S1961(is)S2061(the)S2217(last)S2390(job)S2551(to)S2662(be)S(stopped)312 2790 A3136(while)S3394(it)S3484(was)S3675(in)S3787(the)S(foreground.)472 3944 A4475(\(See)S4689(the)S4846(next)S5053(para-)S4752 V1080(graph.\))S1418(The)S1600(last)S1765(form)S1986(identi\256es)S2380(a)S2450(job)S2603(by)S2728(giving)S3009(the)S3157(process)S3484(id)S3587(of)S3696(the)S3844(last)S4009(process)S4336(in)S4439(the)S4587(job.)S4920 V1080(If)S1176(the)S1327(operating)S1735(system)S2042(that)S10 I2221(ash)S10 R2388(is)S(running)312 2483 A2823(on)S(supports)340 2951 A3319(job)S3475(control,)S10 I3813(ash)S10 R(will)157 3980 A4166(allow)S(you)150 4419 A4598(to)S4705(use)S4868(it.)S5003(In)S5116(this)S5040 V
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -