- 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.
推薦閱讀
- 21天學通JavaScript
- Google Cloud Platform Cookbook
- 腦動力:C語言函數速查效率手冊
- PostgreSQL 11 Server Side Programming Quick Start Guide
- 來吧!帶你玩轉Excel VBA
- 流處理器研究與設計
- 工業機器人入門實用教程(KUKA機器人)
- 21天學通Java
- AWS Certified SysOps Administrator:Associate Guide
- 數據通信與計算機網絡
- Ruby on Rails敏捷開發最佳實踐
- 網絡安全技術及應用
- Visual FoxPro程序設計
- 和機器人一起進化
- 貫通Java Web輕量級應用開發