From d04b600ad159198797fa3ce4c5609cca0804d05e Mon Sep 17 00:00:00 2001 From: Alex Epstein Date: Mon, 3 Jul 2017 02:45:30 -0400 Subject: [PATCH] have exit codes --- stocks/stocks | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/stocks/stocks b/stocks/stocks index 58c0d79..a5642ef 100755 --- a/stocks/stocks +++ b/stocks/stocks @@ -175,12 +175,16 @@ done if [[ $1 == "update" ]];then update + exit 0 elif [[ $1 == "help" ]];then usage + exit 0 elif [[ $# == "0" ]];then usage + exit 0 else getTicker $1 $2 $3 $4 $5 $6 $7 $8 $9 # the company name might have spaces so passing in all args allows for this getStockInformation $symbol # based on the stock symbol exrapolated by the getTicker function get information on the stock printStockInformation # print this information out to the user in a human readable format + exit 0 fi