1*9a7741deSElliott Hughes{ n = length 2*9a7741deSElliott Hughes d = 0 3*9a7741deSElliott Hughes for (i = 1; i <= n; i++) 4*9a7741deSElliott Hughes if ((k = index($0, substr($0, i))) != i) { 5*9a7741deSElliott Hughes d = 1 6*9a7741deSElliott Hughes break; 7*9a7741deSElliott Hughes } 8*9a7741deSElliott Hughes if (d) 9*9a7741deSElliott Hughes print $0, "has duplicate letters" 10*9a7741deSElliott Hughes} 11