From 9ccd8b4c87e9c1e5b57bf45a198ff6eef0631b30 Mon Sep 17 00:00:00 2001 From: Alex Epstein Date: Mon, 26 Jun 2017 23:06:43 -0400 Subject: [PATCH] Allow for spaces in company name --- stocks/stocks | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stocks/stocks b/stocks/stocks index 61407a3..d83ccea 100755 --- a/stocks/stocks +++ b/stocks/stocks @@ -49,12 +49,12 @@ printStockInformation() getTicker() { - response=$(curl -s "http://d.yimg.com/autoc.finance.yahoo.com/autoc?query=$1®ion=1&lang=en%22") > /dev/null + response=$(curl -s "http://d.yimg.com/autoc.finance.yahoo.com/autoc?query=$1+$2+$3+$4+$5+$6+$7+$8+$9®ion=1&lang=en%22") > /dev/null symbol=$(echo $response | python -c "import sys, json; print json.load(sys.stdin)['ResultSet']['Result'][0]['symbol']") unset response } checkInternet || exit 1 -getTicker $1 +getTicker $1 $2 $3 $4 $5 $6 $7 $8 $9 getStockInformation $symbol printStockInformation