diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2020-11-28 20:50:24 +0200 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2020-11-28 20:50:24 +0200 |
commit | a93162b21db4ce388ae11b636a51abafaee5b580 (patch) | |
tree | 5f0c0ea65464e2db3677ee3a52c44f0870188306 /awklib | |
parent | 6411df848bff9041d0493c6147973ed87801c817 (diff) | |
parent | 45c17dbafdca47c53e812008bade3f7a13115756 (diff) | |
download | egawk-a93162b21db4ce388ae11b636a51abafaee5b580.tar.gz egawk-a93162b21db4ce388ae11b636a51abafaee5b580.tar.bz2 egawk-a93162b21db4ce388ae11b636a51abafaee5b580.zip |
Merge branch 'gawk-5.1-stable'
Diffstat (limited to 'awklib')
-rw-r--r-- | awklib/eg/prog/cut.awk | 2 | ||||
-rw-r--r-- | awklib/eg/prog/split.awk | 8 | ||||
-rw-r--r-- | awklib/eg/prog/uniq.awk | 5 |
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. |