Bourne again shell built-in command

Source: Internet
Author: User

The built- in command (build-in commands) is the command of the shell Build-in, and when built-in commands are used, the shell executes directly without creating a new child process. Built-in commands are used to create functional or convenient builds.

Bash supports built-in commands of type 3

    • Bourne Shell Build-ins
    • :,. Breakcdcontinueevalexecexitexportgetoptshash pwd Readonlyreturnset Shift Test[timestrapumaskunset

    • Bash build-in Commands
    • Aliasbindbuiltincommanddeclare Echo Enablehelpletlocallogoutprintfreadshopttypetypesetulimitunalias.

    • Special built-in command special Build-ins

When you run the POSIX mode, the main differences are the following 3 aspects

    1. Special built-in commands are found first (I don't know if that's right.) Original: Special build-ins is found before shell functions during commands lookup)
    2. If a built-in command returns an error code, then if the shell is non-interactive (non_interactive), then the shell exits.
    3. After the command execution is complete, the side effects of the copy statement will remain. (For safekeeping: Assignment Statements preciding the command stay in effect in the shell environment after the commands complete)

Starting a program execution from the shell

When the program is launched through the shell, Bash will fork out a subshell,subshell that will immediately read the parent Shell's command, and the command will be executed until the execution is completed or interrupted by the keyboard. Then Subshell will execute all the commands and the parent shell will wait for it to complete. When the Subshell executes and ends, the parent shell is awakened and the statement is re-printed at the terminal.

Bourne again shell built-in command

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.