Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 13 Sep 2019 11:10:03 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 240556] Synopsis in sed(1) is wrong
Message-ID:  <bug-240556-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D240556

            Bug ID: 240556
           Summary: Synopsis in sed(1) is wrong
           Product: Documentation
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Many People
          Priority: ---
         Component: Manual Pages
          Assignee: bugs@FreeBSD.org
          Reporter: olli@FreeBSD.org
                CC: doc@FreeBSD.org

Created attachment 207455
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D207455&action=
=3Dedit
Patch for usr.bin/sed/sed.1

Short description:

Apparently, when the -u, -i and -I options where added to sed(1), it was
forgotten to add them to both lines in the SYNOPSIS section. They were only
added to the second line, although they apply to both.

Long description:

The SYNOPSIS section of the sed(1) manual page contains two distinct usage
lines:

In the first usage, a separate <command> argument is present. In this case,=
 the
-e and -f options are NOT allowed.

In the second usage, one or more commands are specified using one or more -e
and/or -f options. In this case, there is NO separate <command> argument.

ALL THE OTHER options (except -e and -f) can be used with BOTH usages,
including the -u, -i and -I options.  This can be easily verified by lookin=
g at
the source code (usr.bin/sed/main.c), or by just trying it. For example, th=
is
command works perfectly fine, but it's disallowed by the SYNOPSIS currently:

sed -i BAK s/foo/bar/g some_file

Please see the attached patch; it fixes the problem.  It applies cleanly to
both head and stable/12.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-240556-227>