Package: dash
Version: 0.5.7-4+b1
Severity: normal

Dear Maintainer,

In multi-line string literals, a line which starts with a $()-style
subshell which outputs an empty string will have its trailing newline
stripped. For example, this code:

echo "
$(echo '') hello
$(echo '') world"

will output " hello world", when other shells I've tried
(zsh, bash, ksh) all output:

"
 hello
 world"

I haven't looked at what posix says about this particular issue,
but the behavior of all the other shells looks way more sensible in my
opinion. If they're actually wrong and dash implements posix correctly,
feel free to ignore this issue.

-- System Information:
Debian Release: 8.11
  APT prefers oldstable-updates
  APT policy: (500, 'oldstable-updates'), (500, 'oldstable')
Architecture: amd64 (x86_64)

Kernel: Linux 3.16.0-5-amd64 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) (ignored: LC_ALL 
set to en_US.UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages dash depends on:
ii  debianutils  4.4+b1
ii  dpkg         1.17.27
ii  libc6        2.19-18+deb8u10

dash recommends no packages.

dash suggests no packages.

-- debconf information:
* dash/sh: true

Reply via email to