run from cron:
55 5 * * * /root/bin/getTodayPaketList.sh 1>/dev/null 2>/dev/null

skript:
#!/bin/bash
###############################################################################
#
# getTodayPaketList.sh
#
# run via cron, save installed paket list to directory /root/log
#
# 5 0 * * * /root/bin/getTodayPaketList.sh 1>/dev/null 2>/dev/null
###############################################################################
today=`date +%m-%d`

FN=/root/log/pkgversion.$today

if ! [ -d "/root/log" ]; then
mkdir /root/log
fi

echo "save paket list from today to file $FN"
dpkg -l > $FN

yesterday=`date -d "yesterday 13:00" '+%m-%d'`
FNyesterday=/root/log/pkgversion.$yesterday

echo "Compare $FN (new) | $FNyesterday (old)"
echo "-------------------------------------------------------------"
diff -y $FN $FNyesterday |grep '|' |grep ^ii

computer2know :: thank you for your visit :: have a nice day :: © 2022