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


Groups > gnu.bash.bug > #11314

Enhancement: bash should have uniform escape syntaxes for `echo -e`, `printf` and `$'ANSI_C_style_escape'`.

Path csiph.com!optima2.xanadu-bbs.net!xanadu-bbs.net!enother.net!enother.net!news.glorb.com!usenet.stanford.edu!not-for-mail
From Arthur200000 <arthur200126@163.com>
Newsgroups gnu.bash.bug
Subject Enhancement: bash should have uniform escape syntaxes for `echo -e`, `printf` and `$'ANSI_C_style_escape'`.
Date Tue, 11 Aug 2015 02:30:54 +0800 (CST)
Lines 14
Approved bug-bash@gnu.org
Message-ID <mailman.8088.1439231469.904.bug-bash@gnu.org> (permalink)
NNTP-Posting-Host lists.gnu.org
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding base64
X-Trace usenet.stanford.edu 1439231470 18652 208.118.235.17 (10 Aug 2015 18:31:10 GMT)
X-Complaints-To action@cs.stanford.edu
To "bug-bash@gnu.org" <bug-bash@gnu.org>
Envelope-to bug-bash@gnu.org
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=Date:From:Subject:MIME-Version:Message-ID; bh=u674d oGLCGciq9G/9aXs7tB6fdgpJs3QpAWdSo436V8=; b=AfyihYlXUcDczeTz4/h7A d+PDiLrbD/odAwh2BlceKPllCqvkCoeFcHSncECrXi/oX0XQyvWcU8gRbScnoaja v842HKJlUH1vCvKYL+QdzQJUw5LA07qz4fYfE3HRfdxWH8Q0VmLkyqEiCD/5qJBc BfjjlvK3Xh3kcZAkPoYSnk=
X-Originating-IP [119.81.161.99, 176.34.63.150, 10.144.1.72]
X-Priority 3
X-Mailer Coremail Webmail Server Version SP_ntes V3.5 build 20150803(72677.7612) Copyright (c) 2002-2015 www.mailtech.cn 163com
X-CM-TRANSID OcGowGDp2UDf7chVuAwQAA--.10807W
X-CM-SenderInfo xduwx3rusqiiisw6il2tof0z/1tbiEB9S31WBQF5LPQAAs+
X-Coremail-Antispam 1U5529EdanIXcx71UUUUU7vcSsGvfC2KfnxnUU==
X-detected-operating-system by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From 220.181.13.57
X-BeenThere bug-bash@gnu.org
X-Mailman-Version 2.1.14
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 <http://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>
Xref csiph.com gnu.bash.bug:11314

Show key headers only | View raw


Configuration Information:
Machine Type: i686-pc-cygwin, i686-pc-msys, x86_86-linux-gnu, x86_64-Apple-Darwin

Bash Version: 4.3
Patch Level: 30
Release Status: release

Description:
	Bash has different escape syntaxes for `echo -e`, `printf` and `$'ANSI_C_style_escape'`. Take a specific point, `printf` and `$'C_Style'` accepts octals not starting with 0, but `echo -e` doesn't. 
	This is causing quite a lot of confusion.
	
	On older versions of bash, like bash 3.2 on OS X, `echo` doesn't understand `\e` but `printf` and `$'C_style'` does. I believe this is quite a aged problem.

Repeat-By:
	printf 'printf starts the bold\33[1m\n'; echo $'C escape should end it\33[0m'; echo -e 'echo -e does nothing but giving crap\33[1;31m'

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


Thread

Enhancement: bash should have uniform escape syntaxes for `echo -e`, `printf` and `$'ANSI_C_style_escape'`. Arthur200000 <arthur200126@163.com> - 2015-08-11 02:30 +0800

csiph-web