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

📄 ch50_09.htm

📁 the unix power tools
💻 HTM
字号:
<HTML><!--Distributed by F --><HEAD><TITLE>[Chapter 50] 50.9 Reading a Permuted Index </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:00Z"><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="ch50_01.htm"TITLE="50. Help--Online Documentation, etc."><LINKREL="prev"HREF="ch50_08.htm"TITLE="50.8 Which Version Am I Using? "><LINKREL="next"HREF="ch50_10.htm"TITLE="50.10 Make Your Own Man Pages Without Learning troff"></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="ch50_08.htm"TITLE="50.8 Which Version Am I Using? "><IMGSRC="gifs/txtpreva.gif"SRC="gifs/txtpreva.gif"ALT="Previous: 50.8 Which Version Am I Using? "BORDER="0"></A></TD><TDALIGN="CENTER"VALIGN="TOP"WIDTH="171"><B><FONTFACE="ARIEL,HELVETICA,HELV,SANSERIF"SIZE="-1">Chapter 50<BR>Help--Online Documentation, etc.</FONT></B></TD><TDALIGN="RIGHT"VALIGN="TOP"WIDTH="172"><ACLASS="SECT1"HREF="ch50_10.htm"TITLE="50.10 Make Your Own Man Pages Without Learning troff"><IMGSRC="gifs/txtnexta.gif"SRC="gifs/txtnexta.gif"ALT="Next: 50.10 Make Your Own Man Pages Without Learning troff"BORDER="0"></A></TD></TR></TABLE>&nbsp;<HRALIGN="LEFT"WIDTH="515"TITLE="footer"></DIV><DIVCLASS="SECT1"><H2CLASS="sect1"><ACLASS="title"NAME="UPT-ART-2130">50.9 Reading a Permuted Index </A></H2><PCLASS="para"><ACLASS="indexterm"NAME="AUTOID-59495"></A>The first time that people new to UNIX take a look at the front of the system's<EMCLASS="emphasis">UNIX Reference Manual</EM>, they are likely to be surprised by the most unlikelylooking document: the ubiquitous permuted index. The index looks somethinglike the one shown below, which actually shows a complete permuted index basedon the three commands <EMCLASS="emphasis">ar</EM>, <EMCLASS="emphasis">at</EM>, and <EMCLASS="emphasis">awk</EM>. This miniature index is used as an example throughout this article.</P><PCLASS="para"><BLOCKQUOTECLASS="screen"><PRECLASS="screen">                          maintainer   ar: archive and library ........... ar(1)                                 ar:   archive and library maintainer .... ar(1)                                time   at: execute commands at a later ... at(1)                 processing language   awk: pattern scanning and ......... awk(1)                         at: execute   commands at a later time .......... at(1)                                 at:   execute commands at a later time .. at(1)awk: pattern scanning and processing   language .......................... awk(1)           at: execute commands at a   later time ........................ at(1)                     ar: archive and   library maintainer ................ ar(1)             ar: archive and library   maintainer ........................ ar(1)                       language awk:   pattern scanning and processing ... awk(1)           awk: pattern scanning and   processing language ............... awk(1)                        awk: pattern   scanning and processing language .. awk(1)     at: execute commands at a later   time .............................. at(1)</PRE></BLOCKQUOTE></P><PCLASS="para">Like the <EMCLASS="emphasis">UNIX Reference Manual</EM> itself, the permuted index takes a littlegetting used to, but it is fairly useful once that hurdle has been crossed. Tofind the command you want, simply scan down the middle of the page, looking fora keyword of interest on the right side of the blank gutter. When you find thekeyword you want, you can read (with contortions) the brief description of thecommand that makes up the entry. If things still look promising, you can lookall the way over to the right for the name of the relevant command page.</P><PCLASS="para">The key to the <EMCLASS="emphasis">UNIX Reference Manual</EM> is the fact that each command is treatedon a separate page&nbsp;- there are no continuous page numbers. This makes it easyto add new pages whenever a new command is added to the system. At the sametime, if you know the name of a command, information about it is always easyto find because pages are ordered alphabetically, just like they are in adictionary.</P><PCLASS="para"><ACLASS="indexterm"NAME="AUTOID-59509"></A>But what if you don't know which command to look for in the first place? Ifyou are at a terminal on a Berkeley UNIX system, you can use the<SPANCLASS="link"><EMCLASS="emphasis">apropos</EM> (<ACLASS="linkend"HREF="ch50_02.htm"TITLE="The apropos Command ">50.2</A>)</SPAN>command, like this:</P><PCLASS="para"><BLOCKQUOTECLASS="screen"><PRECLASS="screen">% <CODECLASS="userinput"><B>apropos scanning</B></CODE>awk(1) - pattern scanning and processing language</PRE></BLOCKQUOTE></P><PCLASS="para">But if you're using another UNIX variant or you are not at a terminal, thepermuted index is your best bet.</P><DIVCLASS="sect1info"><PCLASS="SECT1INFO">- <SPANCLASS="authorinitials">TOR</SPAN></P></DIV></DIV><DIVCLASS="htmlnav"><P></P><HRALIGN="LEFT"WIDTH="515"TITLE="footer"><TABLEWIDTH="515"BORDER="0"CELLSPACING="0"CELLPADDING="0"><TR><TDALIGN="LEFT"VALIGN="TOP"WIDTH="172"><ACLASS="SECT1"HREF="ch50_08.htm"TITLE="50.8 Which Version Am I Using? "><IMGSRC="gifs/txtpreva.gif"SRC="gifs/txtpreva.gif"ALT="Previous: 50.8 Which Version Am I Using? "BORDER="0"></A></TD><TDALIGN="CENTER"VALIGN="TOP"WIDTH="171"><ACLASS="book"HREF="index.htm"TITLE="UNIX Power Tools"><IMGSRC="gifs/txthome.gif"SRC="gifs/txthome.gif"ALT="UNIX Power Tools"BORDER="0"></A></TD><TDALIGN="RIGHT"VALIGN="TOP"WIDTH="172"><ACLASS="SECT1"HREF="ch50_10.htm"TITLE="50.10 Make Your Own Man Pages Without Learning troff"><IMGSRC="gifs/txtnexta.gif"SRC="gifs/txtnexta.gif"ALT="Next: 50.10 Make Your Own Man Pages Without Learning troff"BORDER="0"></A></TD></TR><TR><TDALIGN="LEFT"VALIGN="TOP"WIDTH="172">50.8 Which Version Am I Using? </TD><TDALIGN="CENTER"VALIGN="TOP"WIDTH="171"><ACLASS="index"HREF="index/idx_0.htm"TITLE="Book Index"><IMGSRC="gifs/index.gif"SRC="gifs/index.gif"ALT="Book Index"BORDER="0"></A></TD><TDALIGN="RIGHT"VALIGN="TOP"WIDTH="172">50.10 Make Your Own Man Pages Without Learning troff</TD></TR></TABLE><HRALIGN="LEFT"WIDTH="515"TITLE="footer"><IMGSRC="gifs/smnavbar.gif"SRC="gifs/smnavbar.gif"USEMAP="#map"BORDER="0"ALT="The UNIX CD Bookshelf Navigation"><MAPNAME="map"><AREASHAPE="RECT"COORDS="0,0,73,21"HREF="../index.htm"ALT="The UNIX CD Bookshelf"><AREASHAPE="RECT"COORDS="74,0,163,21"HREF="index.htm"ALT="UNIX Power Tools"><AREASHAPE="RECT"COORDS="164,0,257,21"HREF="../unixnut/index.htm"ALT="UNIX in a Nutshell"><AREASHAPE="RECT"COORDS="258,0,321,21"HREF="../vi/index.htm"ALT="Learning the vi Editor"><AREASHAPE="RECT"COORDS="322,0,378,21"HREF="../sedawk/index.htm"ALT="sed &amp; awk"><AREASHAPE="RECT"COORDS="379,0,438,21"HREF="../ksh/index.htm"ALT="Learning the Korn Shell"><AREASHAPE="RECT"COORDS="439,0,514,21"HREF="../lrnunix/index.htm"ALT="Learning the UNIX Operating System"></MAP></DIV></BODY></HTML>

⌨️ 快捷键说明

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