I wrote this little script so that I wouldn't have to remember to run apt-get update every day. It only outputs anything if there actually is something to install so it won't bombard my inbox every day.
#!/bin/bash # # Cron Script - run from /etc/crontab or /etc/cron.daily # # Runs "apt-get update" and prints the output of a simulated # dist-upgrade if new packages are found. if [[ `apt-get update 2>&1 | grep Get` ]]; then if [[ `apt-get --simulate dist-upgrade 2>&1 | grep Inst` ]]; then apt-get --simulate dist-upgrade fi fi
2005-05-26 Copyright Mattias Wikström (email: me at domain)