As the title says, I'm running multiple game servers, and every of them has the same name
but different PID
and the port
number. I would like to match the PID
of the server which is listening on certain port, and then I would like to kill this process. I need that in order to complete my bash script.
Is that even possible? Because it didn't find yet any solutions on the web.
Short version which you can pass to kill command:
lsof -i:80 -t