2
了解Shell内置命令
在bash手册中,写道 Builtin commands are contained >>> within <<< the shell itself 另外,这个答案指出 A built-in command is simply a command that the shell carries out itself, instead of interpreting it as a request to load and run some >>> other program <<< 在上运行compgen -b时bash 4.4,我会收到所有shell内置命令的列表。我看到例如,[并且kill被列为shell内置程序。但是它们的实际位置是: /usr/bin/[ /bin/kill 我认为这是builtin将命令编译为/bin/bash可执行文件的一种手段。因此,真正使我感到困惑的是:请纠正我,但是builtin当一个单独的命令实际上不属于shell的一部分时,它又如何成为a 呢?