Allow for spaces in company name
This commit is contained in:
parent
4795d1dd59
commit
9ccd8b4c87
|
@ -49,12 +49,12 @@ printStockInformation()
|
||||||
|
|
||||||
getTicker()
|
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']")
|
symbol=$(echo $response | python -c "import sys, json; print json.load(sys.stdin)['ResultSet']['Result'][0]['symbol']")
|
||||||
unset response
|
unset response
|
||||||
}
|
}
|
||||||
|
|
||||||
checkInternet || exit 1
|
checkInternet || exit 1
|
||||||
getTicker $1
|
getTicker $1 $2 $3 $4 $5 $6 $7 $8 $9
|
||||||
getStockInformation $symbol
|
getStockInformation $symbol
|
||||||
printStockInformation
|
printStockInformation
|
||||||
|
|
Loading…
Reference in New Issue