mirror of
https://github.com/gaoyifan/china-operator-ip.git
synced 2025-12-16 14:23:18 +08:00
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:
committed by
Yifan Gao
parent
6682779fc6
commit
c74585c9f5
37
stat.sh
37
stat.sh
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user