Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 23 Jul 2022 06:40:37 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 265399] /bin/sh: improve echo -e builtin
Message-ID:  <bug-265399-227@https.bugs.freebsd.org/bugzilla/>

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

            Bug ID: 265399
           Summary: /bin/sh: improve echo -e builtin
           Product: Base System
           Version: 13.1-STABLE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Many People
          Priority: ---
         Component: bin
          Assignee: bugs@FreeBSD.org
          Reporter: freebsd@oldach.net

Created attachment 235434
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D235434&action=
=3Dedit
naive fix to echo -n -e

The "echo" builtin has an (undocumented) escape sequence expansion feature,
called for by the '-e' flag. Unfortunately that collides with the (document=
ed)
'-n' flag, as the builtin only checks the first flag on the command line.

The patch adds a naive fix to this, making this snippet DTRT:

echo -n -e '\a'

A proper fix should probably employ getopt.

--=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-265399-227>