From 1ab1017b6aa418dbe37655918f298e4cfa44b1a6 Mon Sep 17 00:00:00 2001 From: Molly Lau Date: Sat, 19 Nov 2022 02:28:55 +0900 Subject: [PATCH] Update 90-footer --- Linux_reinstall/updatemotd/90-footer | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Linux_reinstall/updatemotd/90-footer b/Linux_reinstall/updatemotd/90-footer index a146f7a..a60bcb7 100644 --- a/Linux_reinstall/updatemotd/90-footer +++ b/Linux_reinstall/updatemotd/90-footer @@ -25,9 +25,9 @@ fi apt list --upgradable | awk 'END{print NR}' | tee -a "$UpdateLog" > /dev/null 2>&1 UpdateRemind=`cat $UpdateLog | tail -n 1` -Result=$(echo $UpdateRemind) -if [ "$Result" -ge "1" ]; then - printf "$UpdateRemind packages can be upgraded. Run 'apt list --upgradable' to see them.\n" +UpdateNum=`expr $UpdateRemind - 1` +if [ "$UpdateNum" -ge "1" ]; then + printf "$UpdateNum packages can be upgraded. Run 'apt list --upgradable' to see them.\n" fi rm -rf $UpdateLog