home
/
code
/
khome.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5403122
)
Sort and de-dup motd servers
author
Siraaj Khandkar
<siraaj@khandkar.net>
Sat, 31 Oct 2020 03:02:05 +0000
(23:02 -0400)
committer
Siraaj Khandkar
<siraaj@khandkar.net>
Sat, 31 Oct 2020 03:02:05 +0000
(23:02 -0400)
home/lib/login_functions.sh
patch
|
blob
|
blame
|
history
diff --git
a/home/lib/login_functions.sh
b/home/lib/login_functions.sh
index
f1b3313
..
df255d7
100644
(file)
--- a/
home/lib/login_functions.sh
+++ b/
home/lib/login_functions.sh
@@
-522,7
+522,9
@@
motd() {
# WARN: ensure: $USER ALL=(ALL) NOPASSWD:/bin/netstat
sudo netstat -tlnp \
| awk 'NR > 2 {print $7}' \
- | awk -F/ '{printf "%s%s", sep, $2; sep = " "} END {printf "\n"}' \
+ | awk -F/ '{print $2}' \
+ | sort -u \
+ | xargs \
| column -t \
| indent "${indent_unit}${indent_unit}"
}
This page took
0.01934 seconds
and
4
git commands to generate.