diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2020-01-01 22:33:00 +0200 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2020-01-01 22:33:00 +0200 |
commit | 3611609a48ea18cebb51a195bc32f7dbb7209d6e (patch) | |
tree | b48bd436bbe9e8b94fc6f8916110f7f291069e11 /doc/gawktexi.in | |
parent | 2e428edc2cff833784ab9970f0f59a8c639a57e3 (diff) | |
download | egawk-3611609a48ea18cebb51a195bc32f7dbb7209d6e.tar.gz egawk-3611609a48ea18cebb51a195bc32f7dbb7209d6e.tar.bz2 egawk-3611609a48ea18cebb51a195bc32f7dbb7209d6e.zip |
Doc update.
Diffstat (limited to 'doc/gawktexi.in')
-rw-r--r-- | doc/gawktexi.in | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/doc/gawktexi.in b/doc/gawktexi.in index 7e40bc5f..0046bf57 100644 --- a/doc/gawktexi.in +++ b/doc/gawktexi.in @@ -54,7 +54,7 @@ @c applies to and all the info about who's publishing this edition @c These apply across the board. -@set UPDATE-MONTH September, 2019 +@set UPDATE-MONTH January, 2020 @set VERSION 5.1 @set PATCHLEVEL 0 @@ -280,13 +280,13 @@ Fax: +1-617-542-2652 Email: <email>gnu@@gnu.org</email> URL: <ulink url="https://www.gnu.org">https://www.gnu.org/</ulink></literallayout> -<literallayout class="normal">Copyright © 1989, 1991, 1992, 1993, 1996–2005, 2007, 2009–2019 +<literallayout class="normal">Copyright © 1989, 1991, 1992, 1993, 1996–2005, 2007, 2009–2020 Free Software Foundation, Inc. All Rights Reserved.</literallayout> @end docbook @ifnotdocbook -Copyright @copyright{} 1989, 1991, 1992, 1993, 1996--2005, 2007, 2009--2019 @* +Copyright @copyright{} 1989, 1991, 1992, 1993, 1996--2005, 2007, 2009--2020 @* Free Software Foundation, Inc. @end ifnotdocbook @sp 2 @@ -25997,6 +25997,26 @@ print data[lines[i]], lines[i] This works because @code{data[$0]} is incremented each time a line is seen. +@c rick@openfortress.nl, Tue, 24 Dec 2019 13:43:06 +0100 +Rick van Rein offers the following one-liner to do the same job of +removing duplicates from unsorted text: + +@example +awk '@{ if (! seen[$0]++) print @}' +@end example + +This can be simplified even further, at the risk of becoming +almost too obscure: + +@example +awk '! seen[$0]++' +@end example + +@noindent +This version uses the expression as a pattern, relying on +@command{awk}'s default action of printing the line when +the pattern is true. + @node Extract Program @subsection Extracting Programs from Texinfo Source Files |