-
Notifications
You must be signed in to change notification settings - Fork 1k
Description
Bash Documents中有这两段:
A Unix shell is both a command interpreter and a programming language.
As a command interpreter, the shell provides the user interface to the rich set of GNU utilities.
The programming language features allow these utilities to be combined. Files containing commands can be created, and become commands themselves.
command interpreter <=> user interface
programming language <=> combine these utilities
与本文中:
具体来说,Shell 这个词有多种含义。
首先,Shell 是一个程序,提供一个与用户对话的环境。这个环境只有一个命令提示符,让用户从键盘输入命令,所以又称为>命令行环境(command line interface,简写为 CLI)。Shell 接收到用户输入的命令,将命令送入操作系统执行,并将结果返回给用户。本书中,除非特别指明,Shell 指的就是命令行环境。
其次,Shell 是一个命令解释器,解释用户输入的命令。它支持变量、条件判断、循环操作等语法,所以用户可以用 Shell 命令写出各种小程序,又称为脚本(script)。这些脚本都通过 Shell 的解释执行,而不通过编译。
感觉这两段描述存在出入,是否与原文交错了?
我也刚学,所以有此疑问。