Created
November 14, 2014 22:44
-
-
Save bion/867827b51de139e0190b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| portnum=3001 | |
| sudo fuser $portnum/tcp 2>1 | | |
| cut -f 1 | | |
| tr -s ' ' '\n' | | |
| sed 1d | | |
| while read -r pid; do | |
| sudo cat /proc/$pid/comm | |
| done | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment