📄 sh.1
字号:
10 Y1479(\242)S10 R1504(Hi!)S10 Y1664(\242)S10 R2700(#)S2844(Change)S3176(the)S3324(primary)S3668(prompt)S3983(to)S10 I4086(Hi!)S7008 V10 R1260(PS2=)S10 Y1479(\242)S10 R1504(More:)S10 Y1775(\242)S10 R2700(#)S2844(Change)S3176(the)S(secondary)408 3324 A3757(prompt)S4072(to)S10 I4175(More:)S7128 V10 R1260(ls)S10 R-11352(-)S10 R1409(l)S1462($HOME)S2700(#)S2844(List)S3026(the)S3174(home)S3422(directory)S7248 V1260(echo)S1475($PATH)S2700(#)S2844(Echo)S3076(the)S3224(search)S3507(path)S7368 V1260(echo)S1475($?)S2700(#)S2844(Echo)S3076(exit)S3252(status)S3506(of)S3615(previous)S3986(command)S4407(in)S4510(decimal)S7488 V1260(echo)S1475($$)S2700(#)S2844(Echo)S3076(shell's)S3364(pid)S3517(in)S3620(decimal)S7903 V720(Page)S941(1)S4455(September)S4911(13,)S(1996)200 5061 A8143 VEP%%Page: 2 2BP/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 V1260(echo)S1475($!)S2700(#)S2844(Echo)S3076(PID)S3264(of)S3373(last)S(background)474 3538 A4037(process)S1080 V1260(echo)S1475($#)S2700(#)S2844(Echo)S3076(number)S3408(of)S3517(parameters)S3985(\(shell)S4234(script\))S1200 V1260(echo)S1475($2)S2700(#)S2844(Echo)S(second)279 3076 A3380(parameter)S3809(\(shell)S4058(script\))S1320 V1260(echo)S1475("$2")S2700(#)S2844(Echo)S(second)279 3076 A3380(parameter)S(without)307 3809 A4141(expanding)S(spaces)263 4584 A1440 V1260(echo)S1475($*)S2700(#)S2844(Echo)S3076(all)S3202(parameters)S3670(\(shell)S3919(script\))S1560 V1260(echo)S1475($@)S2700(#)S2844(Echo)S3076(all)S3202(parameters)S3670(\(shell)S3919(script\))S1680 V1260(echo)S1475("$@")S2700(#)S2844(Echo)S3076(all)S3202(parameters)S(without)307 3670 A4002(expanding)S(spaces)263 4445 A1848 V1080(The)S1262(shell)S1477(uses)S1675(the)S1823(following)S2239(variables)S2628(for)S2771(speci\256c)S3104(purposes:)S2016 V(SHELL)315 1260 A2700(the)S2848(path)S3046(of)S3155(the)S3303(current)S3614(shell)S2136 V1260(HOME)S2700(the)S2848(default)S3153(value)S3396(for)S3539(the)S3687(cd\(1\))S3925(command)S2256 V1260(PATH)S2700(the)S2848(directories)S3299(to)S3402(be)S3522(searched)S3900(to)S4003(\256nd)S4184(commands)S2376 V1260(IFS)S2700(the)S2848(internal)S3181(\256eld)S3385(separators)S3819(for)S3962(command)S4383(strings)S2496 V1260(PS1)S2700(the)S2848(primary)S3192(shell)S3407(prompt)S2616 V1260(PS2)S2700(the)S(secondary)408 2848 A3281(shell)S3496(prompt)S2784 V1080(There)S1341(are)S1490(various)S1811(forms)S2071(of)S(substitution)468 2180 A2673(on)S2798(the)S2946(shell)S3161(command)S3582(line:)S2952 V(`...`)143 1260 A2700(Command)S3143(string)S3397(between)S(back-quotes)486 3758 A4269(is)S(replaced)342 4361 A4728(by)S4853(its)S4973(output)S3072 V("...")157 1260 A2700(Permits)S3033(variable)S(substitution)468 3383 A3876(between)S(quotes)262 4237 A3192 V('...')143 1260 A2700(Inhibits)S3032(variable)S(substitution)468 3382 A3875(between)S(quotes)262 4236 A3312 V1260($VAR)S(Replaced)375 2700 A3100(by)S3225(contents)S3585(of)S3694(variable)S4044(VAR)S3432 V1260(${VAR})S2700(Delimits)S3072(variable)S3422(VAR)S3660(from)S3881(any)S4051(following)S4467(string)S3600 V1080(The)S1270(expressions)S1772(below)S2051(depend)S2374(on)S2507(whether)S2865(or)S2982(not)S3143(VAR)S3389(has)S3556(ever)S3763(been)S3986(set.)S4181(If)S4282(VAR)S4528(has)S4695(been)S4918(set,)S5088(they)S3720 V1080(give:)S3888 V1260(${VAR-str})S(Replace)325 2700 A3050(expression)S3505(by)S3630(VAR,)S3893(else)S4075(by)S4200(str)S4008 V1260(${VAR=str})S(Replace)325 2700 A3050(expression)S3505(by)S3630(VAR,)S3893(else)S4075(by)S4200(str)S4326(and)S4496(set)S4633(VAR)S4871(to)S4974(str)S4128 V1260(${VAR?str})S(Replace)325 2700 A3050(expression)S3505(by)S3630(VAR,)S3893(else)S4075(print)S4290(str)S4416(and)S4586(exit)S4762(shell)S4248 V1260(${VAR+str})S(Replace)325 2700 A3050(expression)S3505(by)S3630(str,)S3781(else)S3963(by)S4088(null)S4269(string)S4416 V1080(If)S1185(a)S1267(colon)S1527(is)S(placed)263 1631 A1931(after)S2154(VAR,)S2429(the)S2589(expressions)S3095(depend)S3422(on)S3559(whether)S3921(or)S4042(not)S4208(VAR)S4459(is)S4564(currently)S4966(set)S5116(and)S4536 V(non-null.)365 1080 A4704 V1080(The)S1262(shell)S1477(has)S1636(a)S1706(number)S2038(of)S(built-in)296 2147 A2468(commands:)S4872 V1260(:)S2700(return)S2966(true)S3148(status)S4992 V1260(.)S1310(fn)S2700(execute)S3033(shell)S3248(script)S3497(fn)S3606(on)S3731(current)S4042(path)S5112 V1260(break)S1509([n])S2700(break)S2949(from)S3170(a)S3240(for,)S(until)184 3408 A3617(or)S3726(while)S(loop;)206 3975 A4206(exit)S4382(n)S4457(levels)S5232 V1260(continue)S1631([n])S2700(continue)S3071(a)S3141(for,)S(until)184 3309 A3518(or)S3627(while)S(loop;)206 3876 A4107(resume)S4423(nth)S(loop)178 4576 A5352 V1260(cd)S1380([dir])S2700(change)S3010(current)S3321(working)S3681(directory;)S4098(move)S4346(to)S4449($HOME)S5472 V1260(eval)S1453(cmd)S2700(rescan)S2983(cmd,)S3206(performing)S(substitutions)507 3684 A5592 V1260(eval)S2700(rescan)S2983(the)S3131(current)S3442(command)S3863(line)S5712 V1260(exec)S1470(cmd)S2700(execute)S3033(cmd)S(without)307 3231 A3563(creating)S3913(a)S3983(new)S4176(process)S5832 V1260(exec)S1470(<|>)S2700(with)S2904(no)S3029(command)S3450(name,)S3718(modify)S4033(shell)S4248(I/O)S5952 V1260(exit)S1436([n])S2700(exit)S2876(a)S2946(shell)S3161(program,)S3552(with)S3756(exit)S3932(value)S4175(n)S6072 V(export)257 1260 A1542([var])S(export)257 2700 A2982(var)S3136(to)S3239(shell's)S3527(children;)S3910(list)S(exported)352 4058 A4435(variables)S6192 V1260(pwd)S2700(print)S2915(the)S3063(name)S3306(of)S3415(the)S3563(current)S3874(working)S4234(directory)S6312 V1260(read)S1459(var)S2700(read)S2899(a)S2969(line)S3145(from)S3366(stdin)S3586(and)S3756(assign)S4032(to)S4135(var)S6432 V(readonly)352 1260 A1637([var])S2700(make)S2943(var)S(readonly;)380 3097 A3502(list)S(readonly)352 3650 A4027(variables)S6552 V1260(set)S1397(-f)S2700(set)S2837(shell)S3052(\257ag)S3228(\(+f)S3378(unsets)S3654(\257ag\))S6672 V1260(set)S1397(str)S2700(set)S(positional)396 2837 A3258(parameter)S3687(to)S3790(str)S6792 V1260(set)S2700(show)S2937(the)S3085(current)S3396(shell)S3611(variables)S6912 V1260(shift)S2700(reassign)S(positional)396 3055 A3476(parameters)S3944(\(except)S4266(${0}\))S4521(one)S4691(left)S7032 V1260(times)S2700(print)S(accumulated)509 2915 A3449(user)S3642(and)S3812(system)S4116(times)S4359(for)S4502(processes)S7152 V1260(trap)S1442(arg)S1596(sigs)S2700(trap)S2882(signals)S3186(sigs)S3367(and)S3537(run)S3696(arg)S3850(on)S(receipt)275 3975 A7272 V1260(trap)S2700(list)S2848(trapped)S3175(signals)S7392 V1260(umask)S1547([n])S2700(set)S2837(the)S2985(user)S3178(\256le)S3332(creation)S3682(mask;)S3947(show)S4184(the)S4332(current)S4643(umask)S7512 V1260(wait)S1459([n])S2700(wait)S2899(for)S3042(process)S3369(pid)S3522(n;)S3625(wait)S3824(for)S3967(all)S4093(processes)S7903 V720(September)S1176(13,)S(1996)200 1326 A4990(Page)S5211(2)S8143 VEP%%Page: 3 3BP/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(The)S1271(shell)S1495(also)S1691(contains)S2060(a)S2139(programming)S(language,)388 2720 A3142(which)S3422(has)S3590(the)S3747(following)S4172(operators)S4582(and)S4762(\257ow)S4976(control)S1080 V1080(statements:)S1248 V1260(#)S2700(Comment)S3600(The)S3782(rest)S3953(of)S4062(the)S4210(line)S4386(is)S(ignored)307 4478 A1368 V1260(=)S2700(Assignment)S3600(Set)S3754(a)S3824(shell)S4039(variable)S1488 V1260(&&)S2700(Logical)S(AND)219 3056 A3623(Execute)S(second)279 3996 A4323(command)S4767(only)S4993(if)S5104(\256rst)S1608 V(succeeds)358 3600 A1728 V1260(||)S2700(Logical)S3056(OR)S3623(Execute)S(second)279 3996 A4323(command)S4767(only)S4993(if)S5104(\256rst)S1848 V3600(fails)S1968 V(\(...\))143 1260 A(Group)257 2700 A3600(Execute)S3953(enclosed)S4333(commands)S4796(before)S5082(con-)S2088 V3600(tinuing)S2256 V1260(for)S2700(For)S(loop)178 2865 A3068(\(for)S(...)75 3245 A3345(in)S(...)75 3448 A3548(do)S(...)75 3673 A(done\))229 3773 A2376 V1260(case)S2700(Case)S2921(statement)S3332(\(\(case)S(...)75 3599 A3699(\))S(...)75 3758 A3858(;;)S(...)75 3939 A4039(esac\))S2496 V1260(esac)S2700(Case)S2921(statement)S3332(end)S2616 V1260(while)S2700(While)S(loop)178 2971 A3174(\(while)S(...)75 3457 A3557(do)S(...)75 3682 A(done\))229 3782 A2736 V1260(do)S2700(Do/For/While)S(loop)178 3290 A3493(start)S3692(\(do)S(...)75 3851 A(until)184 3951 A(...\))109 4160 A2856 V(done)195 1260 A2700(For/While)S(loop)178 3139 A3342(end)S2976 V1260(if)S(Conditional)474 2700 A3199(statement)S3610(\(if)S(...)75 3731 A3831(else)S(...)75 4013 A4113(elif)S(...)75 4273 A4373(\256\))S3096 V1260(in)S2700(For)S(loop)178 2865 A3068(selection)S3216 V1260(then)S(Conditional)474 2700 A3199(statement)S3610(start)S3336 V1260(else)S(Conditional)474 2700 A3199(statement)S3610(alternative)S3456 V1260(elif)S(Conditional)474 2700 A3199(statement)S3610(end)S3576 V(until)184 1260 A2700(Do)S(loop)178 2848 A3051(end)S3696 V1260(\256)S(Conditional)474 2700 A3199(statement)S3610(end)S3864 V9 R720(S)S722(SE)S774(EE)S832(E)S913(A)S915(AL)S983(LS)S1041(SO)S1093(O)S3984 V10 B1080(echo)S10 R1276(\(1\),)S10 B1444(expr)S10 R1640(\(1\),)S10 B1808(pwd)S10 R1993(\(1\),)S10 B2161(true)S10 R2341(\(1\).)S7903 V720(Page)S941(3)S4455(September)S4911(13,)S(1996)200 5061 A8143 VEP%%Trailer%%DocumentFonts: Times-Roman Times-Bold Times-Italic Symbol%%Pages: 3
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -