Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #16756

Re: echo builtin doesn't handle end-of-options flag

Path csiph.com!goblin2!goblin1!goblin.stu.neva.ru!usenet.stanford.edu!not-for-mail
From Eli Schwartz <eschwartz@archlinux.org>
Newsgroups gnu.bash.bug
Subject Re: echo builtin doesn't handle end-of-options flag
Date Sun, 16 Aug 2020 12:20:57 -0400
Lines 82
Approved bug-bash@gnu.org
Message-ID <mailman.2304.1597594877.2739.bug-bash@gnu.org> (permalink)
References <F122E6E9-6067-45EF-8D18-2B1EBF0D5917@codegnome.org> <5f4dda03-d3fb-1a23-d0a9-925a9def4459@archlinux.org>
NNTP-Posting-Host lists.gnu.org
Mime-Version 1.0
Content-Type multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="zsHEAZGA5HCqy9d4bKi0r0MzYoJXbAZTn"
X-Trace usenet.stanford.edu 1597594877 5964 209.51.188.17 (16 Aug 2020 16:21:17 GMT)
X-Complaints-To action@cs.stanford.edu
To bug-bash@gnu.org
Envelope-to bug-bash@gnu.org
X-Spam-BL-Results
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/simple; d=archlinux.org; s=orion; t=1597594862; bh=dSzKoV4auq9yznBWB3LsYeDnTbclt2RqbuI7KA1uDNg=; h=Subject:To:References:From:Date:In-Reply-To; b=ohmv5xBIl69o+I9oXkGhm4L74fgAoCtSRKFxFF5JJkFr0U2u4Z6tUbZNlzzZ+30i+ +AIkLfxJQul47MDno5YGYxI8uPurKNN+i+ExQvFmqP0fsGSe3djuP91OrSSNaF7eTm E5OJlIhaTCiVv8+fzzXHE+JHEWtIAXF1ECa31DZIotooWurNl1mP1IasNh/QvLzjUP mm3eeEWjyuYpaJK7nLW2JLuNq/2FRyvASA8JKolLb/0AA0BU/a8/gOKANKz9GpnhY0 tAKaFTDvW5dCH24l9M5j8PPWV7keM9ZBAd+EyT2CM3OnSbMpFQ26r5CFwWCwnKVcyr /qzSBEaH2ru3qZj/ghRyoukU4nvY8WpqTjAobyOEvFbxSoHZGTrmrC+zucgYFGnEMP 9GbtPqYlmyTZ4WWL6lP9C8g7wMfDDCxLTEhPs4av47iIMd7+3DhMikrJcFB+UzsOpc xerIP+CUqueflnJkU7FkawXL13/5E73EvJvsAetiNpScY+pdoQvUaFRrWyJDP2Ifni fNXHepmWrx+8QOx9WrSsCm9fAzqVemWxy+L8alEnKNuzcoQRUqefCw/nST4K5DFz+f F32etWeKUBmWKIyh4pyajeieSnld6ovLPGGd27JhFS1zUvuoNwrnn6ag8y3FIB750F eFlk4DqWO8Y2QKJ+zbv1Nm+c=
X-Clacks-Overhead GNU Terry Pratchett
In-Reply-To <F122E6E9-6067-45EF-8D18-2B1EBF0D5917@codegnome.org>
Received-SPF pass client-ip=88.198.91.70; envelope-from=eschwartz@archlinux.org; helo=orion.archlinux.org
X-detected-operating-system by eggs.gnu.org: First seen = 2020/08/16 12:21:08
X-ACL-Warn Detected OS = Linux 2.2.x-3.x [generic] [fuzzy]
X-Spam_score_int -53
X-Spam_score -5.4
X-Spam_bar -----
X-Spam_report (-5.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no
X-Spam_action no action
X-BeenThere bug-bash@gnu.org
X-Mailman-Version 2.1.23
Precedence list
List-Id Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe <https://lists.gnu.org/mailman/options/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive <https://lists.gnu.org/archive/html/bug-bash>
List-Post <mailto:bug-bash@gnu.org>
List-Help <mailto:bug-bash-request@gnu.org?subject=help>
List-Subscribe <https://lists.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
X-Mailman-Original-Message-ID <5f4dda03-d3fb-1a23-d0a9-925a9def4459@archlinux.org>
X-Mailman-Original-References <F122E6E9-6067-45EF-8D18-2B1EBF0D5917@codegnome.org>
Xref csiph.com gnu.bash.bug:16756

Show key headers only | View raw


[Multipart message — attachments visible in raw view] - view raw

On 8/16/20 11:47 AM, Todd A. Jacobs wrote:
> Configuration Information [Automatically generated, do not change]:
> Machine: x86_64
> OS: darwin19.5.0
> Compiler: clang
> Compilation CFLAGS: -DSSH_SOURCE_BASHRC -Wno-parentheses -Wno-format-security
> uname output: Darwin titan.local 19.6.0 Darwin Kernel Version 19.6.0: Thu Jun 18 20:49:00 PDT 2020; root:xnu-6153.141.1~1/RELEASE_X86_64 x86_64
> Machine Type: x86_64-apple-darwin19.5.0
> 
> Bash Version: 5.0
> Patch Level: 18
> Release Status: release
> 
> Description:
>         The echo builtin accepts options, but does not seem to handle
>         `--` correctly as the end of options. The expected behavior
>         would be for -- to be removed, and any following flag-like
>         substrings printed as-is.

https://pubs.opengroup.org/onlinepubs/9699919799/utilities/echo.html

echo does not accept options, and is not permitted to accept options
including "--".

bash does accept -n, -e, -E in violation of POSIX, unless shopt -s shopt
-s xpg_echo is set, but it doesn't implement -- and I don't really see a
justification to do so. Either enable xpg_echo or use printf.

-- 
Eli Schwartz
Arch Linux Bug Wrangler and Trusted User

Back to gnu.bash.bug | Previous | Next | Find similar


Thread

Re: echo builtin doesn't handle end-of-options flag Eli Schwartz <eschwartz@archlinux.org> - 2020-08-16 12:20 -0400

csiph-web