aboutsummaryrefslogtreecommitdiffstats
path: root/awklib/eg/prog/cut.awk
diff options
context:
space:
mode:
authorJuergen Kahrs <Juergen.Kahrs@googlemail.com>2014-06-24 13:18:33 +0200
committerJuergen Kahrs <Juergen.Kahrs@googlemail.com>2014-06-24 13:18:33 +0200
commitf1245d04a9f076773c60499b468f44ed9c91b59b (patch)
tree2b49234400150bfaac7ebf8c017562300edc7471 /awklib/eg/prog/cut.awk
parentee9707cc44eea3ca64cb71666ac3e8ed26a3bb7f (diff)
parent78ded8ee8f11a321c96417e7d02dac2f5723a221 (diff)
downloadegawk-f1245d04a9f076773c60499b468f44ed9c91b59b.tar.gz
egawk-f1245d04a9f076773c60499b468f44ed9c91b59b.tar.bz2
egawk-f1245d04a9f076773c60499b468f44ed9c91b59b.zip
Merge remote-tracking branch 'origin/master' into cmake
Diffstat (limited to 'awklib/eg/prog/cut.awk')
-rw-r--r--awklib/eg/prog/cut.awk10
1 files changed, 5 insertions, 5 deletions
diff --git a/awklib/eg/prog/cut.awk b/awklib/eg/prog/cut.awk
index 16b4bdaa..04d9bc11 100644
--- a/awklib/eg/prog/cut.awk
+++ b/awklib/eg/prog/cut.awk
@@ -34,7 +34,7 @@ BEGIN \
OFS = ""
} else if (c == "d") {
if (length(Optarg) > 1) {
- printf("Using first character of %s" \
+ printf("cut: using first character of %s" \
" for delimiter\n", Optarg) > "/dev/stderr"
Optarg = substr(Optarg, 1, 1)
}
@@ -43,7 +43,7 @@ BEGIN \
if (FS == " ") # defeat awk semantics
FS = "[ ]"
} else if (c == "s")
- suppress++
+ suppress = 1
else
usage()
}
@@ -75,7 +75,7 @@ function set_fieldlist( n, m, i, j, k, f, g)
if (index(f[i], "-") != 0) { # a range
m = split(f[i], g, "-")
if (m != 2 || g[1] >= g[2]) {
- printf("bad field list: %s\n",
+ printf("cut: bad field list: %s\n",
f[i]) > "/dev/stderr"
exit 1
}
@@ -86,7 +86,7 @@ function set_fieldlist( n, m, i, j, k, f, g)
}
nfields = j - 1
}
-function set_charlist( field, i, j, f, g, t,
+function set_charlist( field, i, j, f, g, n, m, t,
filler, last, len)
{
field = 1 # count total fields
@@ -96,7 +96,7 @@ function set_charlist( field, i, j, f, g, t,
if (index(f[i], "-") != 0) { # range
m = split(f[i], g, "-")
if (m != 2 || g[1] >= g[2]) {
- printf("bad character list: %s\n",
+ printf("cut: bad character list: %s\n",
f[i]) > "/dev/stderr"
exit 1
}