This commit is contained in:
2022-01-27 19:50:31 -05:00
parent 5ed39a177f
commit fd6877e4e8

View File

@@ -10,9 +10,9 @@ echo "Name: ${3}"
SOURCE_FILE="/tmp/source-${NAME}.html"
wget -qO ${SOURCE_FILE} ${URL}
wget -qO "${SOURCE_FILE}" ${URL}
INVENTORY_QUANTITY=$(grep -o -m 1 '"inventory_quantity":[0-9]\+,' ${SOURCE_FILE} | grep -o '[0-9]\+')
INVENTORY_QUANTITY=$(grep -o -m 1 '"inventory_quantity":[0-9]\+,' "${SOURCE_FILE}" | grep -o '[0-9]\+')
echo "Inventory Quantity: ${INVENTORY_QUANTITY}"