📄 0102-0102.html
字号:
<HTML>
<HEAD>
<TITLE>Sams Teach Yourself Linux in 24 Hours:Using the Shell:EarthWeb Inc.-</TITLE>
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
<SCRIPT>
<!--
function displayWindow(url, width, height) {
var Win = window.open(url,"displayWindow",'width=' + width +
',height=' + height + ',resizable=1,scrollbars=yes');
}
//-->
</SCRIPT>
</HEAD>
-->
<!-- ISBN=0672311623 //-->
<!-- TITLE=Sams Teach Yourself Linux in 24 Hours//-->
<!-- AUTHOR=Bill Ball//-->
<!-- PUBLISHER=Macmillan Computer Publishing//-->
<!-- IMPRINT=Sams//-->
<!-- CHAPTER=06 //-->
<!-- PAGES=0083-0102 //-->
<!-- UNASSIGNED1 //-->
<!-- UNASSIGNED2 //-->
<P><CENTER>
<a href="0099-0101.html">Previous</A> | <a href="../ewtoc.html">Table of Contents</A> | <a href="../ch07/0103-0107.html">Next</A>
</CENTER></P>
<A NAME="PAGENUM-102"><P>Page 102</P></A>
<P>The rmv script asks if you're sure you want to empty the trash. If you type an n, the
delete is aborted. If you type a y, the trash is deleted. Because the letter e was found on
the command line, the empty variable was set to true and the statements following the
if ... then test line were run. The script prints a message to your display, and then, using the
read command, waits for you to enter an answer. The answer is then tested, and if yes, the
files in the .trash directory are deleted.
</P>
<P>Using the shell, you can quickly build simple programs to accomplish major tasks. Feel
free to improve this program by adding features or improving on how file names are
handled at the command line. One such improvement may be to add the ability to handle
wildcards or whole directories. See the bash manual page for more information about other
shell commands and operators you can use in your own shell scripts.
</P>
<P><CENTER>
<a href="0099-0101.html">Previous</A> | <a href="../ewtoc.html">Table of Contents</A> | <a href="../ch07/0103-0107.html">Next</A>
</CENTER></P>
</td>
</tr>
</table>
<!-- begin footer information -->
</body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -