cs_lang:awk
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| cs_lang:awk [2012/04/30 09:28] – cedric | cs_lang:awk [2012/04/30 09:30] (current) – cedric | ||
|---|---|---|---|
| Line 49: | Line 49: | ||
| print ligne | print ligne | ||
| } | } | ||
| + | </ | ||
| + | |||
| + | |||
| + | ===== Replace (tr) ===== | ||
| + | <code awk> | ||
| + | BEGIN {c1=" | ||
| + | { | ||
| + | for(i=1 ; i <= length($0) ; i++) { | ||
| + | if (substr($0, | ||
| + | printf(" | ||
| + | else | ||
| + | printf(" | ||
| + | printf(" | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ===== uniq ===== | ||
| + | <code awk> | ||
| + | BEGIN { option = "" | ||
| + | { if ($0 == precedent) | ||
| + | else { printf(" | ||
| + | i=0 } | ||
| + | precedent = $0 } | ||
| </ | </ | ||
cs_lang/awk.1335770937.txt.gz · Last modified: by cedric
