home *** CD-ROM | disk | FTP | other *** search
/ Acorn User 11 / AUCD11B.iso / LANGUAGES / WraithSet / AwkStuff / Awkify / Examples / nodup next >
Text File  |  1999-03-21  |  216b  |  14 lines

  1. # remove duplicate lines
  2. # Idea of Byron Rakitzis
  3. # Arnold Robbins, arnold@gnu.ai.mit.edu
  4.  
  5. {
  6.  if (again[$0]++ == 0)
  7.      lines[++count] = $0
  8. }
  9.  
  10. END {
  11.       for (i = 1; i <= count; i++)
  12.           print lines[i]
  13.     }
  14.