Invoking program when a bash function has the same name

前端 未结 2 1891
[愿得一人]
[愿得一人] 2020-12-09 02:43

I have the following function in my bash script:

make() {
    cd Python-3.2
    make
}

When make is called within this script, this functio

2条回答
  •  抹茶落季
    2020-12-09 03:05

    Use the full path to the program. E.g. /usr/bin/make.

    If you don't know the full path, you can use the which utility, like:

    $(which make)
    

    That will find the full path and execute make.

提交回复
热议问题