Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Different behaviour when interpreting a here-document between 5.3 and 5.5.1
- X-seq: zsh-users 23355
- From: Enrico Maria Crisostomo <enrico.m.crisostomo@xxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Different behaviour when interpreting a here-document between 5.3 and 5.5.1
- Date: Thu, 19 Apr 2018 23:52:32 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:content-transfer-encoding:mime-version:subject:message-id:date :to; bh=1jGRuXkxcEEQYuLVmfC7aw8RpHOKsEjsRuT3QkOMb/k=; b=Fd4Dc9SzuDKWHkVT10JKnnEzOBXW0e7/p4uQAA82A70NFc+sIYxqfFtHEz9B1M083n 0YMsCa9Xdze7hC6HidycFn6oWr1aLCs83ScICfaIIEicxv0+E3B7ew3DF4Z0UUF1e2C5 VueyKNHDVXVZ1vpJjSqAofbMKFBdV8++xn8hETmPSXOQPE2rHHSXF54BwYo2HDRTkqLi Sh7hun095+v6YqiwP1EInzS1sskaoduzcrc9xGMUIutM8fgaEUDQ2HTphT4SqNNr4I6K Vm6CypELS+Zuvz/i5jNNfaBQPydFLG+hrnaB5i1vc5lpUI6Rj4PeV6CsKy6oQgebaFvt MSTQ==
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- List-unsubscribe: <mailto:zsh-users-unsubscribe@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
Hi,
I'm struggling with an apparently simple problem. A script of mine has a function that writes a here-document whose lines end with a backslash. The script has been working fine until zsh has been updated recently.
The relevant part of the code is the following
mp_calculate_checksums()
{
cat <<EOF
checksums rmd160 ${CHECKSUM_RMD160} \\
sha256 ${CHECKSUM_SHA256} \\
size ${CHECKSUM_SIZE}
EOF
}
The expected output is something like:
checksums rmd160 281d97a37125fca07ff81a72ac337f6a23f5d2b0 \
sha256 233cd8724fd95e10b82ed62c692e7e79cca9114b49be834e65cd05b529d8ba70 \
size 31
When running the same script on 5.5.1, I get a single line of output, as if the last backslash of \\ were escaping the newline.
checksums rmd160 281d97a37125fca07ff81a72ac337f6a23f5d2b0 \ sha256 233cd8724fd95e10b82ed62c692e7e79cca9114b49be834e65cd05b529d8ba70 \ size 31
I haven't been able to troubleshoot it so far, and the zsh documentation seems to imply that the correct behaviour is the former, not the latter.
Thanks in advance for you help,
--
Enrico
Messages sorted by:
Reverse Date,
Date,
Thread,
Author