K2LL33D SHELL

 Apache/2.4.7 (Ubuntu)
 Linux sman1baleendah 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014 x86_64
 uid=33(www-data) gid=33(www-data) groups=33(www-data)
 safemode : OFF
 MySQL: ON | Perl: ON | cURL: OFF | WGet: ON
  >  / usr / share / doc / gawk / examples / prog /
server ip : 172.67.156.115

your ip : 108.162.242.40

H O M E


Filename/usr/share/doc/gawk/examples/prog/dupword.awk
Size507
Permissionrw-r--r--
Ownerroot : root
Create time27-Apr-2025 09:55
Last modified29-Mar-2012 04:03
Last accessed08-Jul-2025 06:09
Actionsedit | rename | delete | download (gzip)
Viewtext | code | image
# dupword.awk --- find duplicate words in text
#
# Arnold Robbins, [email protected], Public Domain
# December 1991
# Revised October 2000

{
$0 = tolower($0)
gsub(/[^[:alnum:][:blank:]]/, " ");
$0 = $0 # re-split
if (NF == 0)
next
if ($1 == prev)
printf("%s:%d: duplicate %s\n",
FILENAME, FNR, $1)
for (i = 2; i <= NF; i++)
if ($i == $(i-1))
printf("%s:%d: duplicate %s\n",
FILENAME, FNR, $i)
prev = $NF
}