Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: string overwrites string when echoed
- X-seq: zsh-users 22874
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: string overwrites string when echoed
- Date: Sat, 9 Sep 2017 10:01:49 -0700
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject :mime-version; bh=DII9LaUhzuwhLTWXam9h5qfticKIFpDqeFhgolGeeaU=; b=hA4XFNQ6urgipSPEix/ESBzxUL2LUTGfzVfhzBg9NHdMPYLu5O+9mV+/ZqMNRxol2x ZN8p3WscCg4bZrAfLrIbDABQrU9DOrpVt0W8BAbesjYXZHhdUl5jC9P+ZpqA4Gev4nll 1L+ZLldYhA6UkRl5yqug8vw6BsMIVCU5ajIHJjc5+JJVXXeaZjnCxbiAITvbxyt4hpeY K/O00q+E9pBYjcqPJfPosmuMRd1rTtqNQB3TiAPJCCpcr7txiYsFR1swIfPL/AfAYi5C uyLXmHf5EQ6/W5zzs24pY7NdBCq2JnuOywALBR3dCUEvAxKD3s4N4+W87A3v1Yrp3GVq GkZg==
- In-reply-to: <86o9qkqbes.fsf@zoho.com>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <86o9qkqbes.fsf@zoho.com>
On Sep 9, 2:55pm, Emanuel Berg wrote:
}
} reply=$(url $u)
} echo "$u $reply" # works
} echo "$reply $u" # doesn't work, $u overwrites $reply
The value of $reply has an embedded carriage-return. You can see
this if you use:
echo "$u ${(V)reply}"
echo "${(V)reply} $u"
Messages sorted by:
Reverse Date,
Date,
Thread,
Author