官术网_书友最值得收藏!

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.
主站蜘蛛池模板: 乌什县| 阳春市| 西华县| 涞源县| 长武县| 二手房| 雅江县| 和硕县| 项城市| 本溪| 礼泉县| 崇义县| 开平市| 东光县| 赣州市| 凯里市| 平陆县| 辽阳市| 九江县| 湘乡市| 红安县| 黔西县| 且末县| 哈巴河县| 西乌珠穆沁旗| 苍溪县| 永清县| 什邡市| 珠海市| 广德县| 上杭县| 汾阳市| 甘德县| 巴东县| 广丰县| 洪洞县| 乌苏市| 岑巩县| 霍邱县| 廊坊市| 吉首市|