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

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.
主站蜘蛛池模板: 尚义县| 衡阳县| 太保市| 昌黎县| 佛学| 翁牛特旗| 通州市| 卢氏县| 玉环县| 石河子市| 攀枝花市| 苏州市| 乌兰浩特市| 油尖旺区| 澄城县| 汝南县| 临江市| 门源| 文安县| 涪陵区| 晋中市| 澎湖县| 赤峰市| 南郑县| 新宾| 佳木斯市| 长泰县| 广安市| 穆棱市| 大竹县| 望谟县| 霞浦县| 长沙县| 墨江| 济南市| 龙里县| 固始县| 松潘县| 钟祥市| 天台县| 吉木萨尔县|