Module Name: src Committed By: uwe Date: Tue Jul 5 17:58:47 UTC 2022
Modified Files: src/external/historical/nawk/bin: awk.1 Log Message: awk(1): Another echo(1) example that demonstrates field assignment To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 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.26 src/external/historical/nawk/bin/awk.1:1.27 --- src/external/historical/nawk/bin/awk.1:1.26 Tue Jul 5 16:59:41 2022 +++ src/external/historical/nawk/bin/awk.1 Tue Jul 5 17:58:47 2022 @@ -1,4 +1,4 @@ -.\" $NetBSD: awk.1,v 1.26 2022/07/05 16:59:41 uwe Exp $ +.\" $NetBSD: awk.1,v 1.27 2022/07/05 17:58:47 uwe Exp $ .\" .\" Copyright (C) Lucent Technologies 1997 .\" All Rights Reserved @@ -788,6 +788,12 @@ BEGIN { } .Ed .Pp +Another way to do the same that demonstrates field assignment and +.Li $ Ns Va 0 +re-evaluation: +.Pp +.Dl BEGIN { for (i = 1; i < ARGC; ++i) $i = ARGV[i]; print } +.Pp Print an error message to standard error: .Bd -literal -offset indent { print "error!" > "/dev/stderr" }