Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/historical/nawk/bin awk(1): document programs that ...
details: https://anonhg.NetBSD.org/src/rev/a4642cdef083
branches: trunk
changeset: 368314:a4642cdef083
user: uwe <uwe%NetBSD.org@localhost>
date: Tue Jul 05 13:29:18 2022 +0000
description:
awk(1): document programs that only has BEGIN and/or END pattern-actions.
Copied from POSIX, except "getline" is a statement, not a function, so
call it that.
diffstat:
external/historical/nawk/bin/awk.1 | 22 +++++++++++++++++++++-
1 files changed, 21 insertions(+), 1 deletions(-)
diffs (36 lines):
diff -r 846cf160b0f6 -r a4642cdef083 external/historical/nawk/bin/awk.1
--- a/external/historical/nawk/bin/awk.1 Tue Jul 05 13:21:38 2022 +0000
+++ b/external/historical/nawk/bin/awk.1 Tue Jul 05 13:29:18 2022 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: awk.1,v 1.15 2022/07/05 13:21:38 uwe Exp $
+.\" $NetBSD: awk.1,v 1.16 2022/07/05 13:29:18 uwe Exp $
.\"
.\" Copyright (C) Lucent Technologies 1997
.\" All Rights Reserved
@@ -634,6 +634,26 @@
and
.Ic END
do not combine with other patterns.
+.Pp
+If an awk program consists of only actions with the pattern
+.Ic BEGIN ,
+and the
+.Ic BEGIN
+action contains no
+.Ic getline
+statement, awk shall exit without reading its input when the last
+statement in the last
+.Ic BEGIN
+action is executed.
+If an awk program consists of only actions with the pattern
+.Ic END
+or only actions with the patterns
+.Ic BEGIN
+and
+.Ic END ,
+the input shall be read before the statements in the
+.Ic END
+actions are executed.
.Ss Built-in Variables
Variable names with special meanings:
.Bl -hang -width Va
Home |
Main Index |
Thread Index |
Old Index