- Learning Linux Shell Scripting
- Ganesh Naik
- 223字
- 2021-06-25 22:02:53
Checking and disabling shell internal commands
Bash provides a few builtin commands to change the sequence of command-line processing. We can use these builtin commands to change the default behaviour of command-line processing.
- The builtin command will disable aliases and functions for the command that follows the command. The shell will search for the external command and the builtin command will search for the command passed as an argument, as follows:
$ command ls
- This will facilitate the ignoring of aliases and functions and the external ls command will execute.
- The builtin command will work as follows:
$ builtin BUILT-IN
- This will ignore aliases and functions from the shell environment and only builtin commands and external commands will be processed.
- The break builtin command will work as follows:
$ builtin -n break
- This will disable the builtin break and the external break command will be processed.
- To display all shell builtin commands, give the command as follows:
$ enable
- The output on the screen will show the following as shell internal commands:

- The shell builtin command can be disabled as follows:
$ enable -n built-in-command
- For example: $ enable -n test
- In this case, in my shell, if we have to test an external command, then, instead of the internal test command, the external test command will be executed.