UNIX 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!

本文链接: