|

楼主 |
发表于 2005-8-17 22:46:40
|
显示全部楼层
Post by hellwolf
$type time
time is a shell keyword
time不是bash的builtin。呵呵,是特殊了点。
看来我有必要再会去多看看书了。这是我从abs上quote下来的对于keyword, builtin, time等的一些解释。让我们彻底的把这个特殊的命令看清楚吧。
"A keyword is a reserved word, token or operator. Keywords have a special meaning to the shell, and indeed are the building blocks of the shell's syntax. As examples, "for", "while", "do", and "!" are keywords. Similar to a builtin, a keyword is hard-coded into Bash, but unlike a builtin, a keyword is not by itself a command, but part of a larger command structure.”
"An exception to this is the time command, listed in the official Bash documentation as a keyword."
"As of version 2.0 of Bash, time became a shell reserved word, with slightly altered behavior in a pipeline." |
|