dnsmanager/bin/sql-to-migration-format.awk

24 lines
268 B
Awk
Raw Normal View History

#!/usr/bin/awk -f
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
}
}