User Tools

Site Tools


cs_lang:awk

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
cs_lang:awk [2012/04/30 09:29] cedriccs_lang:awk [2012/04/30 09:30] (current) cedric
Line 63: Line 63:
 printf("\n") printf("\n")
 } }
 +</code>
 +
 +
 +
 +
 +===== uniq =====
 +<code awk>
 +BEGIN { option = "" }
 +{ if ($0 == precedent)  i++
 +else { printf("\t%d\t%s\n", i, precedent)
 + i=0 }
 +precedent = $0 }
 </code> </code>
cs_lang/awk.txt · Last modified: 2012/04/30 09:30 by cedric