Created
March 21, 2022 15:40
-
-
Save eddieantonio/21fec4319cbe56d07472c07bacd5de64 to your computer and use it in GitHub Desktop.
Filter the output of ss -tulpn and display only relevant information, truncated
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/sh | |
ss -tulpn | awk '$2=="LISTEN" {printf "%16s %s\n", $5, substr($7, 1, 80-16)}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment