jdotjdot / BashWeather

A Bash script to add regularly updated localized weather icons to your bash prompt
MIT License
11 stars 4 forks source link

line 54: [: too many arguments #4

Closed maheshjag closed 10 years ago

maheshjag commented 10 years ago

Got this error when trying to invoke the script like this:

./bashweather.sh -l "London, UK"

The space character between the comma and UK seems to be the culprit here.

jdotjdot commented 10 years ago

Thanks—this was fixed with 1ec91ed2872977e55963c52c9a9287b313d110c4; the if statement checking $l didn't quote the expanded $() expression, only the internal "$l", which wasn't obvious. You were completely right, the space was the issue, but you should be able to use spaces now.