From df45ac0ba7d06ea2eb800598e2661e051c94d07c Mon Sep 17 00:00:00 2001 From: John Gaunt Date: Thu, 27 Jan 2022 18:36:03 -0500 Subject: [PATCH] quoted for if --- ubiquiti_stock.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ubiquiti_stock.sh b/ubiquiti_stock.sh index 2c67efb..10b31be 100644 --- a/ubiquiti_stock.sh +++ b/ubiquiti_stock.sh @@ -9,7 +9,7 @@ wget -qO ${SOURCE_FILE} ${URL} INVENTORY_QUANTITY=$(grep -o -m 1 '"inventory_quantity":[0-9]\+,' ${SOURCE_FILE} | grep -o '[0-9]\+') -if [[ ${INVENTORY_QUANTITY} -gt 0 ]]; then +if [[ "${INVENTORY_QUANTITY}" -gt "0" ]]; then MESSAGE="There are currently ${INVENTORY_QUANTITY} in stock. ${URL}" echo ${MESSAGE} fi