awk/testdir/t.array1

11 lines
123 B
Plaintext
Raw Normal View History

2019-06-23 05:13:57 -04:00
{for(i=1; i<=NF; i++) {
if (x[$i] == "")
y[++n] = $i
x[$i]++
}
}
END {
for (i=0; i<n; i++)
print (y[i], x[y[i]])
}