diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2014-09-22 19:50:44 +0300 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2014-09-22 19:50:44 +0300 |
commit | 6641754c13e38dd6198832f23aa2be4b4546b324 (patch) | |
tree | f25aa9e9dcb57f97167eba8452a69d8de2f3c97c /awklib/eg/misc/findpat.awk | |
parent | ce2747c81b98b70e75ec399c8bdc6c09308380d3 (diff) | |
parent | 06e16db227de0422f33b5f83817df55340f11846 (diff) | |
download | egawk-6641754c13e38dd6198832f23aa2be4b4546b324.tar.gz egawk-6641754c13e38dd6198832f23aa2be4b4546b324.tar.bz2 egawk-6641754c13e38dd6198832f23aa2be4b4546b324.zip |
Merge branch 'gawk-4.1-stable'
Diffstat (limited to 'awklib/eg/misc/findpat.awk')
-rw-r--r-- | awklib/eg/misc/findpat.awk | 13 |
1 files changed, 6 insertions, 7 deletions
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 } } |