awk/testdir/t.index

11 lines
160 B
Plaintext
Raw Normal View History

2019-06-23 05:13:57 -04:00
{ n = length
d = 0
for (i = 1; i <= n; i++)
if ((k = index($0, substr($0, i))) != i) {
d = 1
break;
}
if (d)
print $0, "has duplicate letters"
}