aboutsummaryrefslogtreecommitdiffstats
path: root/awklib/eg/prog/uniq.awk
diff options
context:
space:
mode:
authorAndrew J. Schorr <aschorr@telemetry-investments.com>2014-09-21 15:49:47 -0400
committerAndrew J. Schorr <aschorr@telemetry-investments.com>2014-09-21 15:49:47 -0400
commitb4d06df669e1eaf6c98cacb5c5f299bb5324e804 (patch)
tree50fb039c2cf280921e7650230cb42b0669e17f0b /awklib/eg/prog/uniq.awk
parent94e3f93395de538d73826e128281a3ea9591a5a9 (diff)
parent8b4e8f702df30b2b2238158504de5d8eb436958d (diff)
downloadegawk-b4d06df669e1eaf6c98cacb5c5f299bb5324e804.tar.gz
egawk-b4d06df669e1eaf6c98cacb5c5f299bb5324e804.tar.bz2
egawk-b4d06df669e1eaf6c98cacb5c5f299bb5324e804.zip
Merge 'master' into select
Diffstat (limited to 'awklib/eg/prog/uniq.awk')
-rw-r--r--awklib/eg/prog/uniq.awk5
1 files changed, 2 insertions, 3 deletions
diff --git a/awklib/eg/prog/uniq.awk b/awklib/eg/prog/uniq.awk
index 990387ac..2a2cf63e 100644
--- a/awklib/eg/prog/uniq.awk
+++ b/awklib/eg/prog/uniq.awk
@@ -18,8 +18,7 @@ function usage( e)
# -n skip n fields
# +n skip n characters, skip fields first
-BEGIN \
-{
+BEGIN {
count = 1
outputfile = "/dev/stdout"
opts = "udc0:1:2:3:4:5:6:7:8:9:"
@@ -31,7 +30,7 @@ BEGIN \
else if (c == "c")
do_count++
else if (index("0123456789", c) != 0) {
- # getopt requires args to options
+ # getopt() requires args to options
# this messes us up for things like -5
if (Optarg ~ /^[[:digit:]]+$/)
fcount = (c Optarg) + 0