Skip to content

Instantly share code, notes, and snippets.

@Habetdin
Created December 6, 2022 17:38
Show Gist options
  • Save Habetdin/1175132d0e167efcf81ffff7187c7cb0 to your computer and use it in GitHub Desktop.
Save Habetdin/1175132d0e167efcf81ffff7187c7cb0 to your computer and use it in GitHub Desktop.
Format the `ss -tulpn` output
# Usual `ss -tulpn | column -t` has a broken table header,
# this oneliner should solve the issue and prettify output
ss -tulpn | sed '1 s/\(Local\|Peer\) Address:Port/\1_Addr:Port /g' | column -t -R3,4,5,6 -W7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment