科技: 人物 企业 技术 IT业 TMT
科普: 自然 科学 科幻 宇宙 科学家
通信: 历史 技术 手机 词典 3G馆
索引: 分类 推荐 专题 热点 排行榜
互联网: 广告 营销 政务 游戏 google
新媒体: 社交 博客 学者 人物 传播学
新思想: 网站 新书 新知 新词 思想家
图书馆: 文化 商业 管理 经济 期刊
网络文化: 社会 红人 黑客 治理 亚文化
创业百科: VC 词典 指南 案例 创业史
前沿科技: 清洁 绿色 纳米 生物 环保
知识产权: 盗版 共享 学人 法规 著作
用户名: 密码: 注册 忘记密码?
    创建新词条

最新历史版本 :Brian Fox 返回词条

  • 编辑时间: 历史版本编辑者:方兴东
  • 内容长度:图片数:目录数:
  • 修改原因:
(图)Brian J. FoxBrian J. Fox

Brian J. Fox (born 1959) is a computer programmer, entrepreneur, consultant, author, and open source advocate. In 1987, he authored the GNU Bash shell, a common Unix operating system interface.

Fox maintained Bash as the primary maintainer until 1993, at which point Chet Ramey took over.

In 1985 Fox worked with Richard Stallman at Stallman's newly created Free Software Foundation. At the FSF, Fox authored GNU Bash, GNU Makeinfo, GNU Info, GNU Finger, and the readline and history libraries.

He was also the maintainer of Emacs for a time, and made many contributions to the software that was created for the GNU Project between 1986 and 1994。

FSF的雇员编写了并维护着数量相当多的GNU软件包。其中值得一提的两种是C库和shell(命令解释器)。任何运行于GNU/Linux系统之上的程序都用GNU C 库作为与Linux内核通信的中介。它是由FSF的一位工作人员Roland McGrath开发的。绝大多数GNU/Linux系统上使用的shell都是BASH(Bourne Again Shell,是对UNIX上最早也是最常用的Bourne Shell开的玩笑),它由FSF雇员Brian Fox开发。

目录

shell的历史、作用和职责回目录

shell的历史
第一个重要的标准UNIX shell于1979年末在V7(AT&T的第7版)UNIX上推出,并以作者Stephen Bourne的名字命名。作为编程语言,Bourne shell基于另一种叫做Algol的语言。Bourne shell当时主要用于系统管理任务的自动化,Bourne shell以简单和高速而受欢迎,却缺少了很多用于交互的功能,如命令历史、别名和作业控制。
C shell由加州大学Berkeley分校于20世纪70年代末研发,作为2BSD UNIX系统的一部分发布。他的主要研发者是Bill Joy。C shell提供了很多标准的Bourne shell不具备的功能。C shell基于C语言,作为编程语言使用时,语法也类似于C。C shell也提供了增强交互使用的功能,如命令行历史、别名和作业控制。由于是为大型机设计并增加了很多新功能,C shell在小型机器上运行可能比较慢。而且,即使在大型机上,他的速度也不如Bourne shell。
Bourne shell和C shell共存使UNIX用户有了选择,也导致了人们对哪个shell更好的争论。20世纪80年代中期,AT&T的David Korn推出了Korn shell。Korn shell于1986年发布,并在1988年UNIX的SVR4版本发布时正式成为他的一部分。Korn shell其实是Bourne shell的一个扩展集,他不但能运行于UNIX系统,还能在OS/2、VMS和DOS上运行。Korn shell提供了对Bourne shell的向上兼容性,加入了许多C shell中受欢迎的功能,而且快速和高效。Korn shell经历了许多版本,虽然1993版正逐渐流行,现在用得最广泛的还是1988版。Linux用户可能会发现自己正在使用Korn shell的免费版本,叫作Public Domain Korn shell,简称pdksh。pdksh是1988版Korn shell的克隆版。pdksh是免费和可移植的。对他的改进正在进行中,以使其能够完全兼容Korn shell,并且符合POSIX标准。此外更有Z shell(zsh),这也是个Korn shell的克隆版,整合了TC shell的一些功能。Z shell的作者是Paul Falsted,能够从很多网站免费获取。
随着Linux的发展,Bourne Again shell(bash)开始流行起来。免费软件基金会的Brian Fox取得GNU版权许可后于1988年研发出bash。bash是Linux操作系统上默认的shell。他的设计符合了IEEE POSIX P1003.2/ISO 9945.2 shell和工具标准。在交互和编程两方面,bash都提供了很多Bourne shell没有的功能(但Bourne shell脚本无需修改还能在bash下运行)。bash还结合了C shell和Korn shell最有用的功能,他真的很棒。bash对Bourne shell的改进包括:命令行历史和编辑、目录栈、作业控制、函数、别名、数组、整数运算(底数能够是2~64),连同Korn shell的一些功能,如扩展的元字符,用于生成菜单的select循环和let命令等。
TC shell是C shell的扩展版本,且具备完全兼容性。新增的功能包括:命令行编辑(emacs和vi)、历史清单的滚动、高级的文档名功能、变量和命令补全、拼写纠错、作业调度、账户自动上锁和注销、历史清单中增加时间戳等。新增的功能确实很多。人们经常会问“TC shell中的T到底代表什么含义呢?”这就要涉及到一段历史。1976年,DEC发布了一种新的虚拟内存操作系统??TOPS-20,这种操作系统基于TENEX,能够被美国国内的多个研究人员同时使用。TOPS-20最显著的特点是“遗忘识别”,也称为“命令补全”,用户能够借助Esc键获取大多数的命令或助记符,从而使得系统能正常运行。TC shell的创建者受到TENEX/TOPS-20的这个功能连同其他功能的影响,研发了csh的一种版本,并模仿TENEX的名称,将这种shell称为TENEX C shell,简称为TC shell、tc-shell或tcsh。关于tcsh的更多信息,请访问info.astrian.net/doc/tcsh/copyright。
1.3.1  shell的作用
shell的一项主要功能是在交互方式下解释从命令行输入的命令。shell解析命令行,将其分解为词(也称为token),词之间由空白分隔,空白由制表符、空格键或换行组成。假如词中有特别的元字符,shell会对其进行替换。shell处理文档I/O和后台进程。对命令行的处理结束后,shell搜索命令并开始运行他。
shell的另一项重要功能是定制用户环境,这通常在shell的初始化文档中完成。初始化文档中有很多定义,包括配置终端键和窗口属性,配置用来定义搜索路径、权限、提示符和终端类型的变量,配置特定应用程式所需的变量,如窗口、字处理程式和编程语言的库等。Korn/Bash shell和C/TC shell还提供了更多的定制功能:历史添加、别名、配置内置变量防止用户破坏文档或无意中退出,通知用户作业完成。
shell还能用作解释性的编程语言。shell程式(也称为shell脚本)由文档中的一列命令组成。shell程式用编辑器生成(也能够在命令行上直接输入脚本)。他们由UNIX命令组成,命令之间插入了一些基本的程式结构,如变量赋值、条件测试和循环。shell脚本无需编译。shell会逐行解释脚本,就似乎他是从键盘输入相同。shell负责解释命令,因此,用户需要了解可用的命令有哪些。附录A中列出了一些有用的命令。
1.3.2  shell的职责
shell负责确保用户在命令提示符后输入的命令被正确执行。其职责包括:
(1) 读取输入并解析命令行
(2) 替换特别字符,比如通配符和历史命令符
(3) 配置管道、重定向和后台处理
(4) 处理信号
(5) 程式执行的相关配置
和具体的shell相关的内容将在本书中周详讨论。

程序设计语言的来龙去脉:BASH/Bourne-Again Shell回目录

Computerworld is undertaking a series of investigations into the most widely-used programming languages. Previously we spoke to Alfred v. Aho of AWK fame, and in this article we chat to Chet Ramey about his experience maintaining Bash.

《计算机世界》正在就使用最广泛的一些程序设计语言进行一系列调查。先前我们谈到阿尔弗雷德·v·阿霍的AWK的名声,而在这篇文章中,我们与切特·雷米聊天,谈他维护Bash的经验。

Bash, or the Bourne-Again Shell is a Unix shell created in 1987 by Brian Fox. According to Wikipedia, the name is a pun on an earlier Unix shell by Stephen Bourne (called the Bourne shell), which was distributed with Version 7 Unix in 1978.

Bash即Bourne-Again Shell,是布赖恩·福克斯于1987年创建的一个Unix shell。按照维基百科的说法,这个名字一语双关,涉及斯蒂芬·伯恩早于1978年随Unix v7分发的Unix  shell(所谓Bourne shell)。

(图)布赖恩·福克斯布赖恩·福克斯

In 1990, Chet Ramey, Manager of the Network Engineering and Security Group in Technology Infrastructure Services at Case Western Reserve University, became the primary maintainer of the language.

1990年,美国西储大学技术基础设施服务部门网络工程与安全小组经理切特·雷米成为这种语言的主要维护者。

Computerworld tracked down Ramey to find out more.

为了了解更多情况,《计算机世界》找到了雷米。

How did you first become involved with Bash?
您最初是怎样被Bash缠住的?
In 1989 or so, I was doing network services and server support for [Case Western Reserve] University (CWRU), and was not satisfied with the shells I had available for that work. I wasn't really interested in using sh for programming and csh/tcsh for interactive use, so I began looking around for a version of sh with the interactive features I wanted (job control, line editing, command history, filename completion, and so on.)

在1989年前后,我正在为西储大学(CWRU)做网络服务和服务器支持工作,但对那项工作中使用的一些shell并不满意。我确实没有兴趣使用sh编程,也没有兴趣用csh/tcsh与机器交互,所以,我开始四处寻找一种sh版本,具有我需要的(作业控制、行编辑、历史命令、文件名补全等等)交互式功能。

I found a couple of versions of the SVR2 shell where those features had been added (credit to Doug Gwyn, Ron Natalie, and Arnold Robbins, who had done the work). These were available to CWRU because we were Unix source licensees, but I had trouble with them and couldn't extend them the way I wanted. Ken Almquist was writing ASH, but that had not been released, and there was a clone of the 7th edition shell, which eventually became PDksh, but that did not have the features I wanted either.

我发现有几个SVR2版本的shell已经增加了那些功能(归功于做了这项工作的道格·格温、罗恩·纳塔利和阿诺德·罗宾斯)。由于CWRU是Unix源码许可证持有者,这些我们可以利用,但我和他们闹过纠纷,不能用我想用的方式扩展这些功能。肯·阿尔姆奎斯特那时候正在写ASH,不过尚未发布,另有一个shell第七版的复制品,最后变成PDKsh,但也没有我想要的特性。

Brian Fox had begun writing BASH and readline (which was not, at that time, a separate library) the year before, when he was an employee of the FSF. The story, as I recall it, was that a volunteer had come forward and offered to write a Bourne Shell clone. After some time, he had produced nothing, so Richard Stallman directed Brian to write a shell. Stallman said it should take only a couple of months.

布赖恩·福克斯一年前就已经开始编写BASH和readline(那时还不是单独一个库),当时他是自由软件基金会(FSF)的一名雇员。正如我所记得的,这个故事是,有一名志愿者自告奋勇,表示愿意编写一个Bourne Shell的翻版。但一段时间之后,他什么也没有做出来,所以,理查德·斯托尔曼指示布赖恩写一个shell。斯托尔曼表示这可能只需要两三个月的时间。

I started looking again, and ended up finding a very early version of Bash. I forget where I got it, but it was after Brian had sent a copy to Paul Placeway from Ohio State -- Paul had been the tcsh maintainer for many years, and Brian asked him to help with the line editing and redisplay code. I took that version, made job control work and fixed a number of other bugs, and sent my changes to Brian. He was impressed enough to begin working with me, and we went on from there.

我又开始寻找,最终找到Bash的一个非常早的版本。我忘记在什么地方得到它,但是在布赖恩送一个副本给俄亥俄州的保罗·普莱斯威之后得到的——保罗多年来一直是tcsh的维护人员,而且布赖恩要求他帮助编写行编辑和重新显示的代码。我采用了这一版本,使作业控制起作用,并修复了许多其他错误,然后把我所做的改动发送给布赖恩。这给他留下相当深刻的印象,开始和我一起工作,我们就从那里继续前进。

I fixed many of the bugs people reported in the first public versions of BASH and fed those fixes back to Brian. We began working together as more or less co-maintainers, and when Brian moved on to other things, I still needed to support Bash for my local users, so I produced several local releases. Brian and I eventually merged those versions together, and when he moved away from Bash development, I took over.

我修复了人们报告的第一个BASH公开版本中的许多故障和错误,并把这些反馈给布赖恩。我们开始一起工作,差不多是共同维护者,当布赖恩转而从事其他事情时,我仍然需要为我所在地的用户支持Bash,所以,我制作了若干个本地发行的版本。布莱恩和我最后把这些版本合并起来,在他不再从事Bash开发离开时,我就接手了。

Did you work with Brian Fox before becoming the primary maintainer of the language?
您和布赖恩·福克斯一起工作后才成为这种语言的主要维护者?
Brian and I worked together for several years before he moved on to other things. The versions through BASH-1.13 were collaborative releases.

布莱恩和我一起工作了好几年之后才转到其他事情上。BASH从头到1.13版都是合作完成的版本。

What is/was your working relationship with Brian like?
您过去/现在与布赖恩有什么样的工作关系?
Our working relationship was very good, especially considering we met in person only once, in 1990. We were heavy users of UNIX `talk' and `ntalk', which allowed real-time two-way communication over the Internet back then, and made good use of email and the occasional long distance phone call.

我们过去的工作关系非常好,特别是考虑到我们俩只在1990年见过一次面。我们都是UNIX系统“talk”和“ntalk”的重度用户(大量使用者),那时候就让我们在互联网上实现实时双向通信,我们也充分利用电子邮件并偶尔打打长途电话。

We still stay in touch.

现在我们仍然保持联系。

What prompted the making of Bash in the first place?
什么原因促使您把Bash摆在首位?
When Richard Stallman decided to create a full replacement for the then-encumbered Unix systems, he knew that he would eventually have to have replacements for all of the common utilities, especially the standard shell, and those replacements would have to have acceptable licensing.

当理查德·斯托尔曼决定创建一个完整的替代品,取代当时已成拖累的Unix系统的时候,他知道,他最终将不得不替换所有常用的实用程序,特别是标准shell,而这些替代品就必须有可接受的许可证。

After a couple of false starts (as previously mentioned), he hired Brian Fox to write it.

几个失败的开端(如前所述)之后,他聘请布赖恩·福克斯编写Bash。

They decided early on that they would implement the shell as defined by the Posix standard, and used that as a specification.

他们一开始就决定,将按POSIX标准的定义实现shell,并且把POSIX标准用作技术规范。

Was there a particular problem that the language aimed to solve?
这一语言是否旨在解决一个特殊的问题?
In BASH's case, the problem to be solved was a free software version of the Posix standard shell to be part of the GNU system.

就BASH的情况,要解决的问题是符合POSIX标准的自由软件版shell成为GNU系统的一部分。

The original version of the shell (Steve Bourne's version) was intended to overcome a number of the limitations of the Unix shell included in versions up to the sixth edition, originally written by Ken Thompson.

Shell的原始版本(史蒂夫·伯恩的版本)打算克服包括直至Unix第六版的各个shell版本的许多限制,Unix最初由肯·汤普森编写。

Why did you take over as the language's primary maintainer 3 years after Fox created the language?
在福克斯创建这种语言之后三年,您为什么要接任这种语言的主要维护者?
Brian wanted to move on to other things, and I was a developer willing to take it on and experienced with the code. Brian and the FSF trusted me with the program's future.

布赖恩希望改做别的事情,我是开发人员,愿意承担并感受体验这些代码。布赖恩和FSF把这个程序托给我管理。

What prompted the writing of the GNU Bash Reference Manual and the Bash Reference Manual?
什么原因促使您编写GNU Bash参考手册和Bash参考手册?
Any good heavily-used program needs good reference documentation, and BASH is no exception. I originally wrote the documents to support my local users, and they were folded into "official" releases along the line.

凡是使用率高的好程序都需要好的参考文档,BASH也不例外。我最初是为了支持本地用户才编写文档,然后才被并入“官方的”版本到处发布。

Is there a strong relationship between the original Bourne Shell and the Bourne-Again Shell?
原来的Bourne Shell与Bourne-Again Shell之间是否存在强联系?
I'd say there is a linear relationship: the original Bourne Shell was very influential, the various System V shell releases preserved that heritage, and the Posix committee used those versions as the basis for the standard they developed.

我想有一个线性关系:原来的Bourne Shell非常有影响,各种不同的System V shell发行版都保留这一遗产,而且POSIX委员会使用这些版本作为他们制定标准的基础。

Certainly the basic language syntax and built-in commands are direct descendants of the Bourne Shell's. Bash's additional features and functionality build on what the Bourne shell provided.

当然,这种语言的基本语法和内置命令是Bourne Shell的直接后裔。Bash增加的特性和功能以Bourne Shell所提供的为基础。

As for source code and internal implementation, there's no relationship at all, of course.

至于源代码及其内部实现,当然,根本就没有关系。

What prompted the language's name: why was a pun created on the Bourne Shell?
命名这种语言的原因是什么:为什么在Bourne Shell上创造一个双关语?
The FSF has a penchant for puns, and this one seemed appropriate, I suppose. The name predates my involvement.

自由软件基金会对双关语有强烈嗜好,而且我以为,这一个看来好象是相称的。这一名字早在我参与之前就有。

Have you faced any hard decisions in maintaining the language?
维护过程中有没有遇到一些困难的决策?
The hardest decisions are the ones dealing with compatibility: how compatible to be with the versions of sh existing at various points throughout Bash's history; how compatible to be with the features from the Korn shell I considered valuable; where and how to differ from the Posix standard, and when to break backwards compatibility with previous Bash versions to correct mistakes I had made.

最困难的决策涉及兼容性:如何与存在于Bash历史不同时期的sh版本兼容;如何与属于我认为有价值的Korn shell的特色兼容;何处并且如何不同于POSIX标准,以及何时打破以前的Bash版本的向后兼容,以改正我所犯的错误。

Some of the features implemented (and not implemented) required a lot of thought and consideration -- not how to implement them, but whether or not to invest the resources to do so. Most of the Bash development over the past 15 years has been done by one person.

某些已经实现(和未实现)的特性需要大量的思考和考虑——不是如何实现,而是是否要花费资源这样做。过去15年所做的Bash开发的大部分由一个人完成。

Are you still working with the language now?
您现在还用这种语言工作吗?
I am. In fact, the next major release of Bash, Bash-4.0, should be out sometime this (Northern) summer.

是的。其实,Bash的下一个主要版本,Bash-4.0,将会在今年夏天(在美国北方)问世。

What is the latest project you have used it for?
您用作最新的什么项目呢?
I mostly use Bash for interactive work these days. I use it to write some small system administration tools, but I don't do much system administration any more.

我目前使用Bash大部分用来做人机交互工作。我用它编写一些小型系统管理工具,但我几乎不再做系统管理工作。

What is the most exciting piece of code (that you know of) ever written in Bash?
(您知道的)用Bash编写的最令人激动的代码是什么?
That's hard to say. Lots of interesting projects have been implemented as shell scripts, or sets of shell scripts.

这很难说。许多有趣的项目已经用shell脚本、或shell脚本套件实现。

I particularly like the various versions of the Bash debugger that were implemented completely as shell scripts. That's pretty complex work. I've seen entire web servers and other surprisingly substantial applications written as shell scripts.

我特别喜欢各种版本的Bash调试器,完全像shell脚本一样执行。这是颇为复杂的工作。我已经看到把整个网络服务器和其他令人惊讶的实质性的应用软件写成shell脚本。

In your opinion, what lasting legacy has Bash brought to the web?
在您看来,Bash已经把什么恒久的遗产带给网络呢?
I think Bash's legacy is as a solid piece of infrastructure, and the shell making millions of Linux, Mac OS X, and Solaris systems work every day.

我认为,Bash留给后人的东西就是作为部分稳定可靠的基础设施,并且使数以百万计的Linux、Mac OS X和Solaris系统每一天都正常运转。

As I recall, it was one of the first couple of programs Linus Torvalds made run on his early Linux kernels.

我记得,Bash也是莱纳斯·托瓦尔兹在他早期的Linux内核中最早运行的一些程序之一。

Where do you envisage Bash's future lying?
请展望Bash的未来?
Bash will continue to evolve as both an interactive environment and a programming language. I'd like to add more features that allow interested users to extend the shell in novel ways. The programmable completion system is an example of that kind of extension.

Bash既是一个交互环境又是一种编程语言,将会继续发展。我想会增加更多的特性,让有兴趣的用户以新颖的方式扩展shell。可编程的完备系统就是那种扩展的一个例子。

Bash's evolution has always been user-driven, so it will ultimately be up to the feature requests that come in.

Bash的演变一直是用户驱动的,所以它最终将胜任未来出现的功能请求。

Where do you see computer programming languages heading in the future, particularly in the next five to 20 years?
您认为未来,特别是今后五到二十年,计算机程序设计语言将朝何处发展?
I see increased dynamism, allowing programmers to do more and more complex things on the fly, especially over the Web. The advances in hardware allow interpreted code to run faster today than compiled code on some systems available when I started work on Bash.

我看到更多的活力,让程序员匆忙中做越来越复杂的东西,特别是通过网络。就Bash而论,硬件的进步使今天的解释型代码运行速度快于当初我开始工作时可用的一些系统上的编译型代码。

Do you have any advice for up-and-coming programmers?
您有什么忠告给崭露头角的程序员?
Find an area that interests you and get involved with an existing community. There are free software projects in just about any area of programming.

找到您感兴趣的领域,并参与现存的某个社区。几乎任何一个程序设计领域都有一些自由软件项目。

The nuts-and-bolts -- which language you use, what programming environment you use, where you do your work -- are not as important as the passion and interest you bring to the work itself.

具体情况——使用哪一种语言、使用什么样的编程环境、在什么地方工作——都不如工作本身带来的热情和兴趣重要。

Is there anything else that you'd like to add?
您还想说点别的吗?
The free software community is still as vibrant today, maybe even more so, than when I first became involved. There is still a lot of room for significant contributions; all it takes is an interested person with a good idea.

今天,自由软件社区依然像我最初参与时一样充满活力,也许更加生气勃勃。这些社区仍然给重大贡献留有大量空间;它接受的全部是一个有好主意的感兴趣的人。

Bash回目录

几种流行的Shell
   目前流行的Shell有ash, bash, ksh, csh, zsh等,你可以用下面的命令来查看你自己的Shell类型:
   # echo $SHELL
   $SHELL是一个环境变量,它记录用户所使用的Shell类型。你可以用命令:
   # Shell-name
   来转换到别的Shell,这里Shell-name是你想要尝试使用的Shell的名称,如ash等。这个命令为用户又启 动了一个Shell,这个Shell在最初登录的那个Shell之后,称为下级的Shell或子Shell
  使用命令:
  # exit
  可以退出这个子Shell。
  使用不同的Shell的原因在于它们各自都有自己的特点,下面做一个简单的介绍:
  1.ash
  ash Shell是由Kenneth Almquist编写的,是Linux中占用系统资源最少的一个小Shell,它只包含24个内部命令,因而使用起来很不方便。
  2.bash
  bash是Linux系统默认使用的Shell,它由Brian Fox和Chet Ramey共同完成,是Bourne Again Shell的缩写,内部命令一共有40个。Linux使用它作为默认的Shell是因为它有以下的特色:
  (1)可以使用类似DOS下面的doskey的功能,用上下方向键查阅和快速输入并修改命令。
  (2)自动通过查找匹配的方式,给出以某字串开头的命令。
  (3)包含了自身的帮助功能,你只要在提示符下面键入help就可以得到相关的帮助。
  3.ksh
  ksh是Korn Shell的缩写,由Eric Gisin编写,共有42条内部命令。该Shell最大的优点是几乎和商业发行版的ksh完全相容,这样就可以在不用花钱购买商业版本的情况下尝试商业版本的性能了。
  4.csh
  csh是Linux比较大的内核,它由以William Joy为代表的共计47位作者编成,共有52个内部命令。该Shell其实是指向/bin/tcsh这样的一个Shell,也就是说,csh其实就是tcsh。
  5.zch
  zch是Linux最大的Shell之一,由Paul Falstad完成,共有84个内部命令。如果只是一般的用途,是没有必要安装这样的Shell的。(编译:后溪金)

参考文献回目录

→如果您认为本词条还有待完善,请 编辑词条

标签: Brian J. Fox 布赖恩·福克斯