diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2019-08-02 14:40:14 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2019-08-02 14:40:14 +0000 |
commit | c1e8872b5836ced3b1262aad74a1035af9e584d7 (patch) | |
tree | 31779cc738cf6ec29b76ca3d814980b1136d93ba /usr.bin/printf/printf.1 | |
parent | 0554b1c8ea9c12f972d9beb634434759b0f7c94b (diff) |
document octal escape format in %b arguments;
omission reported by Andras Farkas <deepbluemistake at gmail dot com>;
OK deraadt@ jmc@, and Andras Farkas also checked the patch
Diffstat (limited to 'usr.bin/printf/printf.1')
-rw-r--r-- | usr.bin/printf/printf.1 | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/usr.bin/printf/printf.1 b/usr.bin/printf/printf.1 index 796b2e98616..727fccb95f2 100644 --- a/usr.bin/printf/printf.1 +++ b/usr.bin/printf/printf.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: printf.1,v 1.32 2019/06/02 06:16:37 bentley Exp $ +.\" $OpenBSD: printf.1,v 1.33 2019/08/02 14:40:13 schwarze Exp $ .\" .\" Copyright (c) 1989, 1990 The Regents of the University of California. .\" All rights reserved. @@ -32,7 +32,7 @@ .\" .\" from: @(#)printf.1 5.11 (Berkeley) 7/24/91 .\" -.Dd $Mdocdate: June 2 2019 $ +.Dd $Mdocdate: August 2 2019 $ .Dt PRINTF 1 .Os .Sh NAME @@ -319,6 +319,15 @@ respectively. Characters from the string .Ar argument are printed with backslash-escape sequences expanded. +In the +.Ar argument , +ASCII characters can be octally encoded either as +.Cm \e0 Ns Ar num +or as +.Cm \e Ns Ar num +like in the +.Ar format +string. If the .Ar argument contains the special escape sequence @@ -373,7 +382,17 @@ and always operates as if .Ev LC_ALL Ns =C were set. .Pp -The escape sequences \ee and \e' are extensions to that specification. +The escape sequences +.Cm \ee +and +.Cm \e' , +as well as omitting the leading digit +.Cm 0 +from +.Cm \e0 Ns Ar num +octal escape sequences in +.Cm %b +arguments, are extensions to that specification. .Sh HISTORY The .Nm |