aboutsummaryrefslogtreecommitdiffstats
path: root/awklib/eg/prog/uniq.awk
diff options
context:
space:
mode:
authorStephen Davies <sdavies@sdc.com.au>2014-09-11 16:26:34 +0930
committerStephen Davies <sdavies@sdc.com.au>2014-09-11 16:26:34 +0930
commit33acaac51cd9087eb7a9b7e73c11f58da396df9a (patch)
tree31f31fcbddca399940865007322bdeea81f2f6f7 /awklib/eg/prog/uniq.awk
parent9b21de890a81179e951ffa5bea2099673f584b16 (diff)
parentca9f23d6c33c4b5cb3786d480948a42988ca99ac (diff)
downloadegawk-33acaac51cd9087eb7a9b7e73c11f58da396df9a.tar.gz
egawk-33acaac51cd9087eb7a9b7e73c11f58da396df9a.tar.bz2
egawk-33acaac51cd9087eb7a9b7e73c11f58da396df9a.zip
Merge branch 'master' of ssh://git.sv.gnu.org/srv/git/gawk
Conflicts: doc/gawk.info
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