Run external program instead of builtin [closed]

南笙酒味 提交于 2019-12-08 12:33:17

问题


For example, sometimes I would like to run /bin/kill instead of the builtin kill. Is this best done as

env kill

or simply

/bin/kill

or perhaps something else?


回答1:


You seem to be looking the builtin enable. Saying enable -n kill would disable the builtin kill.

Say enable kill in order to enable it again.

The manual gives more information on Shell Builtin Commands.




回答2:


You want that a simple call to command kill should call /bin/kill & not the shell built-in.

There are 2 more options (in addition to what is specified by devnull's answer.):

You can alias kill to /bin/kill.

Or declare a function kill, which internally calls /bin/kill.



来源:https://stackoverflow.com/questions/17443108/run-external-program-instead-of-builtin

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!