add ipv6 list (#12)

* change asname source

* change rib source

* generate for ipv6

* fix typo

* update travis data

* change docker image

* delete duplicate lines before merge cidr

* change rib source

* change style of upstream

* modify arg for uniq

* change some conf files to symlink

* update stat

* add sudo for apt in travis config

* add stat for 0

* fix bug for stat

* set -x

* curl -vv

* change dist to bionic

* remove verbose options
This commit is contained in:
Zhaofeng Yang (楊肇峰)
2019-12-19 14:39:16 +08:00
committed by Yifan Gao
parent 6682779fc6
commit c74585c9f5
12 changed files with 58 additions and 14 deletions

37
stat.sh
View File

@@ -4,15 +4,32 @@ source common.sh
cd result
for file in *.txt; do
echo ${file%.*}
cat $file |
awk -F\/ '{print $2}' |
(
sum=0
while read n; do
((s=32-n))
((sum+=1<<s))
done
echo $sum
)
if [[ $file == *6.txt ]]; then
cat $file |
awk -F\/ '{print $2}' |
(
sum=0
while read n; do
if [[ -n $n ]]; then
((s=64-n))
((sum+=1<<s))
fi
done
echo $sum
)
else
cat $file |
awk -F\/ '{print $2}' |
(
sum=0
while read n; do
if [[ -n $n ]]; then
((s=32-n))
((sum+=1<<s))
fi
done
echo $sum
)
fi
echo
done | tee stat