mirror of
https://github.com/gaoyifan/china-operator-ip.git
synced 2025-07-14 05:12:28 +08:00
19 lines
233 B
Bash
Executable File
19 lines
233 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
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
|
|
)
|
|
echo
|
|
done | tee stat
|