dash.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: n8dandy <n8dandy@protonmail.com>
To: Harald van Dijk <harald@gigawatt.nl>
Cc: "dash@vger.kernel.org" <dash@vger.kernel.org>
Subject: Re: dash & IFS
Date: Wed, 25 Mar 2020 07:08:24 +0000	[thread overview]
Message-ID: <9au65XzbFl5yRpX3pvtNOgED-D-908ns7VDH_Oa_yHmFQ25z-_CXc3vhR1nwR0KZd5fQRYPhst_8FtNXFniVHjizHiXYP9XpVUEYhhpyD40=@protonmail.com> (raw)
In-Reply-To: <0a54e6bd-07e7-80f0-a503-149473a19835@gigawatt.nl>

On Monday, 23 March 2020 09:44, Harald van Dijk <harald@gigawatt.nl> wrote:

> On 23/03/2020 08:20, n8dandy wrote:
> This isn't about IFS, this is just because dash does not support the use
> of $'\n' to indicate a newline. In dash, $'\n' is equivalent to '$\n'
> (in the same way that x'y' is equivalent to 'xy' in all shells). To
> portably get a string consisting of a single newline, either put a
> literal newline in your source:
>
> nl='
> '
>
> or use command substitutions:
>
> nl=$(printf '\n.'); nl=${nl%.}
>
> Currently, $'...' is not part of POSIX (although it has been accepted
> for the next version), and dash tends not to add new features that are
> not part of the standard.

Thanks for your help. Even if $'...' is not POSIX, I thought dash already
supports it. I'll stick with IFS= instead.

Sincerely

      reply	other threads:[~2020-03-25  7:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-23  8:20 dash & IFS n8dandy
2020-03-23  8:44 ` Harald van Dijk
2020-03-25  7:08   ` n8dandy [this message]

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='9au65XzbFl5yRpX3pvtNOgED-D-908ns7VDH_Oa_yHmFQ25z-_CXc3vhR1nwR0KZd5fQRYPhst_8FtNXFniVHjizHiXYP9XpVUEYhhpyD40=@protonmail.com' \
    --to=n8dandy@protonmail.com \
    --cc=dash@vger.kernel.org \
    --cc=harald@gigawatt.nl \
    /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;
as well as URLs for NNTP newsgroup(s).