Execute bash built-in commands.
builtin [shell-builtin [arg ...]]
shell-builtin (optional): The bash built-in command to be called.
arg (optional): One or more arguments passed to the bash built-in command.
Returns the return value from execution of this builtin command, unless no bash builtin command is passed or the builtin command is disabled.
Priority order for cases with the same name:
builtin built-in commands > functions > built-in commands > external commands
# For the situation where the external command has the highest priority, please refer to the enable command.
# At this time, the built-in commands will be used first.
echo "the Great Wall"
# Call the built-in command type and return the command type (builtin)
type -t echo
#Define echo function
echo(){
printf "123\n"
}
# At this time, the function with the same name is used first, and (123) is displayed.
echo
# Call the built-in command type and return the command type (function)
type -t echo
# At this time, the built-in commands will be used first.
builtin echo -e "backslash \\"
# Execute shell internal instructions and output the command alias under the current system
builtin alias
alias cp='cp -i'
alias l.='ls -d .* --color=tty'
alias ll='ls -l --color=tty'
alias ls='ls --color=tty'
alias mv='mv -i'
alias rm='rm -i'
alias which='alias | /usr/bin/which --tty-only --read-alias --show-dot --show-tilde'