From 828524b279cdc4e4b9e60cf27a819272c750dd42 Mon Sep 17 00:00:00 2001 From: Siraaj Khandkar Date: Mon, 2 Nov 2020 06:49:08 -0500 Subject: [PATCH] Limit loggers report to top 5 --- home/lib/login_functions.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/home/lib/login_functions.sh b/home/lib/login_functions.sh index 6b01d49..8057711 100644 --- a/home/lib/login_functions.sh +++ b/home/lib/login_functions.sh @@ -569,7 +569,7 @@ motd() { echo - echo 'Loggers' + echo 'Loggers (top 5)' awk ' { split($5, prog, "[") @@ -589,6 +589,7 @@ motd() { print count[prog], total, prog }' \ | sort -n -k 1 -r \ + | head -5 \ | bar_gauge -v width=30 -v num=1 -v ch_left=' ' -v ch_right=' ' -v ch_blank=' ' \ | column -t \ | indent "${indent_unit}" -- 2.20.1