Login form



CRON. wget script
Download file and cut it into needed parts,.The parts will be used in PHP scripts :

folder='/var_www/banner_exchange/_common_/_media'
file='delegated-ripencc-latest'

wget -t 3 -o /dev/null -P $folder ftp://ftp.ripe.net/pub/stats/ripencc/$file ;  sleep 10
# echo wget
mv -f $folder/$file $folder/ip ; sleep 5

# echo mv

grep LT $folder/ip/$file  | grep ipv4 | awk 'BEGIN { FS = "|" } ;  { print $2 , $4 , $7  } ' > $folder/ip/$file.lt
#echo 1
grep RU $folder/ip/$file | grep ipv4 | awk 'BEGIN { FS = "|" } ;  { print $2 , $4 , $7  } '> $folder/ip/$file.ru
#echo 2
grep GE $folder/ip/$file | grep ipv4 | awk 'BEGIN { FS = "|" } ;  { print $2 , $4 , $7  } '> $folder/ip/$file.ge
#echo 3
grep GB $folder/ip/$file | grep ipv4 | awk 'BEGIN { FS = "|" } ;  { print $2 , $4 , $7 } '> $folder/ip/$file.gb
#echo 4
grep ipv4 $folder/ip/$file | awk 'BEGIN { FS = "|" } ;  { print $2 , $4 , $7 } '> $folder/ip/$file.eu
#echo 5

mail This e-mail address is being protected from spambots. You need JavaScript enabled to view it -s "lt IP" < $folder/ip/file.lt
echo mail
 
[ BBC news ][ Yahoo news ][ Linux guru ][ Webmaster ACE ]