aboutsummaryrefslogtreecommitdiffstats
path: root/awklib
diff options
context:
space:
mode:
Diffstat (limited to 'awklib')
-rw-r--r--awklib/eg/prog/cut.awk2
-rw-r--r--awklib/eg/prog/split.awk8
-rw-r--r--awklib/eg/prog/uniq.awk5
3 files changed, 9 insertions, 6 deletions
diff --git a/awklib/eg/prog/cut.awk b/awklib/eg/prog/cut.awk
index 1ec89288..b0987b3a 100644
--- a/awklib/eg/prog/cut.awk
+++ b/awklib/eg/prog/cut.awk
@@ -4,9 +4,9 @@
# May 1993
# Options:
+# -c list Cut characters
# -f list Cut fields
# -d c Field delimiter character
-# -c list Cut characters
#
# -s Suppress lines without the delimiter
#
diff --git a/awklib/eg/prog/split.awk b/awklib/eg/prog/split.awk
index 8714dad2..16780044 100644
--- a/awklib/eg/prog/split.awk
+++ b/awklib/eg/prog/split.awk
@@ -7,10 +7,12 @@
# Revised slightly, May 2014
# Rewritten September 2020
-function usage()
+
+function usage( common)
{
- print("usage: split [-l count] [-a suffix-len] [file [outname]]") > "/dev/stderr"
- print(" split [-b N[k|m]] [-a suffix-len] [file [outname]]") > "/dev/stderr"
+ common = "[-a suffix-len] [file [outname]]"
+ printf("usage: split [-l count] %s\n", common) > "/dev/stderr"
+ printf(" split [-b N[k|m]] %s\n", common) > "/dev/stderr"
exit 1
}
BEGIN {
diff --git a/awklib/eg/prog/uniq.awk b/awklib/eg/prog/uniq.awk
index 57c98f2c..e614bf2b 100644
--- a/awklib/eg/prog/uniq.awk
+++ b/awklib/eg/prog/uniq.awk
@@ -8,7 +8,8 @@
function usage()
{
- print("Usage: uniq [-udc [-f fields] [-s chars]] [ in [ out ]]") > "/dev/stderr"
+ print("Usage: uniq [-udc [-f fields] [-s chars]] " \
+ "[ in [ out ]]") > "/dev/stderr"
exit 1
}
@@ -17,7 +18,7 @@ function usage()
# -u only nonrepeated lines
# -f n skip n fields
# -s n skip n characters, skip fields first
-# As of 2020, '+' can be used as option character in addition to '-'
+# As of 2020, '+' can be used as the option character in addition to '-'
# Previously allowed use of -N to skip fields and +N to skip
# characters is no longer allowed, and not supported by this version.