Y
Hacker News
new
|
ask
|
show
|
jobs
by
addingnumbers
1145 days ago
grep isn't necessary at all here:
lsof -s TCP:LISTEN -i :$port
1 comments
hdjjhhvvhga
1145 days ago
You could also add the -t option for direct piping to kill.
link