📄 index00.sgml
字号:
quoting</link></para> <para><command>" ... " </command> (double quotes) <link linkend="dblquo"><firstterm>weak</firstterm> quoting</link></para><!-- ********************** --> <para><command>() </command> Parentheses <itemizedlist> <listitem><para><command>( ... ) </command> <link linkend="parensref">Command group</link>; starts a <link linkend="subshellsref">subshell</link></para></listitem> <listitem><para><command>( ... ) </command> <link linkend="parengrps">Enclose group</link> of <firstterm>Extended Regular Expressions</firstterm></para></listitem> <listitem> <para><command>>( ... )</command></para> <para><command><( ... ) </command> <link linkend="processsubref">Process substitution</link></para> </listitem> <listitem><para><command> ... ) </command> <link linkend="caseparen">Terminates test-condition</link> in <firstterm>case</firstterm> construct</para></listitem> <listitem><para><command>(( ... )) </command> <link linkend="dblparensref">Double parentheses</link>, in arithmetic expansion</para></listitem> </itemizedlist></para><!-- ********************** --> <para><command>[ </command> <link linkend="leftbracket">Left bracket</link>, <firstterm>test</firstterm> construct</para> <para><command>[ ]</command>Brackets <itemizedlist> <listitem><para><link linkend="brackarray"><firstterm>Array</firstterm> element</link></para></listitem> <listitem><para><link linkend="bracketsref">Enclose character set to match</link> in a <firstterm>Regular Expression</firstterm></para></listitem> <listitem><para><link linkend="bracktest"><firstterm>Test</firstterm> construct</link></para> </listitem> </itemizedlist></para> <para><command>[[ ... ]]</command> <link linkend="dblbrackets">Double brackets</link>, extended <firstterm>test</firstterm> construct</para> <para><command>$ </command> <link linkend="dollarsignref"><firstterm>Anchor</firstterm></link>, in a <link linkend="regexref">Regular Expression</link></para> <para><command>$ </command> <link linkend="varsubn">Prefix to a variable name</link></para> <para><command>$( ... ) </command> <link linkend="commandsubref0">Command substitution</link>, setting a variable with output of a command, using parentheses notation</para> <para><command>` ... ` </command> <link linkend="backquotesref">Command substitution</link>, using <link linkend="backticksref">backquotes</link> notation</para><!-- ********************** --> <para><command>${ ... }</command> Variable manipulation / evaluation <itemizedlist> <listitem><para><command>${var}</command> <link linkend="pssub1">Value of a variable</link></para></listitem> <listitem><para><command>${#var}</command> <link linkend="psorex1">Length of a variable</link></para></listitem> <listitem> <para><command>${#@}</command></para> <para><command>${#*}</command> <link linkend="numposparam">Number of <firstterm>positional parameters</firstterm></link></para></listitem> <listitem> <para><command>${parameter?err_msg}</command> <link linkend="qerrmsg">Parameter-unset message</link></para></listitem> <listitem> <para><command>${parameter-default}</command></para> <para><command>${parameter:-default}</command></para> <para><command>${parameter=default}</command></para> <para><command>${parameter:=default}</command> <link linkend="defparam1">Set default parameter</link></para></listitem> <listitem> <para><command>${parameter+alt_value}</command></para> <para><command>${parameter:+alt_value}</command></para> <para><link linkend="paramaltv">Alternate value</link> of parameter, if set</para> </listitem> <listitem> <para><command>${!var}</command></para> <para><link linkend="ivr2">Indirect referencing of a variable</link>, new notation</para> </listitem> <listitem> <para><command>${!varprefix*}</command></para> <para><command>${!varprefix@}</command></para> <para><link linkend="varprefixm">Match <emphasis>names</emphasis></link> of all previously declared variables beginning with <varname>varprefix</varname></para> </listitem> <listitem> <para><command>${string:position}</command></para> <para><command>${string:position:length}</command> <link linkend="substrextr01">Substring extraction</link></para></listitem> <listitem> <para><command>${var#Pattern}</command></para> <para><command>${var##Pattern}</command> <link linkend="psorex2">Substring removal</link></para></listitem> <listitem> <para><command>${var%Pattern}</command></para> <para><command>${var%%Pattern}</command> <link linkend="pctpatref">Substring removal</link></para></listitem> <listitem> <para><command>${string/substring/replacement}</command></para> <para><command>${string//substring/replacement}</command></para> <para><command>${string/#substring/replacement}</command></para> <para><command>${string/%substring/replacement}</command> <link linkend="substrrepl00">Substring replacement</link></para></listitem> </itemizedlist></para><!-- ********************** --> <para><command>\ </command> <link linkend="escp">Escape</link> the character following <itemizedlist> <listitem><para><command>\< ... \> </command> <link linkend="anglebrac">Angle brackets</link>, <firstterm>escaped</firstterm>, word boundary in a <link linkend="regexref">Regular Expression</link></para></listitem> <listitem><para><command>\{ N \}</command> <link linkend="escpcb"><quote>Curly</quote> brackets</link>, <firstterm>escaped</firstterm>, number of character sets to match in an <link linkend="extregex">Extended RE</link></para></listitem> <listitem><para><command>\; </command> <link linkend="findref0"><firstterm>Semicolon</firstterm></link>, <firstterm>escaped</firstterm>, terminates a <link linkend="findref">find</link> command</para></listitem> <listitem><para><command>\$$ </command> <link linkend="ivrref">Indirect reverencing of a variable</link>, old-style notation</para></listitem> <listitem><para><link linkend="escnewline">Escaping a <firstterm>newline</firstterm></link>, to write a multi-line command</para></listitem> </itemizedlist></para><!-- ********************** --> <para><command>& </command> <itemizedlist> <listitem><para> <command>&> </command> <link linkend="redirouterror">Redirect <emphasis>both</emphasis> <filename>stdout</filename> and <filename>stderr</filename></link> of a command to a file</para></listitem> <listitem><para> <command>>&j </command> <link linkend="ioredirectionref1">Redirect <filename>stdout</filename></link> to <firstterm>file descriptor</firstterm> <firstterm>j</firstterm></para> <para> <command>>&2 </command> <link linkend="redirouterror2">Redirect <filename>stdout</filename></link> of a command to <filename>stderr</filename></para></listitem> <listitem><para> <command>i>&j </command> <link linkend="ioredirectionref1">Redirect <firstterm>file descriptor</firstterm></link> <firstterm>i</firstterm> to <firstterm>file descriptor</firstterm> <firstterm>j</firstterm></para> <para> <command>2>&1 </command> <link linkend="ioredirectionref1">Redirect <filename>stderr</filename></link> to <filename>stdout</filename></para></listitem> <listitem><para><link linkend="cfd">Closing <firstterm>file descriptors</firstterm></link></para> <para><command>n<&-</command> Close input file descriptor <firstterm>n</firstterm></para> <para><command>0<&-</command>, <command><&-</command> Close <filename>stdin</filename></para> <para><command>n>&-</command> Close output file descriptor <firstterm>n</firstterm></para> <para><command>1>&-</command>, <command>>&-</command> Close <filename>stdout</filename></para></listitem> <listitem><para> <command>&& </command> <link linkend="logicaland">Logical AND test operator</link></para></listitem> <listitem><para> <command>Command &</command> <link linkend="bgjob">Run job in <firstterm>background</firstterm></link></para></listitem> </itemizedlist></para><!-- ********************** --> <para><command># </command> <link linkend="hashmarkref">Hashmark</link>, special symbol beginning a script <firstterm>comment</firstterm></para> <para><command>#!</command> <link linkend="shabangref">Sha-bang</link>, special string starting a <link linkend="whatsascript">shell script</link></para><!-- ********************** --> <para><command>* </command> Asterisk <itemizedlist> <listitem><para> <link linkend="asteriskref"><firstterm>Wild card</firstterm></link>, in <link linkend="globbingref">globbing</link> </para></listitem> <listitem><para> <link linkend="asteriskref2">Any number of characters</link> in a <link linkend="regexref">Regular Expression</link> </para></listitem> <listitem><para> <command> ** </command> <link linkend="exponentiationref">Exponentiation</link>, arithmetic operator </para></listitem> </itemizedlist> </para><!-- ********************** --> <para><command>% </command> Percent sign <itemizedlist> <listitem><para> <link linkend="moduloref">Modulo</link>, division-remainder arithmetic operation </para></listitem> <listitem><para> <link linkend="pctpatref">Substring removal</link> (pattern matching) operator</para></listitem> </itemizedlist> </para><!-- ********************** --> <para><command>+ </command> Plus sign <itemizedlist> <listitem><para><link linkend="plusref"><firstterm>Character match</firstterm></link>, in an <link linkend="extregex">extended Regular Expression</link></para></listitem> <listitem><para><link linkend="paramaltv">Prefix to <firstterm>alternate parameter</firstterm></link>, in <firstterm>parameter substitution</firstterm></para></listitem> <listitem><para><command> ++ </command> <link linkend="plusplusref"><firstterm>C-style</firstterm> variable increment</link>, within <firstterm>double parentheses</firstterm></para></listitem> </itemizedlist></para> <para>* * *</para> <para><firstterm>Shell Variables</firstterm></para> <para><command>$_ </command> <link linkend="underscoreref">Last argument to previous command</link></para> <para><command>$- </command> <link linkend="flpref">Flags passed to script</link>, using <link linkend="setref">set</link></para> <para><command>$! </command> <link linkend="pidvarref"><firstterm>Process ID</firstterm> of last background job</link></para> <para><command>$? </command> <link linkend="exsref"><firstterm>Exit status</firstterm> of a command</link></para> <para><command>$@ </command> All the <firstterm>positional parameters</firstterm>, <link linkend="appref2">as <emphasis>separate</emphasis> words</link></para> <para><command> $* </command> All the <firstterm>positional parameters</firstterm>, <link linkend="appref">as a <emphasis>single</emphasis> word</link></para> <para><command>$$ </command> <link linkend="processidref">Process ID</link> of the script</para> <para><command>$# </command> <link linkend="clacountref">Number of arguments passed</link> to a
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -