Debian Bug report logs - #593237
dash built-in echo expands \nnn sequences

version graph

Package: dash; Maintainer for dash is Andrej Shadura <[email protected]>; Source for dash is src:dash (PTS, buildd, popcon).

Reported by: "Alexander E. Patrakov" <[email protected]>

Date: Mon, 16 Aug 2010 14:42:01 UTC

Severity: wishlist

Tags: upstream, wontfix

Merged with 538100, 550399, 599834, 652509, 698593

Found in versions 0.5.5.1-7.4ubuntu1, dash/0.5.4-12, dash/0.5.5.1-2, dash/0.5.5.1-6, dash/0.5.5.1-7.4

Full log


Message #16 received at [email protected] (full text, mbox, reply):

Received: (at control) by bugs.debian.org; 15 Feb 2011 00:29:59 +0000
From [email protected] Tue Feb 15 00:29:59 2011
X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02
	(2008-06-10) on busoni.debian.org
X-Spam-Level: 
X-Spam-Bayes: score:0.0000 Tokens: new, 12; hammy, 84; neutral, 36; spammy, 0.
	spammytokens: hammytokens:0.000-+--H*u:2010-09-15, 0.000-+--H*UA:2010-09-15,
	0.000-+--H*u:1.5.21, 0.000-+--H*UA:1.5.21, 0.000-+--retitle
X-Spam-Status: No, score=-2.3 required=4.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW,
	SPF_PASS,URIBL_CNKR autolearn=no version=3.2.5-bugs.debian.org_2005_01_02
Return-path: <[email protected]>
Received: from mail-qy0-f173.google.com ([209.85.216.173])
	by busoni.debian.org with esmtps (TLS1.0:RSA_ARCFOUR_MD5:16)
	(Exim 4.69)
	(envelope-from <[email protected]>)
	id 1Pp8nn-0000So-1D; Tue, 15 Feb 2011 00:29:59 +0000
Received: by qyl38 with SMTP id 38so1780497qyl.11
        for <multiple recipients>; Mon, 14 Feb 2011 16:29:52 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=gamma;
        h=domainkey-signature:date:from:to:cc:subject:message-id:references
         :mime-version:content-type:content-disposition:in-reply-to
         :user-agent;
        bh=f9LfSQfWMHUlMKoR8Cv9YzQ2xHyDGSOLXflyqPPjSMw=;
        b=EC2CDQC+TZYHJrhEszQNErRI4YdMG5qtDQjxda+59SUMVIOcQRE0/t6Kq3Ie5NZUhC
         D1amr/fLnPawOtqkBg6hVX4R3B1/jSxzfoj9kqjtdE1fImPw1b9VPxQgwhnKXOEf5Uet
         0LxogFBUtnZR+7TRmB5+CaTsnWzszBt/XEWLM=
DomainKey-Signature: a=rsa-sha1; c=nofws;
        d=gmail.com; s=gamma;
        h=date:from:to:cc:subject:message-id:references:mime-version
         :content-type:content-disposition:in-reply-to:user-agent;
        b=mO7oOhVIK+r5ssdOv8vwkgsnNzYzR4vatBXRJC18t71q6XeWzzgmoH6O/nw9xVyrt9
         RtKf+IeZt0e0q+cvcMqLQQpIuuiDJFi4u8HEWJVCgRBN/I/4Aj8OY83yDVAq/Q4ROMfv
         OOlR1SXFtrevAyuiVpL0AEBAenvw9lNWpec80=
Received: by 10.224.28.204 with SMTP id n12mr3763095qac.346.1297729791136;
        Mon, 14 Feb 2011 16:29:51 -0800 (PST)
Received: from elie (adsl-69-209-51-217.dsl.chcgil.sbcglobal.net [69.209.51.217])
        by mx.google.com with ESMTPS id l17sm2200918qck.44.2011.02.14.16.29.49
        (version=SSLv3 cipher=OTHER);
        Mon, 14 Feb 2011 16:29:50 -0800 (PST)
Date: Mon, 14 Feb 2011 18:29:46 -0600
From: Jonathan Nieder <[email protected]>
To: porneL <[email protected]>
Cc: [email protected]
Subject: Re: echo -e echoes the argument
Message-ID: <20110215002946.GB30215@elie>
References: <[email protected]>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <[email protected]>
User-Agent: Mutt/1.5.21 (2010-09-15)
Delivered-To: [email protected]
retitle 550399 dash: document differences from bash
severity 550399 wishlist
tags 550399 + upstream
quit

Hi,

porneL wrote:

> In bash -e flag is required to enable interpretation of escape
> sequences. dash doesn't take such argument. 
> The result is that there is no common syntax for echo with escape
> sequences in the the two shells:

I think you are looking for

	printf '%b\n' '\n'

See the entry for "echo" at http://unix.org/2008edition/ for details.

Hope that helps,
Jonathan




Send a report that this bug log contains spam.


Debian bug tracking system administrator <[email protected]>. Last modified: Tue May 13 14:23:21 2025; Machine Name: buxtehude

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU General Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.