2024-06-09 04:14:10 +02:00
|
|
|
#!/usr/bin/gawk -f
|
|
|
|
|
2024-06-10 03:29:26 +02:00
|
|
|
BEGIN {
|
|
|
|
OFS = "\t"
|
|
|
|
}
|
|
|
|
|
2024-06-09 04:14:10 +02:00
|
|
|
/^\[/ || /^\]/ {
|
|
|
|
next
|
|
|
|
}
|
|
|
|
|
|
|
|
{
|
|
|
|
domain = $0
|
|
|
|
login = $0
|
|
|
|
gsub("^.+domain\": \"", "", domain)
|
|
|
|
gsub("\",\"login\": .+", "", domain)
|
|
|
|
gsub(".+\",\"login\": \"", "", login)
|
|
|
|
gsub("\" }.?$", "", login)
|
|
|
|
data[login][domain] = 1
|
|
|
|
}
|
|
|
|
|
|
|
|
END {
|
|
|
|
for ( login in data ) {
|
|
|
|
domains = ""
|
|
|
|
nb = 0
|
|
|
|
for ( domain in data[login] ) {
|
|
|
|
nb += 1
|
|
|
|
domains = (domains "\t" domain)
|
|
|
|
}
|
|
|
|
print nb, login, domains
|
|
|
|
}
|
|
|
|
}
|