永久链接:http://fengtao.org/archives/345.html
在刚接触shell的时候,我遇到了很多挫,自己在计算机方面积累的信心不断被打击,我想很多人跟我一样。不过读过下面这个短文之后,心情也就豁然很多,shell从就创立之初就是强大的,但也是十分难为人的一种工具。
翻译:
我们使用键盘进行输入的时候,总会出现各种错误,但我们在使用Unix Shell的时候,可能会出现更多的错误。Unix shell语法是十分强大,但也是非常简洁的,而且充满各种奇怪的符号,更要命的是难于记忆,也使得shell code神秘性和复杂性如出一辙。Bourne Shell和C shell使这种情况变得更加严重,它们给你设置了尽可能多的限制。
另外,我们没有任何方法可以撤销以前执行的命令来帮助我们修复错误,如果你有Bourne shell使用经验,你一定有过很多关于输入长长的命令的挫败感。你可以使用退格键进行编辑,但你一点按了回车键,一切都没了。
原文来自:Learning the bash Shell 3rd Edition (pdf文件,无链接)
It’s always possible to make mistakes when you type at a computer keyboard, but perhaps even more so when you are using a UNIX shell. UNIX shell syntax is powerful, yet terse, full of odd characters, and not particularly mnemonic, making it possible to construct command lines that are as cryptic as they are complex. The Bourne and C shells exacerbate this situation by giving you extremely limited ways of editing your command lines.
In particular, there is no way to recall a previous command line so that you can fix a mistake. If you are an experienced Bourne shell user, undoubtedly you know the frustration of having to retype long command lines. You can use the BACKSPACE key to edit, but once you hit RETURN, it’s gone forever!