Module Name: src
Committed By: uwe
Date: Tue Jul 5 00:47:33 UTC 2022
Modified Files:
src/external/historical/nawk/bin: awk.1
Log Message:
awk(1): use official echo example from POSIX
To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/external/historical/nawk/bin/awk.1
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/external/historical/nawk/bin/awk.1
diff -u src/external/historical/nawk/bin/awk.1:1.10 src/external/historical/nawk/bin/awk.1:1.11
--- src/external/historical/nawk/bin/awk.1:1.10 Mon Jul 4 18:07:41 2022
+++ src/external/historical/nawk/bin/awk.1 Tue Jul 5 00:47:32 2022
@@ -1,4 +1,4 @@
-.\" $NetBSD: awk.1,v 1.10 2022/07/04 18:07:41 rillig Exp $
+.\" $NetBSD: awk.1,v 1.11 2022/07/05 00:47:32 uwe Exp $
.\"
.\" Copyright (C) Lucent Technologies 1997
.\" All Rights Reserved
@@ -711,10 +711,10 @@ Print all lines between start/stop pairs
.Pp
Simulate echo(1):
.Bd -literal -offset indent
-BEGIN { # Simulate echo(1)
- for (i = 1; i < ARGC; i++) printf "%s ", ARGV[i]
- printf "\en"
- exit }
+BEGIN {
+ for (i = 1; i < ARGC; ++i)
+ printf("%s%s", ARGV[i], i==ARGC-1?"\en":" ")
+}
.Ed
.Pp
Print an error message to standard error: