diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2014-09-22 19:49:34 +0300 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2014-09-22 19:49:34 +0300 |
commit | 06e16db227de0422f33b5f83817df55340f11846 (patch) | |
tree | 792cdf5a56ceb3fd8bef2353ca640a7d9920e604 /awklib/eg/misc | |
parent | eff1b6b21720518f2ea9dbd862fe3844d899db08 (diff) | |
download | egawk-06e16db227de0422f33b5f83817df55340f11846.tar.gz egawk-06e16db227de0422f33b5f83817df55340f11846.tar.bz2 egawk-06e16db227de0422f33b5f83817df55340f11846.zip |
More doc fixes.
Diffstat (limited to 'awklib/eg/misc')
-rw-r--r-- | awklib/eg/misc/arraymax.awk | 10 | ||||
-rw-r--r-- | awklib/eg/misc/findpat.awk | 13 |
2 files changed, 11 insertions, 12 deletions
diff --git a/awklib/eg/misc/arraymax.awk b/awklib/eg/misc/arraymax.awk index 20dd1768..64197f56 100644 --- a/awklib/eg/misc/arraymax.awk +++ b/awklib/eg/misc/arraymax.awk @@ -1,10 +1,10 @@ { - if ($1 > max) - max = $1 - arr[$1] = $0 + if ($1 > max) + max = $1 + arr[$1] = $0 } END { - for (x = 1; x <= max; x++) - print arr[x] + for (x = 1; x <= max; x++) + print arr[x] } diff --git a/awklib/eg/misc/findpat.awk b/awklib/eg/misc/findpat.awk index e9bef9ea..9d799434 100644 --- a/awklib/eg/misc/findpat.awk +++ b/awklib/eg/misc/findpat.awk @@ -1,10 +1,9 @@ { - if ($1 == "FIND") - regex = $2 - else { - where = match($0, regex) - if (where != 0) - print "Match of", regex, "found at", - where, "in", $0 + if ($1 == "FIND") + regex = $2 + else { + where = match($0, regex) + if (where != 0) + print "Match of", regex, "found at", where, "in", $0 } } |