BBS水木清华站∶精华区

发信人: GoldenEagle (鹫*只想飞), 信区: Linux 
标  题: 【翻译】请对Bash的info翻译提意见 
发信站: BBS 水木清华站 (Thu Dec  2 22:08:36 1999) WWW-POST 
 
 
这是我翻译的Bash info文档的第一部分,请大家提意见。 
由于还需要修改,所以没去掉英文部分,有点乱,请多原谅。 
我还在166.111.163.3的incoming/bashinfo/目录下上载了 
此部分。请多提意见,特别是一些计算机术语,多谢。 
至于版权,除非你用于商用,否则按GPL。 
 
 
File: bashref.info,  Node: Top,  Next: Introduction,  Prev: (dir),  Up:  
(dir) 
 
Bash Features(Bash特性) 
************* 
 
   This text is a brief description of the features that are present in the  
Bash shell. 
    
(本文是Bash shell特性的简短描述。) 
 
   This is Edition 2.3, last updated 20 January 1999, of `The GNU Bash 
Reference Manual', for `Bash', Version 2.03. 
 
(这是The GNU Bash Reference Manual 2.3版,它于1999年1月20日更新,其Bash版本为 
2.03。) 
 
   Copyright (C) 1991, 1993, 1996 Free Software Foundation, Inc. 
 
自由软件基金会1991,1993,1996版权所有。 
 
   Bash contains features that appear in other popular shells, and some 
features that only appear in Bash.  Some of the shells that Bash has 
borrowed concepts from are the Bourne Shell (`sh'), the Korn Shell 
(`ksh'), and the C-shell (`csh' and its successor, `tcsh'). The 
following menu breaks the features up into categories based upon which 
one of these other shells inspired the feature. 
 
(Bash包含其它流行shell所具有的特性,同时还有一些仅出现在Bash中的特性。Bash从 
其它shell借用了很多概念,这些shell包括:Bourne Shell(sh),Korn Shell(ksh) 
,以及C-shell(csh或其后继,tcsh)。下面的菜单根据各种特性来源于何种shell进行 
分类。) 
 
   This manual is meant as a brief introduction to features found in 
Bash.  The Bash manual page should be used as the definitive reference 
on shell behavior. 
 
(本指南是Bash特性的一个简单介绍。此Bash指南应当作为shell行为的一个权威性的参 
考。) 
 
* Menu: 
 
* Introduction:: An introduction to the shell.(shell介绍) 
 
* Definitions:: Some definitions used in the rest of this manual.(在本指南 
中使用的一些定义) 
 
* Basic Shell Features:: The shell "building blocks".(shell的各部分) 
 
* Bourne Shell Features:: Features similar to those found in the Bourne shell. 
(与Bourne shell相似的特性) 
 
* Bash Features:: Features found only in Bash.(Bash仅有的特性) 
 
* Job Control:: A chapter describing what job control is 
and how Bash allows you to use it.(描述什么是作业控制以及Bash是如何允许你 
使用它的) 
 
* Using History Interactively:: Chapter dealing with history expansion rules. 
(处理历史展开规则) 
 
* Command Line Editing:: Chapter describing the command line editing features. 
(描述命令行编辑特性) 
 
* Installing Bash:: How to build and install Bash on your system.(如何在你的 
系统中编译和安装Bash) 
 
* Reporting Bugs:: How to report bugs in Bash.(如何报告Bash中的bugs) 
 
* Builtin Index:: Index of Bash builtin commands.(Bash内建命令索引) 
 
* Reserved Word Index:: Index of Bash reserved words.(Bash保留字索引) 
 
* Variable Index:: Quick reference helps you find the variable you want.(快 
速参考以帮助你寻找你要的变量) 
 
* Function Index:: Index of bindable Readline functions.(可绑定的Readline函 
数索引) 
 
* Concept Index:: General index for concepts described in this manual.(在本 
指南中描述的概念的综合索引) 
 
File: bashref.info,  Node: Introduction,  Next: Definitions,  Prev: Top,  Up:  
Top 
 
Introduction(介绍) 
************ 
 
* Menu: 
 
* What is Bash?:: A short description of Bash.(Bash的简短描述) 
 
* What is a shell?:: A brief introduction to shells.(shell的简短描述) 
 
File: bashref.info,  Node: What is Bash?,  Next: What is a shell?,  Up:  
Introduction 
 
What is Bash?(什么是Bash) 
============= 
 
   Bash is the shell, or command language interpreter, that will appear 
in the GNU operating system.  The name is an acronym for the 
`Bourne-Again SHell', a pun on Steve Bourne, the author of the direct 
ancestor of the current Unix shell `/bin/sh', which appeared in the 
Seventh Edition Bell Labs Research version of Unix. 
 
(Bash是GNU操作系统上的shell或者说是命令语言解释器,它是Bourne-Again SHell的缩 
写,Steve Bourne的双关语。Steve Bourne是最早出现于贝尔研究实验室版第七版Unix的 
shell /bin/sh的初始作者。) 
 
   Bash is an `sh'-compatible shell that incorporates(合并) useful  
features 
from the Korn shell `ksh' and the C shell `csh'.  It is intended(有意的) to  
be 
a conformant(符合的) implementation of the IEEE POSIX Shell and Tools 
specification(规范) (IEEE Working Group 1003.2).  It offers functional 
improvements over `sh' for both interactive(交互型) and programming use. 
 
Bash合并了Korn shell(ksh)和C shell(csh)许多有用特性,并与sh兼容。它被有意 
设计成符合IEEE POSIX Shell 和Tools规范(IEEE 工作组1003.2),并在交互使用及编 
程应用上对sh的功能进行了改进。 
 
   While the GNU operating system will include a version of `csh', Bash 
will be the default shell.  Like other GNU software, Bash is quite 
portable(可移植的).  It currently runs on nearly every version of Unix and  
a few 
other operating systems - independently-supported ports exist for 
MS-DOS, OS/2, Windows 95, and Windows NT. 
 
(尽管GNU操作系统上已包含了csh的一个版本,但Bash将是缺省shell。象其它GNU软件一 
样,Bash可移植性很好。目前,它可在几乎Unix的任何版本及其它一些操作系统上运行。 
在MS-DOS,Windows 95,Windows NT上存在它的单独的移植版本。) 
 
File: bashref.info,  Node: What is a shell?,  Prev: What is Bash?,  Up:  
Introduction 
 
What is a shell?(什么是shell) 
================ 
 
   At its base, a shell is simply a macro processor(指令处理器) that  
executes 
commands.  A Unix shell is both a command interpreter(解释器), which  
provides 
the user interface to the rich set of Unix utilities, and a programming 
language, allowing these utilitites to be combined.  Files containing 
commands can be created, and become commands themselves.  These new 
commands have the same status as system commands in directories like 
`/bin', allowing users or groups to establish custom environments. 
 
最基本的,shell是一简单的执行命令的宏指令处理器。Unix shell既是一个为用户提供 
Unix丰富应用集的用户界面,又是一种编程语言,可允许对这些应用进行组合。它可以创 
建包含命令的文件,而且此文件可成为新的命令。这些新的命令与在/bin目录下的系统命 
令有相同的地位,它允许用户或组定制自己的环境(工作平台)。 
 
   A shell allows execution of Unix commands, both synchronously(同步的)  
and 
asynchronously(异步的).  The shell waits for synchronous commands to  
complete 
before accepting more input; asynchronous commands continue to execute 
in parallel with the shell while it reads and executes additional 
commands.  The "redirection" constructs(结构) permit fine-grained(细致的)  
control of 
the input and output of those commands, and the shell allows control 
over the contents of their environment.  Unix shells also provide a 
small set of built-in commands ("builtins") implementing functionality(功能) 
 
impossible (e.g., `cd', `break', `continue', and `exec'), or 
inconvenient (`history', `getopts', `kill', or `pwd', for example) to 
obtain via separate utilities.  Shells may be used interactively or 
non-interactively: they accept input typed from the keyboard or from a 
file.  All of the shell builtins are described in subsequent sections. 
 
shell允许Unix命令同步或异步执行。对同步命令,shell在接受新的输入之前等待命令完 
成。而对异步命令,则在读入输入的shell中与其它命令平行执行。重定向结构允许对这 
些命令的输入和输出进行更细致的控制,而且shell允许控制环境的内容。Unix shell还 
提供了一个小的内建命令的集合,用于实现不能(如:cd,break,continue,exec)或 
不适合(history,getopts,kill,pwd等)通过单独的应用来获得的功能。Shell可以以 
交互的形式或非交互的形式来使用:它们从键盘输入或者文件中接收输入数据。所有的 
shell内建命令会在后序章节描述。 
 
   While executing commands is essential(基本的), most of the power (and 
complexity) of shells is due to their embedded programming languages. 
Like any high-level language, the shell provides variables, flow 
control constructs, quoting(引用,加引号), and functions. 
 
尽管执行命令是最基本的,但是shell更多的强大功能(以及复杂性)是来自其内嵌的编 
程语言。象其它任何高级语言一样,shell提供了变量,流程控制结构,引用,还有函数 
。 
 
   Shells have begun offering features geared(使...适合) specifically for 
interactive use rather than to augment(增强) the programming language.   
These 
interactive features include job control, command line editing, history 
and aliases.  Each of these features is described in this manual. 
 
shell已经开始提供使之特别适合交互使用的特性而不是增强其编程语言。这些交互特性 
包括作业控制,命令行编辑,历史和别名。这些特性在本指南中都将进行描述。 
 
File: bashref.info,  Node: Definitions,  Next: Basic Shell Features,  Prev:  
Introduction,  Up: Top 
 
Definitions(定义) 
*********** 
 
   These definitions are used throughout the remainder of this manual. 
 
下面的这些定义将在本指南的其余部分使用到。 
 
`POSIX' 
     A family of open system standards based on Unix.  Bash is 
     concerned with POSIX 1003.2, the Shell and Tools Standard. 
     基于开放系统标准的规范集。Bash与POSIX 1003.2,Shell和Tools标准有关。 
 
`blank'(间隔符) 
     A space or tab character.(空格或制表符) 
 
`builtin'(内建命令) 
     A command that is implemented internally by the shell itself, 
     rather than by an executable program somewhere in the file system. 
     由shell自身在内部实现的,而不是有文件系统中的某个可执行程序实现的命令。 
 
`control operator'(控制符) 
     A `word' that performs a control function.  It is a `newline' or 
     one of the following: `||', `&&', `&', `;', `;;', `|', `(', or `)'. 
     具有控制功能的一个word,可以是一换行符或下面的字符中的某一个:||,&&,&, 
;,;;,(,)。 
 
`exit status'(退出码) 
     The value returned by a command to its caller. 
     命令返回给其调用者的值。 
 
`field'(字段) 
     A unit of text that is the result of one of the shell expansions. 
     After expansion, when executing a command, the resulting fields 
     are used as the command name and arguments. 
     是某个shell展开结果的一段文字。展开后,在执行命令时,结果字段被用于作为命 
令名和命令变元。 
 
`filename'(文件名) 
     A string of characters used to identify a file.(用于标识一个文件的字符串 
) 
 
`job'(作业) 
     A set of processes comprising a pipeline, and any processes 
     descended(从...传下来) from it, that are all in the same process  
group. 
     组成管道的进程集合,或任何从其中分离出的在同一进程组的任何进程。 
 
`job control'(作业控制) 
     A mechanism by which users can selectively stop (suspend) and 
     restart (resume) execution of processes. 
     一种机制,可允许用户选择停止(暂停)进程和重新启动(重新执行)进程继续执 
行。 
 
`metacharacter'(元字符) 
     A character that, when unquoted, separates words.  A metacharacter 
     is a `blank' or one of the following characters: `|', `&', `;', 
     `(', `)', `<', or `>'. 
     在未被引号括起时作为分离单词的字符。元字符可以是一个间隔符或下面的某一个 
字符:|,&,;,(,),<,>。 
 
`name' (名) 
     A `word' consisting solely of letters, numbers, and underscores, 
     and beginning with a letter or underscore.  `Name's are used as 
     shell variable and function names.  Also referred to as an 
     `identifier'. 
     仅由字母,数字,以及下划线组成的word,且以字母或下划线开头。name被用作 
shell变量和函数名称。也叫标识符(identifier)。 
 
`operator'(操作符) 
     A `control operator' or a `redirection operator'.  *Note 
     Redirections::, for a list of redirection operators. 
     控制符或重定向符。 
 
`process group'(进程组) 
     A collection of related processes each having the same process group  
ID. 
     具有相同进程组ID的相关进程集合。 
 
`process group ID'(进程组ID) 
     A unique identifer that represents a `process group' during its  
lifetime. 
     用于在进程组生命期间表示进程组的唯一的标识符。 
 
`reserved word'(保留字) 
     A `word' that has a special meaning to the shell.  Most reserved 
     words introduce shell flow control constructs, such as `for' and 
     `while'. 
     对shell具有特殊含义的word。多数保留字引入shell流程控制结构,如for和while 
。 
 
`return status'(返回码) 
     A synonym(同义字) for `exit status'.(退出码的同义字) 
 
`signal'(信号) 
     A mechanism by which a process may be notified by the kernal of an 
     event occurring in the system. 
     一种核心通知进程在系统中有事件发生的机制。 
 
`special builtin'(特殊内建命令) 
     A shell builtin command that has been classified as special by the 
     POSIX.2 standard. 
     根据POSIX.2标准分类的特殊的shell内建命令。 
 
`token'(标记) 
     A sequence of characters considered a single unit by the shell. 
     It is either a `word' or an `operator'. 
     被shell作为一个独立实体的字符序列。可以是word或操作符。 
 
`word' 
     A `token' that is not an `operator'.(非操作符的标记。) 
 
 
-- 
※ 来源:·BBS 水木清华站 bbs.net.tsinghua.edu.cn·[FROM: 166.111.34.143]  

BBS水木清华站∶精华区