Vỏ kiểm tra đầu tiên để xem liệu lệnh là một từ dành riêng (ví dụ như đối với làm). 2. Nếu nó không phải là một từ dành riêng và không phải là trích dẫn, vỏ tiếp theo kiểm tra danh sách bí danh của nó, và nếu nó tìm thấy một trận đấu, thực hiện thay thế. | In addition to the preceding substitutions the shell also checks for a tilde after a colon and performs tilde substitution on that as well for PATH interpretation . Order of Search It s worthwhile listing the order of searching the shell uses when you type a command name 1. The shell first checks to see whether the command is a reserved word such as for and do . 2. If it s not a reserved word and is not quoted the shell next checks its alias list and if it finds a match performs the substitution. If the alias definition ends in a space it attempts alias substitution on the next word. The final result is then checked against the reserved word list and if it s not a reserved word the shell proceeds to step 3. 3. Next the shell checks the command against its function list and executes it if found. 4. The shell checks to see whether the command is a built-in command such as cd and pwd . 5. Finally the shell searches the PATH to locate the command. 6. If the command still isn t found a command not found error message is issued. Team LiB 1 PREVIOUS H NEXT Team LiB 4 PREVIOUS Compatibility Summary Table summarizes the compatibility of the POSIX standard shell the Korn shell and Bash with the features described in this chapter. In this table an X denotes a supported feature UP an optional feature in the POSIX shell these are also known as User Portability features in the POSIX shell specification and POS a feature supported only by Bash when it is invoked with the name sh or with the posix command-line option or after set -o posix is executed. Table . POSIX Shell Korn Shell and Bash Compatibility POSIX Shell Korn Shell Bash ENV file X X POS vi line edit mode X X X emacs line edit mode X X fc command X X X r command X X string X Functions X X X local variables X X autoload via FPATH X Integer expressions with . X X Integer data type X X integers in different bases X X 0xhexnumber 0octalnumber X Aliases UP X X Arrays X X Job control UP X X cd - X X X cd old new X .