Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: N=5 echo $[N-1] why doesn't it work as expected



[ Quoting Helmut Jarausch in "N=5 echo $[N-1] why doesn't it work"... ]
> Hi,
> 
> sorry for this very simple question.
> 
> N=2
> N=5 echo $[N-1]
> displays 1 - I'd expected 4.
> Would anybody please explain why?

$N is evaluated first, so it says:
N=5 echo $[2-1]

grtz Miek

Attachment: signature.asc
Description: Digital signature



Messages sorted by: Reverse Date, Date, Thread, Author