Resolve shellcheck SC219[67] ?grep non-standard
[releng/global-jjb.git] / shell / job-cost.sh
index 2264728..d3ee81e 100644 (file)
@@ -29,7 +29,7 @@ fi
 if [[ -f stack-cost ]]; then
     echo "DEBUG: $(cat stack-cost)"
     echo "INFO: Retrieving Stack Cost..."
-    if ! stack_cost=$(fgrep "total: " stack-cost | awk '{print $2}'); then
+    if ! stack_cost=$(grep -F "total: " stack-cost | awk '{print $2}'); then
         echo "ERROR: Unable to retrieve Stack Cost, continuing anyway"
         stack_cost=0
     fi
@@ -39,7 +39,7 @@ else
 fi
 
 # Retrieve the current uptime (in seconds)
-uptime=$(cat /proc/uptime | awk '{print $1}')
+uptime=$(awk '{print $1}' /proc/uptime)
 # Convert to integer by truncating fractional part' and round up by one
 ((uptime=${uptime%\.*}+1))