mirror of
https://github.com/gaoyifan/china-operator-ip.git
synced 2025-07-14 05:12:28 +08:00

* fix wget save to a wrong file name with a same name file * beautify log format * print asn on log * modify/add DEBUG, SKIP_DATA_PREPARATION environment variables
20 lines
239 B
Bash
Executable File
20 lines
239 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
source common.sh
|
|
cd result
|
|
ls *.txt |
|
|
while read file; do
|
|
echo ${file%.*}
|
|
cat $file |
|
|
awk -F\/ '{print $2}' |
|
|
(
|
|
sum=0
|
|
while read n; do
|
|
((s=32-n))
|
|
((sum+=1<<s))
|
|
done
|
|
echo $sum
|
|
)
|
|
echo
|
|
done > stat
|