bash - 如果有同名的别名,如何在 bash 中调用函数?

标签 bash function alias

看看这个例子:

[boda]$ alias aaa='echo aaa'
[boda]$ function aaa () { echo bbb }

[boda]$ function aaa () { echo bbb; }
[boda]$ aaa
aaa

如您所见,我有别名 aaa 和函数 aaa。但是,当我执行 aaa 时,别名运行。

我该如何运行该函数?

最佳答案

when I execute aaa the alias runs.

你可以运行它:

\aaa

这将调用函数。

关于bash - 如果有同名的别名,如何在 bash 中调用函数?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21738526/

相关文章:

perl - 间歇性地第一次迭代失败但第二次迭代通过

ios - 哪个更快? for 循环或 isEqualToArray

function - 使用 Meteor 从单独的文件中调用函数

python - 从另一个类添加到 python 中的 for 循环

linux - 如何获取Linux "at"命令创建的作业数量

bash - 实时修改shell stdout

mysql - 您可以在 SELECT 中分配一个变量,然后在同一个 SELECT 中使用它吗?

mysql - 选择 CASE WHEN ALIAS with COUNT 不返回零值

linux - 是否可以为 Mathematica 运行使用自定义别名?

linux - ssh 返回拒绝访问后调用 mysql 的 Bash 脚本