如何删除一个bash的功能? [英] How do I delete a bash function?
本文介绍了如何删除一个bash的功能?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经这样做了:
的bash $ Z(){回声世界你好; }
我该如何摆脱它?
解决方案
取消设置-fž
将取消设置函数称为z,。一对夫妇的人都回答:
取消设置ž
但如果你有一个函数和一个名为z变量,只有变量将被取消设置,而不是功能。
I have done this:
bash $ z() { echo 'hello world'; }
How do I get rid of it?
解决方案
unset -f z
Will unset the function named z. A couple people have answered with:
unset z
but if you have a function and a variable named z only the variable will be unset, not the function.
这篇关于如何删除一个bash的功能?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文