improve decodec of $ to remove segmentation error for -echo $[1+2*3]