From 7587508c91c0d91ffcbd961cdac332b52dcd3b0c Mon Sep 17 00:00:00 2001 From: Tim Johnson Date: Tue, 4 Feb 2020 14:37:32 -0800 Subject: [PATCH] Redirect error to /dev/null Change-Id: I5e02875c033b8bda4c293b9b3842f26f3ca6133a Signed-off-by: Tim Johnson --- shell/job-cost.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shell/job-cost.sh b/shell/job-cost.sh index 34ab5e73..769b972a 100644 --- a/shell/job-cost.sh +++ b/shell/job-cost.sh @@ -59,7 +59,7 @@ url="https://pricing.vexxhost.net/v1/pricing/$instance_type/cost?seconds=$uptime json_block=$(curl -s "$url") # check if JSON returned and can be parsed -if jq <<< "$json_block"; then +if jq <<< "$json_block" > /dev/null 2>&1; then cost=$(jq .cost <<< "$json_block") resource=$(jq .resource <<< "$json_block" | tr -d '"') else -- 2.16.6