2024-06-22 01:34:39 +02:00
|
|
|
#!/usr/bin/awk -f
|
|
|
|
|
2024-11-17 06:24:07 +01:00
|
|
|
# The input file format should be:
|
|
|
|
# login password domain
|
|
|
|
#
|
|
|
|
# (the "password" field won't actually be used)
|
|
|
|
|
2024-06-22 01:34:39 +02:00
|
|
|
BEGIN {
|
|
|
|
OFS = "\t"
|
|
|
|
}
|
|
|
|
|
|
|
|
{
|
|
|
|
login = $1
|
|
|
|
domain = $3
|
|
|
|
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
|
|
|
|
}
|
|
|
|
}
|