Page 1 of 1

Update Avira with a script

Posted: Wed Feb 04, 2009 2:13 pm
by Icecube
<Recovered this part of a topic from google cache. It seems that the topic was deleted.>

Download unxutils: ... up_id=9328

Extract: cat, grep, read, sh and wget

Save the following script (

Code: Select all

OLDVERSION=`cat avira-last.txt`

wget -O avira-update.txt

NEWVERSION=`grep -A 2 "Avira AntiVir Rescue System" avira-update.txt | grep -m 1 -o "Version : [[:digit:]]*" | grep -o "[[:digit:]]*"`

if [ "$OLDVERSION" = "$NEWVERSION" ]; then
    echo "No update"
    echo "Updated version available"
    echo "Download now? (Press any key to continue, press 'Ctrl+C' to abort)"
    pause > nul
    wget -O "avira-$NEWVERSION.iso"
    echo "$NEWVERSION" > avira-last.txt

Run the script with sh.exe

It works on linux (replaced the pause > nul command with the read command). Not sure if the pause > nul command can be used in the sh script.

The iso will be saved as: avira-<VERSION_NUMBER>.iso
e.g: avira-20081224125550.iso

@ Victor
I will try to make a script that will update the avira definition files and other avira files (some 7z stuff).