zsh-workers
 help / color / mirror / code / Atom feed
* arithmetic expression from outside
@ 2019-09-05  8:49 YAMAGUCHI Takanori
  2019-09-05 18:22 ` Bart Schaefer
  0 siblings, 1 reply; 5+ messages in thread
From: YAMAGUCHI Takanori @ 2019-09-05  8:49 UTC (permalink / raw)
  To: zsh-workers

Is this an intended behaviour?

% cat sum.sh
sum=0
while read n; do
  sum=$((sum+n))
done
echo $sum
% seq 10 | zsh sum.sh
55
% yes ++sum | head -10 | zsh sum.sh
2046
% echo 'sum[$(echo Hello, world!>&2)]' | zsh sum.sh
Hello, world!
sum.sh:3: bad math expression: empty string
% zsh -c 'echo $ZSH_VERSION'
5.5.1

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-09-07 12:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-05  8:49 arithmetic expression from outside YAMAGUCHI Takanori
2019-09-05 18:22 ` Bart Schaefer
2019-09-05 19:49   ` Stephane Chazelas
2019-09-06  5:48   ` YAMAGUCHI Takanori
2019-09-07 12:01   ` Daniel Shahaf

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

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).