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

📄 ch52_04.htm

📁 the unix power tools
💻 HTM
📖 第 1 页 / 共 5 页
字号:
<HTML><!--Distributed by F --><HEAD><TITLE>[Chapter 52] 52.4 Quick Descriptions of What's on the Disc </TITLE><METANAME="DC.title"CONTENT="UNIX Power Tools"><METANAME="DC.creator"CONTENT="Jerry Peek, Tim O'Reilly &amp; Mike Loukides"><METANAME="DC.publisher"CONTENT="O'Reilly &amp; Associates, Inc."><METANAME="DC.date"CONTENT="1998-08-04T21:57:42Z"><METANAME="DC.type"CONTENT="Text.Monograph"><METANAME="DC.format"CONTENT="text/html"SCHEME="MIME"><METANAME="DC.source"CONTENT="1-56592-260-3"SCHEME="ISBN"><METANAME="DC.language"CONTENT="en-US"><METANAME="generator"CONTENT="Jade 1.1/O'Reilly DocBook 3.0 to HTML 4.0"><LINKREV="made"HREF="mailto:online-books@oreilly.com"TITLE="Online Books Comments"><LINKREL="up"HREF="ch52_01.htm"TITLE="52. What's on the Disc"><LINKREL="prev"HREF="ch52_03.htm"TITLE="52.3 Shrink-Wrapped Software for UNIX "><LINKREL="next"HREF="ch52_05.htm"TITLE="52.5 Using the Power Tools CD-ROM "></HEAD><BODYBGCOLOR="#FFFFFF"TEXT="#000000"><DIVCLASS="htmlnav"><H1><IMGSRC="gifs/smbanner.gif"ALT="UNIX Power Tools"USEMAP="#srchmap"BORDER="0"></H1><MAPNAME="srchmap"><AREASHAPE="RECT"COORDS="0,0,466,58"HREF="index.htm"ALT="UNIX Power Tools"><AREASHAPE="RECT"COORDS="467,0,514,18"HREF="jobjects/fsearch.htm"ALT="Search this book"></MAP><TABLEWIDTH="515"BORDER="0"CELLSPACING="0"CELLPADDING="0"><TR><TDALIGN="LEFT"VALIGN="TOP"WIDTH="172"><ACLASS="SECT1"HREF="ch52_03.htm"TITLE="52.3 Shrink-Wrapped Software for UNIX "><IMGSRC="gifs/txtpreva.gif"SRC="gifs/txtpreva.gif"ALT="Previous: 52.3 Shrink-Wrapped Software for UNIX "BORDER="0"></A></TD><TDALIGN="CENTER"VALIGN="TOP"WIDTH="171"><B><FONTFACE="ARIEL,HELVETICA,HELV,SANSERIF"SIZE="-1">Chapter 52<BR>What's on the Disc</FONT></B></TD><TDALIGN="RIGHT"VALIGN="TOP"WIDTH="172"><ACLASS="SECT1"HREF="ch52_05.htm"TITLE="52.5 Using the Power Tools CD-ROM "><IMGSRC="gifs/txtnexta.gif"SRC="gifs/txtnexta.gif"ALT="Next: 52.5 Using the Power Tools CD-ROM "BORDER="0"></A></TD></TR></TABLE>&nbsp;<HRALIGN="LEFT"WIDTH="515"TITLE="footer"></DIV><DIVCLASS="SECT1"><H2CLASS="sect1"><ACLASS="title"NAME="UPT-ART-9502">52.4 Quick Descriptions of What's on the Disc </A></H2><PCLASS="para">All the packages included on the CD-ROM are discussedsomewhere in the book, complete with an icon in the margin to let youknow it's there.But here's a quick listing of what each programdoes and where the book talks about it.  </P><PCLASS="para">If you don't have the disc or just want another way to get them,many of the programs and other files are available on the Internetor via email.There's a <CODECLASS="literal">*</CODE> next to the names of those files in the listingsthat follow.Article<ACLASS="xref"HREF="ch52_07.htm"TITLE="Other Ways to Get the Software ">52.7</A>tells how to get them online.</P><PCLASS="para">Many of the programs listed here are shell scripts.  All shell scripts aretheoretically portable from one platform to another; however,they might have dependencies on programs that either aren'tinstalled on your system, or behave somewhat differently from what the programmer expected.  So beware thatyou might have to tweak the shellscripts a little to make them work correctly on your system.</P><PCLASS="para">Also beware that some scripts written in <EMCLASS="emphasis">awk</EM>, <EMCLASS="emphasis">sed</EM>, or<EMCLASS="emphasis">perl</EM> use <CODECLASS="literal">#!</CODE> syntax on the first line of the script, totell your system what program to run.Not all versions of UNIX support this feature.If yours doesn't, you'll have to convert the script to a shell script.See articles<ACLASS="xref"HREF="ch45_03.htm"TITLE="Don't Need a Shell for Your Script?  Don't Use One ">45.3</A>and<ACLASS="xref"HREF="ch44_04.htm"TITLE="Testing How Your System Executes Files ">44.4</A>for more information.</P><DLCLASS="variablelist"><DTCLASS="term">.emacs_ml *</DT><DDCLASS="listitem"><PCLASS="para"><ACLASS="indexterm"NAME="AUTOID-60684"></A>The <EMCLASS="emphasis">.emacs_ml</EM> file contains a listing ofMike's favorite Emacs commands.If you like them, put them inyour own <EMCLASS="emphasis">$HOME/.emacs</EM> file.Article<ACLASS="xref"HREF="ch32_07.htm"TITLE="Mike's Favorite Time Savers ">32.7</A>.</P></DD><DTCLASS="term">.enter.csh *</DT><DDCLASS="listitem"><PCLASS="para"><ACLASS="indexterm"NAME="AUTOID-60693"></A><EMCLASS="emphasis">.enter.csh</EM> is an example of a C shell script you might want torun when your C shell enters a particular directory.It is meant to be usedwith an alias (which can be found in the <EMCLASS="emphasis">csh_init</EM> file) andwith a <EMCLASS="emphasis">.exit.csh</EM> script.A sample <EMCLASS="emphasis">.exit.csh</EM> script is also included on the disc.Article<ACLASS="xref"HREF="ch14_14.htm"TITLE="Automatic Setup When You Enter/Exit a Directory ">14.14</A>.</P></DD><DTCLASS="term">.enter.sh *</DT><DDCLASS="listitem"><PCLASS="para"><ACLASS="indexterm"NAME="AUTOID-60704"></A><EMCLASS="emphasis">.enter.sh</EM> is an example of a Bourne shell script you might want torun when your Bourne-type shell (including <EMCLASS="emphasis">ksh</EM> and <EMCLASS="emphasis">bash</EM>)enters a particular directory.It is meant to be usedwith a shell function (which can be found in the <EMCLASS="emphasis">sh_init</EM> file) andwith a <EMCLASS="emphasis">.exit.sh</EM> script.A sample <EMCLASS="emphasis">.exit.sh</EM> script is also included on the disc.Article<ACLASS="xref"HREF="ch14_14.htm"TITLE="Automatic Setup When You Enter/Exit a Directory ">14.14</A>.</P></DD><DTCLASS="term">.exit.csh *</DT><DDCLASS="listitem"><PCLASS="para"><ACLASS="indexterm"NAME="AUTOID-60717"></A><EMCLASS="emphasis">.exit.csh</EM> is an example of a shell script you might want torun when your C shell leaves a particular directory.It is meant to be usedwith an alias (which can be found in the <EMCLASS="emphasis">csh_init</EM> file) andwith a <EMCLASS="emphasis">.enter.csh</EM> script.A sample <EMCLASS="emphasis">.enter.csh</EM> script is also included on the disc.Article<ACLASS="xref"HREF="ch14_14.htm"TITLE="Automatic Setup When You Enter/Exit a Directory ">14.14</A>.</P></DD><DTCLASS="term">.exit.sh *</DT><DDCLASS="listitem"><PCLASS="para"><ACLASS="indexterm"NAME="AUTOID-60728"></A><EMCLASS="emphasis">.exit.sh</EM> is an example of a shell script you might want torun when your Bourne-type shell (including <EMCLASS="emphasis">ksh</EM> and <EMCLASS="emphasis">bash</EM>)leaves a particular directory.It is meant to be usedwith a shell function (which can be found in the <EMCLASS="emphasis">sh_init</EM> file) andwith a <EMCLASS="emphasis">.enter.sh</EM> script.A sample <EMCLASS="emphasis">.enter.sh</EM> script is also included on the disc.Article<ACLASS="xref"HREF="ch14_14.htm"TITLE="Automatic Setup When You Enter/Exit a Directory ">14.14</A>.</P></DD><DTCLASS="term">80cols *</DT><DDCLASS="listitem"><PCLASS="para"><ACLASS="indexterm"NAME="AUTOID-60741"></A>The <EMCLASS="emphasis">80cols</EM> file simply contains 80 digits on a single line.You can use this file to determine whether your screen is 80 columnswide, with:</P><PCLASS="para"><BLOCKQUOTECLASS="screen"><PRECLASS="screen">cat 80cols</PRE></BLOCKQUOTE></P><PCLASS="para">Article<ACLASS="xref"HREF="ch42_06.htm"TITLE="Screen Size Testing Files ">42.6</A>.</P></DD><DTCLASS="term">! *</DT><DDCLASS="listitem"><PCLASS="para"><ACLASS="indexterm"NAME="AUTOID-60752"></A>The <EMCLASS="emphasis">!</EM> command (pronounced <EMCLASS="emphasis">bang</EM>) creates temporaryfiles to be used with programs that require filenames in theircommand lines.For example, to <EMCLASS="emphasis">diff</EM> two files after sortingthem, you might do:</P><PCLASS="para"><BLOCKQUOTECLASS="screen"><PRECLASS="screen">diff `! sort file1` `! sort file2`</PRE></BLOCKQUOTE></P><PCLASS="para">Article <ACLASS="xref"HREF="ch09_18.htm"TITLE="Process Substitution ">9.18</A>.</P></DD><DTCLASS="term">addup *</DT><DDCLASS="listitem"><PCLASS="para"><ACLASS="indexterm"NAME="AUTOID-60766"></A><EMCLASS="emphasis">addup</EM> is a shell script that uses <EMCLASS="emphasis">awk</EM> to add up the values in a specified column of its input.Article<ACLASS="xref"HREF="ch49_07.htm"TITLE="Total a Column with addup ">49.7</A>.&#13;</P></DD><DTCLASS="term">age_files *</DT><DDCLASS="listitem"><PCLASS="para"><ACLASS="indexterm"NAME="AUTOID-60775"></A>The <EMCLASS="emphasis">age_files</EM> shell script reports the size of the filesin a given directory by age.Article<ACLASS="xref"HREF="ch16_25.htm"TITLE="Listing Files by Age and Size ">16.25</A>.</P></DD><DTCLASS="term">ascii *</DT><DDCLASS="listitem"><PCLASS="para"><ACLASS="indexterm"NAME="AUTOID-60783"></A><EMCLASS="emphasis">ascii</EM> is a shell script that searches a listing of the ASCIIcharacter set and returns the ASCII decimalvalue of a specified character.Article<ACLASS="xref"HREF="ch51_03.htm"TITLE="ASCII Characters: Listing and Getting Values ">51.3</A>.</P></DD><DTCLASS="term">awf *</DT><DDCLASS="listitem"><PCLASS="para"><ACLASS="indexterm"NAME="AUTOID-60791"></A><EMCLASS="emphasis">awf</EM> (Amazingly Workable Formatter) is an <EMCLASS="emphasis">nroff -man</EM> or<EMCLASS="emphasis">nroff -ms</EM> clone written entirely in (old) <EMCLASS="emphasis">awk</EM>.It is slow and has many restrictions, but does a decent job on mostmanual pages and simple <EMCLASS="emphasis">-ms</EM> documents.It is also a text formatter that is simple enough to be tinkered with,for people who want to experiment.Article<ACLASS="xref"HREF="ch43_17.htm"TITLE="Don't Have nroff?  Try gnroff or awf ">43.17</A>.</P></DD><DTCLASS="term">GNU bash, Version 1.14.6</DT><DDCLASS="listitem"><PCLASS="para"><ACLASS="indexterm"NAME="AUTOID-60803"></A><EMCLASS="emphasis">bash</EM> is the GNU Project's Bourne Again SHell, an interactive shellwith Bourne shell syntax.It also includes interactive command-lineediting, job control on architectures that support it, <EMCLASS="emphasis">csh</EM>-likehistory features and brace expansion, and a slew of other stuff.Article<ACLASS="xref"HREF="ch08_02.htm"TITLE="Introduction to bash">8.2</A>.</P></DD><DTCLASS="term">behead *</DT><DDCLASS="listitem"><PCLASS="para"><ACLASS="indexterm"NAME="AUTOID-60812"></A>The <EMCLASS="emphasis">behead</EM> shell script removes all lines in a fileup to the first blank line.This effectively removes the header fromfiles saved from<SPANCLASS="link">mail or news (<ACLASS="linkend"HREF="ch01_33.htm"TITLE="UNIX Networking and Communications ">1.33</A>)</SPAN>.Article<ACLASS="xref"HREF="ch35_05.htm"TITLE="Remove Mail/News Headers with behead ">35.5</A>.</P></DD><DTCLASS="term">bitmaps *</DT><DDCLASS="listitem"><PCLASS="para"><ACLASS="indexterm"NAME="AUTOID-60821"></A>The Poskanzer Bitmap Collectionis a collection of monochrome bitmaps, for use as backgroundpatterns,clip-art, etc.They are stored in<SPANCLASS="link">X11 (<ACLASS="linkend"HREF="ch01_31.htm"TITLE="The X Window System ">1.31</A>)</SPAN>bitmap format, and most of them are compressed.  If you need them insome other format, use the <EMCLASS="emphasis">netpbm</EM> package, which is alsoincluded on the Power Tools disc.  Article<ACLASS="xref"HREF="ch43_25.htm"TITLE="The Portable Bitmap Package ">43.25</A>.</P></DD><DTCLASS="term">bkedit *</DT><DDCLASS="listitem"><PCLASS="para"><ACLASS="indexterm"NAME="AUTOID-60830"></A><ACLASS="indexterm"NAME="AUTOID-60832"></A><EMCLASS="emphasis">bkedit</EM> is a shell script for making a backup copy of a filebefore starting the <EMCLASS="emphasis">vi</EM> editor on it.  Article<ACLASS="xref"HREF="ch44_11.htm"TITLE="Set Exit Status of a Shell (Script) ">44.11</A>.</P></DD><DTCLASS="term">bsdtar</DT><DDCLASS="listitem"><PCLASS="para"><ACLASS="indexterm"NAME="AUTOID-60842"></A><EMCLASS="emphasis">bsdtar</EM> is very similar to <EMCLASS="emphasis">tar</EM>, but canremap long filenames to unique 14-character filenames onsystems that have a 14-character filename limit.<EMCLASS="emphasis">bsdtar</EM> can only read archives, it cannot createarchives. Article<ACLASS="xref"HREF="ch52_08.htm"TITLE="Building Programs from Source Code ">52.8</A>.</P></DD><DTCLASS="term">bsplit</DT><DDCLASS="listitem"><PCLASS="para"><ACLASS="indexterm"NAME="AUTOID-60852"></A><EMCLASS="emphasis">bsplit</EM> enables you to split binary files into manageable pieces.Users who are familiar with <EMCLASS="emphasis">split</EM> will have no problem with <EMCLASS="emphasis">bsplit</EM>,as the usage of <EMCLASS="emphasis">bsplit</EM> is exactly like the <EMCLASS="emphasis">split</EM> program.Article<ACLASS="xref"HREF="ch35_09.htm"TITLE="Splitting Files at Fixed Points: split ">35.9</A>.</P></DD><DTCLASS="term">cal_today *</DT><DDCLASS="listitem"><PCLASS="para"><ACLASS="indexterm"NAME="AUTOID-60864"></A><EMCLASS="emphasis">cal_today</EM> is a simple shell script that runs <EMCLASS="emphasis">cal</EM> andmarks today's date.Article<ACLASS="xref"HREF="ch48_07.htm"TITLE="cal That Marks Today's Date ">48.7</A>.</P></DD><DTCLASS="term">calen</DT><DDCLASS="listitem"><PCLASS="para"><ACLASS="indexterm"NAME="AUTOID-60873"></A><EMCLASS="emphasis">calen</EM> generates a calendar for a whole year or for acertain range of months within a year in 132 columns.Article<ACLASS="xref"HREF="ch48_08.htm"TITLE="Calendar for 132-Column Terminals or Printers ">48.8</A>.</P></DD><DTCLASS="term">catsaway *</DT><DDCLASS="listitem"><PCLASS="para"><A

⌨️ 快捷键说明

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