Useless use of grep, awk does the same thing :)
lsof -i TCP:$1 | awk '/LISTEN/{print $2}' | xargs kill -9
Useless use of grep, awk does the same thing :)
lsof -i TCP:$1 | awk '/LISTEN/{print $2}' | xargs kill -9