⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ch08_19.htm

📁 the unix power tools
💻 HTM
📖 第 1 页 / 共 3 页
字号:
CLASS="row"VALIGN="TOP"><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">${<CODECLASS="replaceable"><I>var</I></CODE>%%<CODECLASS="replaceable"><I>pat</I></CODE>}</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">ksh, bash</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1"><PCLASS="para">Value of <CODECLASS="replaceable"><I>var</I></CODE> with largest <CODECLASS="replaceable"><I>pat</I></CODE> deleted from end.</P></TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1"><ACLASS="xref"HREF="ch09_07.htm"TITLE="String Editing in ksh and bash ">9.7</A></TD></TR><TRCLASS="row"VALIGN="TOP"><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">|</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">csh, sh</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">Pipe standard output.</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1"><PCLASS="para"><ACLASS="xref"HREF="ch01_04.htm"TITLE="Using Pipes to Create a New Tool ">1.4</A>,<ACLASS="xref"HREF="ch13_01.htm#UPT-ART-1023"TITLE="Using Standard Input and Output">13.1</A></P></TD></TR><TRCLASS="row"VALIGN="TOP"><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">|&amp;</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">csh</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">Pipe standard output and standard error.</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1"><ACLASS="xref"HREF="ch13_05.htm"TITLE="Redirection in C Shell: Capture Errors, Too? ">13.5</A></TD></TR><TRCLASS="row"VALIGN="TOP"><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">^</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">sh <EMCLASS="emphasis">only</EM></TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">Pipe character (obsolete).</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1"></TD></TR><TRCLASS="row"VALIGN="TOP"><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">^</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">csh, bash</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">Edit previous command line.</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1"><ACLASS="xref"HREF="ch11_05.htm"TITLE="My Favorite Is ^^ ">11.5</A></TD></TR><TRCLASS="row"VALIGN="TOP"><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">&amp;</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">csh, sh</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">Run program in background.</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1"><PCLASS="para"><ACLASS="xref"HREF="ch01_27.htm"TITLE="How Background Processing Works ">1.27</A>,<ACLASS="xref"HREF="ch01_28.htm"TITLE="Some Gotchas with Background Processing ">1.28</A></P></TD></TR><TRCLASS="row"VALIGN="TOP"><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">?</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">csh, sh</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">Match one character.</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1"><PCLASS="para"><ACLASS="xref"HREF="ch01_16.htm"TITLE="Wildcards ">1.16</A>,<ACLASS="xref"HREF="ch15_02.htm"TITLE="Filename Wildcards in a Nutshell ">15.2</A></P></TD></TR><TRCLASS="row"VALIGN="TOP"><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">*</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">csh, sh</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">Match zero or more characters.</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1"><PCLASS="para"><ACLASS="xref"HREF="ch01_16.htm"TITLE="Wildcards ">1.16</A>,<ACLASS="xref"HREF="ch15_02.htm"TITLE="Filename Wildcards in a Nutshell ">15.2</A></P></TD></TR><TRCLASS="row"VALIGN="TOP"><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">;</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">csh, sh</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">Command separator.</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1"><ACLASS="xref"HREF="ch08_05.htm"TITLE="Command-Line Evaluation ">8.5</A></TD></TR><TRCLASS="row"VALIGN="TOP"><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">;;</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">sh</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">End of <EMCLASS="emphasis">case</EM> statement.</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1"><ACLASS="xref"HREF="ch44_05.htm"TITLE="Test String Values with Bourne Shell case ">44.5</A></TD></TR><TRCLASS="row"VALIGN="TOP"><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">~</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">csh, ksh, bash</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">Home directory.</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1"><ACLASS="xref"HREF="ch14_11.htm"TITLE="Finding (Anyone's) Home Directory, Quickly ">14.11</A></TD></TR><TRCLASS="row"VALIGN="TOP"><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">~<CODECLASS="replaceable"><I>user</I></CODE></TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">csh, ksh, bash</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">Home directory of <CODECLASS="replaceable"><I>user</I></CODE>.</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1"><ACLASS="xref"HREF="ch14_11.htm"TITLE="Finding (Anyone's) Home Directory, Quickly ">14.11</A></TD></TR><TRCLASS="row"VALIGN="TOP"><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">!</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">csh, bash</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">Command history.</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1"><ACLASS="xref"HREF="ch11_02.htm"TITLE="History in a Nutshell ">11.2</A></TD></TR><TRCLASS="row"VALIGN="TOP"><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">-</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">Programs</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">Start of optional argument.</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1"><ACLASS="xref"HREF="ch08_05.htm"TITLE="Command-Line Evaluation ">8.5</A></TD></TR><TRCLASS="row"VALIGN="TOP"><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">-</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">Programs</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1"><PCLASS="para">Read standard input. (Only certain programs.)</P></TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1"><ACLASS="xref"HREF="ch13_13.htm"TITLE='The "Filename&quot; - '>13.13</A></TD></TR><TRCLASS="row"VALIGN="TOP"><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">$#</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">csh, sh</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">Number of arguments to script.</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1"><ACLASS="xref"HREF="ch44_15.htm"TITLE="Handling Command-Line Arguments in Shell Scripts ">44.15</A></TD></TR><TRCLASS="row"VALIGN="TOP"><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">&quot;$@&quot;</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">sh</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">Original arguments to script.</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1"><ACLASS="xref"HREF="ch44_15.htm"TITLE="Handling Command-Line Arguments in Shell Scripts ">44.15</A></TD></TR><TRCLASS="row"VALIGN="TOP"><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">$*</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">csh, sh</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">Arguments to script.</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1"><ACLASS="xref"HREF="ch44_15.htm"TITLE="Handling Command-Line Arguments in Shell Scripts ">44.15</A></TD></TR><TRCLASS="row"VALIGN="TOP"><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">$-</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">sh</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">Flags set in shell.</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1"><ACLASS="xref"HREF="ch02_11.htm"TITLE="Faster ksh and bash Startup with $- Test ">2.11</A></TD></TR><TRCLASS="row"VALIGN="TOP"><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">$?</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">sh</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">Status of previous command.</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1"><ACLASS="xref"HREF="ch44_07.htm"TITLE="Exit Status of UNIX Processes ">44.7</A></TD></TR><TRCLASS="row"VALIGN="TOP"><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">$$</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">csh, sh</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">Process identification number.</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1"><ACLASS="xref"HREF="ch08_14.htm"TITLE="Bourne Shell Quoting ">8.14</A></TD></TR><TRCLASS="row"VALIGN="TOP"><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">$!</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">sh</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1"><PCLASS="para">Process identification number of last background job.</P></TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1"><ACLASS="xref"HREF="ch07_12.htm"TITLE="External Commands Send Signals to Set Variables ">7.12</A></TD></TR><TRCLASS="row"VALIGN="TOP"><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">$&lt;</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">csh</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">Read input from terminal.</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1"><ACLASS="xref"HREF="ch09_11.htm"TITLE="Repeating a Command with a foreach Loop ">9.11</A></TD></TR><TRCLASS="row"VALIGN="TOP"><TDCLASS="entry"ROWSPAN="1"COLSPAN="1"><CODECLASS="replaceable"><I>cmd1</I></CODE> &amp;&amp; <CODECLASS="replaceable"><I>cmd2</I></CODE></TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">csh, sh</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1"><PCLASS="para">Execute <CODECLASS="replaceable"><I>cmd2</I></CODE> if <CODECLASS="replaceable"><I>cmd1</I></CODE> succeeds.</P></TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1"><ACLASS="xref"HREF="ch44_09.htm"TITLE="Testing Your Success ">44.9</A></TD></TR><TRCLASS="row"VALIGN="TOP"><TDCLASS="entry"ROWSPAN="1"COLSPAN="1"><CODECLASS="replaceable"><I>cmd1</I></CODE> || <CODECLASS="replaceable"><I>cmd2</I></CODE></TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">csh, sh</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1"><PCLASS="para">Execute <CODECLASS="replaceable"><I>cmd2</I></CODE> if <CODECLASS="replaceable"><I>cmd1</I></CODE> fails.</P></TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1"><ACLASS="xref"HREF="ch44_09.htm"TITLE="Testing Your Success ">44.9</A></TD></TR><TRCLASS="row"VALIGN="TOP"><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">$(..)</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">ksh, bash</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">Command substitution.</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1"><PCLASS="para"><ACLASS="xref"HREF="ch45_31.htm"TITLE="Nested Command Substitution ">45.31</A>,<ACLASS="xref"HREF="ch09_16.htm"TITLE="Command Substitution ">9.16</A></P></TD></TR><TRCLASS="row"VALIGN="TOP"><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">((..))</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">ksh, bash</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">Arithmetic evaluation.</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1"></TD></TR><TRCLASS="row"VALIGN="TOP"><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">\. <CODECLASS="replaceable"><I>file</I></CODE></TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">sh</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1"><PCLASS="para">Execute commands from <CODECLASS="replaceable"><I>file</I></CODE>in this shell.</P></TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1"><ACLASS="xref"HREF="ch44_23.htm"TITLE="Reading Files with the . and source Commands ">44.23</A></TD></TR><TRCLASS="row"VALIGN="TOP"><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">:</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">sh</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">Evaluate arguments, return true.</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1"><ACLASS="xref"HREF="ch45_09.htm"TITLE='The Unappreciated Bourne Shell  ":&quot; Operator'>45.9</A></TD></TR><TRCLASS="row"VALIGN="TOP"><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">:</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">sh</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">Separate values in paths.</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1"><PCLASS="para"><ACLASS="xref"HREF="ch06_04.htm"TITLE="The PATH Environment Variable ">6.4</A>,<ACLASS="xref"HREF="ch14_05.htm"TITLE="Saving Time When You Change Directories: cdpath ">14.5</A>,<ACLASS="xref"HREF="ch21_08.htm"TITLE="The MAILCHECK and mail Variables Check More than Mail">21.8</A></P></TD></TR><TRCLASS="row"VALIGN="TOP"><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">:</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">csh</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">Variable modifier.</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1"><ACLASS="xref"HREF="ch09_06.htm"TITLE="String Editing (Colon) Operators ">9.6</A></TD></TR><TRCLASS="row"VALIGN="TOP"><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">[]</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">csh, sh</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">Match range of characters.</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1"><PCLASS="para"><ACLASS="xref"HREF="ch01_16.htm"TITLE="Wildcards ">1.16</A>,<ACLASS="xref"HREF="ch15_02.htm"TITLE="Filename Wildcards in a Nutshell ">15.2</A></P></TD></TR><TRCLASS="row"VALIGN="TOP"><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">[]</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">sh</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">Test.</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1"><ACLASS="xref"HREF="ch44_20.htm"TITLE="test: Testing Files and Strings ">44.20</A></TD></TR><TRCLASS="row"VALIGN="TOP"><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">%<CODECLASS="replaceable"><I>job</I></CODE></TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">csh, ksh, bash</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">Identify job number.</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1"><ACLASS="xref"HREF="ch12_01.htm#UPT-ART-0439"TITLE="Job Control: Work Faster, Stop Runaway Jobs ">12.1</A></TD></TR><TRCLASS="row"VALIGN="TOP"><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">(<CODECLASS="replaceable"><I>cmd</I></CODE>;<CODECLASS="replaceable"><I>cmd</I></CODE>)</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1"

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -