logo

utils-std

Collection of commonly available Unix tools
commit: 155e926855d71bf3a06300f3acd86f33c54903e1
parent 38f563889e6ef10e7d239747173ffd8fe3e584ad
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Mon, 18 Mar 2024 04:12:05 +0100

cmd/echo.1: Put -n in SYNOPSIS, use OPTIONS/SEE ALSO sections

Diffstat:

Mcmd/echo.133++++++++++++++++-----------------
1 file changed, 16 insertions(+), 17 deletions(-)

diff --git a/cmd/echo.1 b/cmd/echo.1 @@ -1,7 +1,7 @@ .\" utils-std: Collection of commonly available Unix tools .\" Copyright 2017 Haelwenn (lanodan) Monnier <contact+utils@hacktivis.me> .\" SPDX-License-Identifier: MPL-2.0 -.Dd 2023-05-31 +.Dd 2024-03-18 .Dt ECHO 1 .Os .Sh NAME @@ -9,36 +9,35 @@ .Nd write arguments to standard output .Sh SYNOPSIS .Nm +.Op Fl n .Op Ar string ... .Sh DESCRIPTION .Nm -buffers all of it's arguments and writes them all at once to standard output, followed by a newline. -If there is no arguments, only the newline is written. +buffers all +.Ar string +together with a final newline and then does a single write to standard output. +If there is no +.Ar string , +only the newline is written. .Pp The .Fl - -operand, which generally denotes an end to option processing, is treated as part of +operand, which generaly terminates option processing, is treated as part of .Ar string . -.Pp -.Nm -supports the following options: +.Sh OPTIONS .Bl -tag -width Ds .It Fl n Do not print the trailing newline character. .El -.Pp -Should also be noted that this version of -.Nm -isn't XSI-compliant as -.Fl n -is parsed as an option and backslash operators aren't supported. -See -.Xr printf 1 -for such an utility. .Sh EXIT STATUS .Ex -std +.Sh SEE ALSO +.Xr printf 1 .Sh STANDARDS -Not XSI-compliant but should be compliant to +Not XSI-compliant as +.Fl n +is parsed as an option and backslash operators aren't supported. +Should be compliant with the rest of .St -p1003.1-2008 .Sh AUTHORS .An Haelwenn (lanodan) Monnier Aq Mt contact@hacktivis.me