📄 bash.ps
字号:
%%BeginPageSetupBP%%EndPageSetup/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\))-.35 E/F1 10.95/Times-Bold@0 SF -.219(NA)72 84 S(ME).219 E F0(bash \255 GNU Bourne-Ag)108 96 Q(ain SHell)-.05 E F1(SYNOPSIS)72 112.8Q/F2 10/Times-Bold@0 SF(bash)108 124.8 Q F0([options] [\214le])2.5 E F1(COPYRIGHT)72 141.6 Q F0(Bash is Cop)108 153.6 Q(yright \251 1989-2011 by the Free Softw)-.1 E(are F)-.1 E(oundation, Inc.)-.15 E F1(DESCRIPTION)72 170.4 Q F2(Bash)108 182.4 Q F0.973(is an)3.474 F F2(sh)3.473 E F0 .973(-compatible command language interpreter that e)B -.15(xe)-.15 G .973(cutes commands read from the standard).15 F(input or from a \214le.)108194.4 Q F2(Bash)5 E F0(also incorporates useful features from the)2.5 E/F3 10/Times-Italic@0 SF -.4(Ko)2.5 G(rn).4 E F0(and)2.5 E F3(C)2.5 E F0(shells \()2.5 E F2(ksh)A F0(and)2.5 E F2(csh)2.5 E F0(\).)A F2(Bash)108211.2 Q F0 .527(is intended to be a conformant implementation of the Sh\ell and Utilities portion of the IEEE POSIX)3.027 F(speci\214cation \(IEEE Standard 1003.1\).)108 223.2 Q F2(Bash)5 E F0(can be con\214gured to be POSIX-conformant by def)2.5 E(ault.)-.1 E F1(OPTIONS)72 240 Q F0 .61(All of the)108 252 R .61(single-character shell options documented in the description of the)5.61 F F2(set)3.11 E F0 -.2(bu)3.11 G .61(iltin command can be).2 F1.284(used as options when the shell is in)108 264 R -.2(vo)-.4 G -.1(ke).2 G 3.785(d. In).1 F(addition,)3.785 E F2(bash)3.785 E F0 1.285(interprets the follo)3.785 F 1.285(wing options when it is)-.25 F(in)108 276 Q -.2(vo)-.4 G -.1(ke).2 G(d:).1 E F2<ad63>108 292.8 Q F3(string)4.166 E F0 .797(If the)12.354 F F2<ad63>3.297 E F0 .796(option is present, then commands are read from)3.297 F F3(string)3.296E F0 5.796(.I).22 G 3.296(ft)-5.796 G .796(here are ar)-3.296 F .796(guments after)-.18 F(the)158 304.8 Q F3(string)2.5 E F0 2.5(,t).22 G(he)-2.5 E 2.5(ya)-.15 G(re assigned to the positional parameters, starting with)-2.5 E F2($0)2.5 E F0(.)A F2<ad69>108 316.8 Q F0(If the)41.52 E F2<ad69>2.5 E F0(option is present, the shell is)2.5 E F3(inter)2.5 E(active)-.15 E F0(.).18 E F2<ad6c>108 328.8 Q F0(Mak)41.52 E(e)-.1 E F2(bash)2.5 E F0(act as if it had been in)2.5 E -.2(vo)-.4 G -.1(ke).2 G 2.5(da).1 G 2.5(sal)-2.5 G(ogin shell \(see)-2.5 E/F4 9/Times-Bold@0 SF(INV)2.5 E(OCA)-.405 E(TION)-.855 E F0(belo)2.25 E(w\).)-.25 E F2<ad72>108 340.8 Q F0(If the)39.86 E F2<ad72>2.5 E F0(option is present, the shell becomes)2.5 E F3 -.37(re)2.5 G(stricted).37 E F0(\(see)3.27 E F4(RESTRICTED SHELL)2.5 E F0(belo)2.25 E(w\).)-.25 E F2<ad73>108 352.8 QF0 .602(If the)40.41 F F2<ad73>3.102 E F0 .602(option is present, or if no ar)3.102 F .602(guments remain after option processing, then commands)-.18 F .617(are read from the standard input.)158 364.8 R .617(This option allo)5.617 F .616(ws the positional parameters to be set when)-.25 F(in)158376.8 Q -.2(vo)-.4 G(king an interacti).2 E .3 -.15(ve s)-.25 H(hell.).15 E F2<ad44>108 388.8 Q F0 3.183(Al)37.08 G .683(ist of all double-quoted strings preceded by)-3.183 F F2($)3.184 E F0.684(is printed on the standard output.)3.184 F .684(These are)5.684 F.458(the strings that are subject to language translation when the curr\ent locale is not)158 400.8 R F2(C)2.958 E F0(or)2.958 E F2(POSIX)2.958E F0(.)A(This implies the)158 412.8 Q F2<ad6e>2.5 E F0(option; no commands will be e)2.5 E -.15(xe)-.15 G(cuted.).15 E F2([\255+]O [)108 424.8 Q F3(shopt_option)A F2(])A F3(shopt_option)158436.8 Q F0 1.097(is one of the shell options accepted by the)3.596 F F2(shopt)3.597 E F0 -.2(bu)3.597 G 1.097(iltin \(see).2 F F4 1.097(SHELL B)3.597 F(UIL)-.09 E(TIN)-.828 E(COMMANDS)158 448.8 Q F0(belo)3.003 E 3.253(w\). If)-.25 F F3(shopt_option)3.253 E F0 .753(is present,)3.253 F F2<ad4f>3.253 E F0 .753(sets the v)3.253 F .753(alue of that option;)-.25 F F2(+O)3.252 E F0(unsets)3.252 E 2.624(it. If)158 460.8 R F3(shopt_option)2.624 E F0 .124(is not supplied, the names and v)2.624 F .125(alues of the shell options accepted by)-.25 F F2(shopt)2.625 E F0 .506(are printed on the standard output.)158 472.8 R .505(If the in)5.505 F-.2(vo)-.4 G .505(cation option is).2 F F2(+O)3.005 E F0 3.005(,t)C .505(he output is displayed in a)-3.005 F(format that may be reused as input.)158 484.8 Q F2<adad>108 496.8 Q F0(A)38.6 E F2<adad>3.363 E F0 .864(signals the end of options and disables further option processing.)3.363 F(An)5.864 E 3.364(ya)-.15 G -.18(rg)-3.364 G .864(uments after).18 F(the)158 508.8 Q F2<adad>2.5 E F0(are treated as \214lenames and ar)2.5 E 2.5(guments. An)-.18 F(ar)2.5 E(gument of)-.18 E F2<ad>2.5 E F0(is equi)2.5 E -.25(va)-.25 G(lent to).25 E F2<adad>2.5 E F0(.)A F2(Bash)108 525.6 Q F0 .304(also interprets a number of multi-character options.)2.804 F .303(These options must appear on the command line)5.303 F(before the single-character options to be recognized.)108 537.6 Q F2<adad646562>108 554.4 Q(ugger)-.2 E F0 .474(Arrange for the deb)144566.4 R .474(ugger pro\214le to be e)-.2 F -.15(xe)-.15 G .475(cuted before the shell starts.).15 F -.45(Tu)5.475 G .475(rns on e).45F .475(xtended deb)-.15 F(ug-)-.2 E(ging mode \(see the description of the)144 578.4 Q F2(extdeb)2.5 E(ug)-.2 E F0(option to the)2.5 E F2(shopt)2.5 E F0 -.2(bu)2.5 G(iltin belo).2 E(w\).)-.25 E F2(\255\255dump\255po\255strings)108 590.4 Q F0(Equi)144 602.4 Q -.25(va)-.25 G(lent to).25 E F2<ad44>2.5 E F0 2.5(,b)C(ut the output is in the GNU)-2.7 E F3 -.1(ge)2.5 G(tte).1 E(xt)-.2 E F2(po)2.5 E F0(\(portable object\) \214le format.)2.5 E F2(\255\255dump\255strings)108 614.4 Q F0(Equi)144 626.4 Q -.25(va)-.25 G(lent to).25 E F2<ad44>2.5 E F0(.)A F2(\255\255help)108 638.4 Q F0(Display a usage message on standard output and e)6.26 E(xit successfully)-.15 E(.)-.65 E F2<adad696e6974ad8c6c65>108 650.4 Q F3(\214le)2.5 E F2<adad72>108 662.4 Q(c\214le)-.18 E F3(\214le)2.5 E F0(Ex)144 674.4 Q 1.599(ecute commands from)-.15 F F3(\214le)6.009 E F01.598(instead of the standard personal initialization \214le)4.279 F F3(~/.bashr)3.598 E(c)-.37 E F0 1.598(if the)4.408 F(shell is interacti)144 686.4 Q .3 -.15(ve \()-.25 H(see).15 E F4(INV)2.5 E(OCA)-.405 E(TION)-.855 E F0(belo)2.25 E(w\).)-.25 E F2(\255\255login)108 703.2 Q F0(Equi)144 715.2 Q -.25(va)-.25 G(lent to).25 E F2<ad6c>2.5 E F0(.)A(GNU Bash-4.2)72 768 Q(2010 December 28)135.965 E(1)190.955 E 0 Cg EP%%Page: 2 2%%BeginPageSetupBP%%EndPageSetup/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\))-.35 E/F1 10/Times-Bold@0 SF(\255\255noediting)108 84 Q F0(Do not use the GNU)144 96 Q F1 -.18(re)2.5 G(adline).18 E F0(library to read command lines when the shell is interacti)2.5 E -.15(ve)-.25 G(.).15 E F1(\255\255nopr)108 112.8 Q(o\214le)-.18 E F0 .017(Do not read either the system-wide startup \214le)144 124.8 R/F2 10/Times-Italic@0 SF(/etc/pr)4.183 E(o\214le)-.45 E F0 .017(or an)4.183 F2.517(yo)-.15 G 2.517(ft)-2.517 G .018(he personal initialization \214les)-2.517 F F2(~/.bash_pr)144 136.8 Q(o\214le)-.45 E F0(,).18 E F2(~/.bash_lo)2.698 E(gin)-.1 E F0 2.698(,o).24 G(r)-2.698 E F2(~/.pr)2.698 E(o\214le)-.45 E F0 5.198(.B).18 G 2.698(yd)-5.198 G(ef)-2.698 E(ault,)-.1 E F1(bash)2.698 E F0 .198(reads these \214les when it is in)2.698 F -.2(vo)-.4 G -.1(ke).2 G2.697(da).1 G(s)-2.697 E 2.5(al)144 148.8 S(ogin shell \(see)-2.5 E/F3 9/Times-Bold@0 SF(INV)2.5 E(OCA)-.405 E(TION)-.855 E F0(belo)2.25 E(w\).)-.25 E F1<adad6e6f72>108 165.6 Q(c)-.18 E F0 1.228(Do not read and e)5.34 F -.15(xe)-.15 G 1.228(cute the personal initialization \214le).15F F2(~/.bashr)3.228 E(c)-.37 E F0 1.228(if the shell is interacti)4.038F -.15(ve)-.25 G 6.228(.T).15 G(his)-6.228 E(option is on by def)144177.6 Q(ault if the shell is in)-.1 E -.2(vo)-.4 G -.1(ke).2 G 2.5(da).1G(s)-2.5 E F1(sh)2.5 E F0(.)A F1(\255\255posix)108 194.4 Q F0 1.783(Change the beha)144 206.4 R 1.782(vior of)-.2 F F1(bash)4.282 E F01.782(where the def)4.282 F 1.782(ault operation dif)-.1 F 1.782(fers from the POSIX standard to)-.25 F(match the standard \()144 218.4Q F2(posix mode)A F0(\).)A F1<adad72>108 235.2 Q(estricted)-.18 E F0(The shell becomes restricted \(see)144 247.2 Q F3(RESTRICTED SHELL)2.5E F0(belo)2.25 E(w\).)-.25 E F1<adad76>108 264 Q(erbose)-.1 E F0(Equi)144 276 Q -.25(va)-.25 G(lent to).25 E F1<ad76>5 E F0(.)A F1<adad76>108292.8 Q(ersion)-.1 E F0(Sho)144 304.8 Q 2.5(wv)-.25 G(ersion information for this instance of)-2.65 E F1(bash)2.5 E F0(on the standard output and e)2.5 E(xit successfully)-.15 E(.)-.65 E/F410.95/Times-Bold@0 SF(ARGUMENTS)72 321.6 Q F0 .016(If ar)108 333.6 R.016(guments remain after option processing, and neither the)-.18 F F1<ad63>2.516 E F0 .016(nor the)2.516 F F1<ad73>2.516 E F0 .016(option has been supplied, the \214rst)2.516 F(ar)108 345.6 Q .041(gume\nt is assumed to be the name of a \214le containing shell commands.)-.18F(If)5.041 E F1(bash)2.541 E F0 .041(is in)2.541 F -.2(vo)-.4 G -.1(ke).2 G 2.541(di).1 G 2.541(nt)-2.541 G .041(his f)-2.541 F(ashion,)-.1 EF1($0)108 357.6 Q F0 .936(is set to the name of the \214le, and the pos\itional parameters are set to the remaining ar)3.435 F(guments.)-.18 EF1(Bash)5.936 E F0 .234(reads and e)108 369.6 R -.15(xe)-.15 G .234(cutes commands from this \214le, then e).15 F(xits.)-.15 E F1(Bash)5.234 E F0 1.334 -.55('s e)D .234(xit status is the e).4 F .233(xit status of the last com-)-.15 F .348(mand e)108 381.6 R -.15(xe)-.15G .348(cuted in the script.).15 F .348(If no commands are e)5.348 F -.15(xe)-.15 G .348(cuted, the e).15 F .349(xit status is 0.)-.15 F .349(An attempt is \214rst made to)5.349 F .254(open the \214le in the current directory)108 393.6 R 2.754(,a)-.65 G.253(nd, if no \214le is found, then the shell searches the directories in)-2.754 F F3 -.666(PA)2.753 G(TH)-.189 E F0(for the script.)108 405.6 QF4(INV)72 422.4 Q(OCA)-.493 E(TION)-1.04 E F0(A)108 434.4 Q F2(lo)2.5 E(gin shell)-.1 E F0(is one whose \214rst character of ar)2.5 E(gument zero is a)-.18 E F1<ad>2.5 E F0 2.5(,o)C 2.5(ro)-2.5 G(ne started with the)-2.5 E F1(\255\255login)2.5 E F0(option.)2.5 E(An)108 451.2 Q F2(inter)2.814 E(active)-.15 E F0 .314(shell is one started without non-option ar)2.814 F .315(guments and without the)-.18 F F1<ad63>2.815 E F0 .315(option whose standard)2.815 F 1.5(input and error are both connected to terminals \(as determined by)108463.2 R F2(isatty)4 E F0 1.5(\(3\)\), or one started with the).32 F F1<ad69>4 E F0(option.)108 475.2 Q F3(PS1)5.289 E F0 .289(is set and)2.539F F1<24ad>2.789 E F0(includes)2.789 E F1(i)2.789 E F0(if)2.789 E F1(bash)2.789 E F0 .289(is interacti)2.789 F -.15(ve)-.25 G 2.789(,a).15 G(llo)-2.789 E .29(wing a shell script or a startup \214le to test this)-.25 F(state.)108 487.2 Q .033(The follo)108 504 R .033(wing paragraphs describe ho)-.25 F(w)-.25 E F1(bash)2.532 E F0 -.15(exe)2.532 G .032(cutes its startup \214les.).15 F .032(If an)5.032 F2.532(yo)-.15 G 2.532(ft)-2.532 G .032(he \214les e)-2.532 F .032(xist b)-.15 F .032(ut cannot be)-.2 F(read,)108 516 Q F1(bash)3.085 EF0 .585(reports an error)3.085 F 5.585(.T)-.55 G .585(ildes are e)-5.935F .586(xpanded in \214le names as described belo)-.15 F 3.086(wu)-.25 G(nder)-3.086 E F1 -.18(Ti)3.086 G .586(lde Expansion).18 F F0(in the)108528 Q F3(EXP)2.5 E(ANSION)-.666 E F0(section.)2.25 E(When)108 544.8 Q F1(bash)2.896 E F0 .396(is in)2.896 F -.2(vo)-.4 G -.1(ke).2 G 2.896(da).1G 2.896(sa)-2.896 G 2.896(ni)-2.896 G(nteracti)-2.896 E .696 -.15(ve l)-.25 H .396(ogin shell, or as a non-interacti).15 F .695 -.15(ve s)-.25H .395(hell with the).15 F F1(\255\255login)2.895 E F0 .395(option, it)2.895 F 1.333(\214rst reads and e)108 556.8 R -.15(xe)-.15 G 1.333(cutes commands from the \214le).15 F F2(/etc/pr)3.833 E(o\214le)-.45 EF0 3.834(,i)C 3.834(ft)-3.834 G 1.334(hat \214le e)-3.834 F 3.834(xists. After)-.15 F 1.334(reading that \214le, it)3.834 F .249(looks for)108 568.8 R F2(~/.bash_pr)2.749 E(o\214le)-.45 E F0(,)A F2(~/.bash_lo)2.749 E(gin)-.1 E F0 2.749(,a)C(nd)-2.749 E F2(~/.pr)2.749 E(o\214le)-.45 E F0 2.749(,i)C 2.749(nt)-2.749 G .249(hat order)-2.749 F2.748(,a)-.4 G .248(nd reads and e)-2.748 F -.15(xe)-.15 G .248(cutes commands from).15 F .796(the \214rst one that e)108 580.8 R .796(xists and is readable.)-.15 F(The)5.796 E F1(\255\255nopr)3.296 E(o\214le)-.18 E F0 .797(option may be used when the shell is started to)3.296 F(inhibit this beha)108 592.8 Q(vior)-.2 E(.)-.55 E(When a login shell e)108 609.6 Q(xits,)-.15 E F1(bash)2.5 E F0(reads and e)2.5 E -.15(xe)-.15 G(cutes commands from the \214le).15 EF2(~/.bash_lo)2.5 E(gout)-.1 E F0 2.5(,i)C 2.5(fi)-2.5 G 2.5(te)-2.5 G(xists.)-2.65 E 1.698(When an interacti)108 626.4 R 1.998 -.15(ve s)-.25H 1.698(hell that is not a login shell is started,).15 F F1(bash)4.197 EF0 1.697(reads and e)4.197 F -.15(xe)-.15 G 1.697(cutes commands from).15 F F2(~/.bashr)108 638.4 Q(c)-.37 E F0 2.535(,i)C 2.535(ft)-2.535 G.035(hat \214le e)-2.535 F 2.535(xists. This)-.15 F .036(may be inhibited by using the)2.535 F F1<adad6e6f72>2.536 E(c)-.18 E F02.536(option. The)2.536 F F1<adad72>2.536 E(c\214le)-.18 E F2(\214le)2.536 E F0 .036(option will)2.536 F(force)108 650.4 Q F1(bash)2.5 E F0(to read and e)2.5 E -.15(xe)-.15 G(cute commands from).15 E F2(\214le)2.5 E F0(instead of)2.5 E F2(~/.bashr)2.5 E(c)-.37 E F0(.)A(When)108667.2 Q F1(bash)5.306 E F0 2.806(is started non-interacti)5.306 F -.15(ve)-.25 G(ly).15 E 5.306(,t)-.65 G 5.306(or)-5.306 G 2.806(un a shell script, for e)-5.306 F 2.805(xample, it looks for the v)-.15F(ariable)-.25 E F3 -.27(BA)108 679.2 S(SH_ENV).27 E F0 1.01(in the en)3.26 F 1.01(vironment, e)-.4 F 1.01(xpands its v)-.15 F 1.01(alue if it appears there, and uses the e)-.25 F 1.011(xpanded v)-.15 F1.011(alue as the)-.25 F(name of a \214le to read and e)108 691.2 Q -.15(xe)-.15 G(cute.).15 E F1(Bash)5 E F0(beha)2.5 E -.15(ve)-.2 G 2.5(sa).15 G 2.5(si)-2.5 G 2.5(ft)-2.5 G(he follo)-2.5 E(wing command were e)-.25 E -.15(xe)-.15 G(cuted:).15 E/F5 10/Courier@0 SF(if [ \255n "$BASH_ENV" ]; then . "$BASH_ENV"; fi)144 709.2 Q F0 -.2(bu)108 727.2 S 2.5(tt).2 G(he v)-2.5 E(alue of the)-.25 E F3 -.666(PA)2.5 G(TH)-.189 E F0 -.25(va)2.25 G(riable is not used to search for the \214le name.).25 E(GNU Bash-4.2)72768 Q(2010 December 28)135.965 E(2)190.955 E 0 Cg EP%%Page: 3 3%%BeginPageSetupBP%%EndPageSetup/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\))-.35 E(If)108 84 Q/F1 10/Times-Bold@0 SF(bash)3.417 E F0 .917(is in)3.417 F -.2(vo)-.4 G -.1(ke).2 G 3.417(dw).1 G .917(ith the name)-3.417F F1(sh)3.417 E F0 3.417(,i)C 3.417(tt)-3.417 G .917(ries to mimic the startup beha)-3.417 F .917(vior of historical v)-.2 F
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -