DASH Shell discussions
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Dima Sorkin <dima@minignu.minidns.net>
Cc: dash@vger.kernel.org, herbert@gondor.hengli.com.au
Subject: Re: evaluation of env variables in DASH
Date: Wed, 19 Oct 2011 15:42:51 -0600	[thread overview]
Message-ID: <4E9F445B.2090609@redhat.com> (raw)
In-Reply-To: <87aa8woesd.fsf@minignu.minidns.net>

On 10/19/2011 03:24 PM, Dima Sorkin wrote:
> Hi.
>    The following DASH behaviour seems buggy to me

The only bug here is your expectations.

>
> -----------------
> $ export A='\n'
> $ echo $A
>

Passing a literal backslash to echo is non-portable.  POSIX even says 
so.  And bash can match dash behavior:

$ (shopt -s xpg_echo; A='\n'; echo -$A-)
-

  reply	other threads:[~2011-10-19 21:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-19 21:24 evaluation of env variables in DASH Dima Sorkin
2011-10-19 21:42 ` Eric Blake [this message]
2011-10-19 21:58 ` Jilles Tjoelker
2011-10-19 22:13   ` Dima Sorkin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E9F445B.2090609@redhat.com \
    --to=eblake@redhat.com \
    --cc=dash@vger.kernel.org \
    --cc=dima@minignu.minidns.net \
    --cc=herbert@gondor.hengli.com.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox