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): use official echo examp...
details: https://anonhg.NetBSD.org/src/rev/e568e7383df4
branches: trunk
changeset: 368309:e568e7383df4
user: uwe <uwe%NetBSD.org@localhost>
date: Tue Jul 05 00:47:32 2022 +0000
description:
awk(1): use official echo example from POSIX
diffstat:
external/historical/nawk/bin/awk.1 | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diffs (24 lines):
diff -r 6f405e4646ad -r e568e7383df4 external/historical/nawk/bin/awk.1
--- a/external/historical/nawk/bin/awk.1 Mon Jul 04 18:25:45 2022 +0000
+++ b/external/historical/nawk/bin/awk.1 Tue Jul 05 00:47:32 2022 +0000
@@ -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 @@
.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:
Home |
Main Index |
Thread Index |
Old Index