From nobody Sat Jul 23 06:40:37 2022 X-Original-To: bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4LqcBY4FB4z4Wqbn for ; Sat, 23 Jul 2022 06:40:37 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4LqcBY2r5Xz3RjC for ; Sat, 23 Jul 2022 06:40:37 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4LqcBY1pMrzW93 for ; Sat, 23 Jul 2022 06:40:37 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 26N6eb6j082871 for ; Sat, 23 Jul 2022 06:40:37 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 26N6ebj9082870 for bugs@FreeBSD.org; Sat, 23 Jul 2022 06:40:37 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 265399] /bin/sh: improve echo -e builtin Date: Sat, 23 Jul 2022 06:40:37 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 13.1-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: freebsd@oldach.net X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1658558437; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/PJQXwVZEhCeWMM852P93kBy8b+FzKYrAjNs4JFD0Dc=; b=ZJ+F1F4+P2E2C4jXGjxGQvBXu0Emta+mrreetli/S4slNTuk9P3nJVcN5Sq2DCVZOYBq/Q Lpdz1gmBatEwDBr7htR+F4mWFl/cCITuqmpIAtoGhtRQoEWl5nTiUM10MD9TXMLMAvvlsK 53PRQS4lIZJgtWEjSFBxmxdYbJToCk4u5/xJynqrIf3QXsFx6jLRbdLOn+6Fl7qli9HOvJ jHKt7a5UsauB+d5sl8rbjEpyT3BKRD66JOSPMqx9MtPPKftJl0Z2+g6AYhzNN1pW40Bwy1 0SYYa81zDBnIWIcPgD6GkBcbyiyJcff2AxpLtQx/RbYRh1QPXHjVaMU3n1V8ug== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1658558437; a=rsa-sha256; cv=none; b=CQmrg3Uc6k5k9jK8dkwk6ShoFz9zqqUXidiCtKfbB4OJNs7/Vh4iwvGUMkK0l2hcVUtEk7 fNt2S+FV+QeCy9L/FmybkRtoHJis7PhjcBujReUmyMfTdaFq4rQFJDCAnyXJKpLoCLDaST Kki1jeVtnRQzq6qP2scDSaLJleDGZkwvLG2urnZtqEkg3MEHBrRfBGFPD8ufRUbP2XhQa4 FVz4lRHXgWKZaryiEa3TI+VJ4uijdj4D3efh51kGMO50L25u2K5uTRKve6oQvdwDK1SqqV w6QvwiE8FavOThcio70Qcd7OYoGVyQQlXE/AXjncdkCoDhv1H7SDR0pV8kQMgw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N 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.=