mirror of
https://github.com/gaoyifan/china-operator-ip.git
synced 2025-07-14 05:12:28 +08:00
20 lines
452 B
Bash
Executable File
20 lines
452 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -e
|
|
|
|
source common.sh
|
|
set -e
|
|
[[ $SKIP_DATA_PREPARATION != true ]] && prepare_data
|
|
reset
|
|
mkdir -p result
|
|
for file in operator/*.conf; do
|
|
operator=${file%.*}
|
|
operator=${operator##*/}
|
|
log_info "generating IP list of $operator ..."
|
|
get_asn $file
|
|
get_asn $file | xargs bgptools -b rib.txt | cidr-merger > result/${operator}.txt &
|
|
get_asn $file | xargs bgptools -b rib6.txt | cidr-merger > result/${operator}6.txt &
|
|
done
|
|
|
|
wait
|