Skip to content

Instantly share code, notes, and snippets.

@madaan
Created January 22, 2014 14:40
Show Gist options
  • Save madaan/8559802 to your computer and use it in GitHub Desktop.
Save madaan/8559802 to your computer and use it in GitHub Desktop.
Aida download monitoring script
#sg
command='curl -O -C - http://www.mpi-inf.mpg.de/yago-naga/aida/download/entity-repository/AIDA_entity_repository_2010-08-17v5-1.sql.bz2'
restarts=0
CLICK_TIME=5
until `$command`;do
echo "Download stopped!"
#keep taking snapshots
if [ `echo "$restart % $CLICK_TIME" | bc` -eq 0 ];then
cp AIDA_entity_repository_2010-08-17v5-1.sql.bz2 aida_backup
fi
echo "Initiating a restart # $restart"
sleep 1
let $restart = $restart + 1
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment