From 850082478506996474f60442d6a666bb02f44529 Mon Sep 17 00:00:00 2001 From: pvincent Date: Sat, 28 Oct 2023 23:34:39 +0400 Subject: [PATCH] ssu + ssu4 aliases --- bash.bashrc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bash.bashrc b/bash.bashrc index fd2394a..96b80ec 100644 --- a/bash.bashrc +++ b/bash.bashrc @@ -197,6 +197,12 @@ alias egrep='egrep $COLOR_OPTIONS' alias transfer_cp='rsync -a --info=progress2 --no-inc-recursive' +# shellcheck disable=SC2142 +alias ssu="ss -ntelp | perl -pne 'if(/uid:(\\d+)/){@a=getpwuid(\$1);s/uid:(\\d+)/user:\$a[0]/}'" + +# shellcheck disable=SC2142 +alias ssu4="ss -ntel4p | perl -pne 'if(/uid:(\\d+)/){@a=getpwuid(\$1);s/uid:(\\d+)/user:\$a[0]/}'" + # Alias definitions. # You may want to put all your additions into a separate file like # ~/.bash_aliases, instead of adding them here directly.