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/>
index | next in thread | raw e-mail
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=265399 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=235434&action=edit 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 (documented) '-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. -- You are receiving this mail because: You are the assignee for the bug.home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-265399-227>
