home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mega CD-ROM 1
/
megacd_rom_1.zip
/
megacd_rom_1
/
GNUISH
/
FIND12.ZIP
/
UNIQ-C
< prev
next >
Wrap
Text File
|
1990-09-24
|
323b
|
19 lines
#! c:/bin/awk
# uniq-c - replace `uniq -c'
# Copyright (C) 1990 by Thorsten Ohl, td12@ddagsi3.bitnet
BEGIN { count = 1
getline
last = $0
}
{ if ($0 == last)
count++;
else
{
print "[" count "] " last
last = $0
count = 1
}
}
END { print "[" count "] " last }