diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2020-01-22 03:47:39 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2020-01-22 03:47:39 +0000 |
commit | 6fdeec1859b27253adb3bb007e8e2909cb932354 (patch) | |
tree | 6ba3f3a87c616362942d01a0b78d001a40ae4fa7 /usr.bin | |
parent | e9aad2f488cfe426dd0d1e6e1c9bf55f56cc4f73 (diff) |
claudio noticed that "exit" inside the main {} clause still runs the EXIT
clause, this was poorly documented as "immediately", and "after the last line"
which is inaccurate there are other causes. Explain this a bit better.
ok millert claudio
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/awk/awk.1 | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/usr.bin/awk/awk.1 b/usr.bin/awk/awk.1 index 0bf3231907a..8e473f86149 100644 --- a/usr.bin/awk/awk.1 +++ b/usr.bin/awk/awk.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: awk.1,v 1.45 2019/05/26 01:16:09 naddy Exp $ +.\" $OpenBSD: awk.1,v 1.46 2020/01/22 03:47:38 deraadt Exp $ .\" .\" Copyright (C) Lucent Technologies 1997 .\" All Rights Reserved @@ -22,7 +22,7 @@ .\" ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF .\" THIS SOFTWARE. .\" -.Dd $Mdocdate: May 26 2019 $ +.Dd $Mdocdate: January 22 2020 $ .Dt AWK 1 .Os .Sh NAME @@ -240,7 +240,10 @@ A statement can be one of the following: .Xc .It Xo Ic exit .Op Ar expression -.No # exit immediately; status is Ar expression +.No # exit processing, and perform +.Ic END +processing; status is +.Ar expression .Xc .El .Pp @@ -360,12 +363,12 @@ a relational expression, or a Boolean combination of these. .Pp -The special patterns +The special pattern .Ic BEGIN -and +may be used to capture control before the first input line is read. +The special pattern .Ic END -may be used to capture control before the first input line is read -and after the last. +may be used to capture control after processing is finished. .Ic BEGIN and .Ic END |