mirror of
https://github.com/gaoyifan/china-operator-ip.git
synced 2025-07-13 21:02:37 +08:00
19 lines
222 B
Bash
Executable File
19 lines
222 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
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
|