mirror of
https://github.com/sbrl/cloudcatcher.git
synced 2018-01-26 00:52:31 +00:00
16 lines
274 B
Awk
16 lines
274 B
Awk
BEGIN {
|
|
ORS = ""; # We control the output separator in END
|
|
ip_count = 0;
|
|
}
|
|
|
|
/inet6?/ {
|
|
gsub("/[0-9]+$", "", $2); # Remove the subnet from the end
|
|
ips[ip_count++] = $2;
|
|
}
|
|
|
|
END {
|
|
for(i = 0 ; i < ip_count ; i++) {
|
|
print(ips[i]);
|
|
if(i < ip_count - 1) print(", ");
|
|
}
|
|
}
|