Your '\r' comes from < which has two defects:
* its lines are CR-LF terminated (change this with `tr -d '\r'` or with `dos2unix`, `sed`, `vim`, etc)
* its last line is not LF-terminated
So bash presumes you mean `last=$'zcash\r'`.
Morevover:
* unless really necessary, you should quote your variables (`"$last"` not `$last`)
* `[-e $curr]` should be written `[ -e $curr ]`, or best `[ -e "$curr" ]` (spaces are important)
* your `| echo` does not need a pipe. Just put `echo` on a separate line.
* since you do not check for errors, your `wget`+`source`+`rm` could simply be written:
source <(wget -O- <