public inbox for linux-man@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] read.1p: Split format and argument of printf call
@ 2023-03-02 22:19 elmono
  0 siblings, 0 replies; 2+ messages in thread
From: elmono @ 2023-03-02 22:19 UTC (permalink / raw)
  To: linux-man@vger.kernel.org, Alejandro Colomar, Michael Kerrisk

As printf expects the format and arguments as separate arguments, split
the string accordingly. This is already fixed in the HTML version of the
standard.
---
 man-pages-posix-2017/man1p/read.1p | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/man-pages-posix-2017/man1p/read.1p b/man-pages-posix-2017/man1p/read.1p
index e09b896..d7e3a0a 100644
--- a/man-pages-posix-2017/man1p/read.1p
+++ b/man-pages-posix-2017/man1p/read.1p
@@ -196,7 +196,7 @@ The following command:
 
 while read -r xx yy
 do
-    printf "%s %s\en$yy$xx"
+    printf "%s %s\en" "$yy" "$xx"
 done < \fIinput_file\fR
 .fi
 .P
-- 
2.39.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-03-06 12:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <c9684666-8915-42fe-c44b-2d90c18f71e0.ref@yahoo.de>
     [not found] ` <c9684666-8915-42fe-c44b-2d90c18f71e0@yahoo.de>
2023-03-06 12:41   ` [patch] read.1p: Split format and argument of printf call Alejandro Colomar
2023-03-02 22:19 elmono

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox