学习的过程也是一个遗忘的过程,为了留下学习轨迹或者是为了以后能够回忆下学习的过程,我会时不时的来更新自己正在学习的内容。

Types of Commands

上一篇 / 下一篇  2008-08-22 23:15:12 / 个人分类:Linux & shell

When a command is executed, it is an alias, a function, a built-in command, or an executable program on disk.Aliases are abbreviations (nicknames) for existing commands and apply to the C, TC, Bash, and Korn shells.Functions apply to the Bourne (introduced with AT&T System V, Release 2.0), Bash, and Korn shells. They are groups of commands organized as separate routines.Aliases and functions are defined within the shell's memory. Built-in commands are internal routines in the shell, and executable programs reside ondisk.The shell uses the path variable to locate the executable programs on disk and forks a child process before the command can be executed. This takes time. When the shell is ready to execute the command, it evaluates command types in the following order:[4]

[4]Numbers 3 and 4 are reversed for Bourne and Korn(88) shells. Number 3 does not apply for C and TC shells.

  1. Aliases

  2. Keywords

  3. Functions (bash)

  4. Built-in commands

  5. Executable programs

If, for example, the command is "xyz," the shell will check to see if "xyz" is an alias. If not, is it a built-in command or a function? If neither of those, it must be an executable command residing on the disk. The shell then must search the path for the command.


FPGA/CPLD器件价格查询

TAG:

 

评分:0

我来说两句

显示全部

:loveliness: :handshake :victory: :funk: :time: :kiss: :call: :hug: :lol :'( :Q :L ;P :$ :P :o :@ :D :( :)

日历

« 2008-10-30  
   1234
567891011
12131415161718
19202122232425
262728293031 

数据统计

  • 访问量: 1065
  • 日志数: 16
  • 建立时间: 2008-01-03
  • 更新时间: 2008-10-13

RSS订阅

Open Toolbar