📜  bash 中的函数 - Shell-Bash 代码示例

📅  最后修改于: 2022-03-11 14:51:27.701000             🧑  作者: Mango

代码示例4
killport(){ 

sudo kill -9 $(sudo fuser -n tcp $1 2> /dev/null);

}

Now put this function in your bash configuration file, eg ~/.bashrc and then run:

source  ~/.bashrc