Code Review
/
releng
/
global-jjb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Resolve shellcheck SC219[67] ?grep non-standard
[releng/global-jjb.git]
/
shell
/
job-cost.sh
diff --git
a/shell/job-cost.sh
b/shell/job-cost.sh
index
2264728
..
d3ee81e
100644
(file)
--- a/
shell/job-cost.sh
+++ b/
shell/job-cost.sh
@@
-29,7
+29,7
@@
fi
if [[ -f stack-cost ]]; then
echo "DEBUG: $(cat stack-cost)"
echo "INFO: Retrieving Stack Cost..."
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
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)
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))
# Convert to integer by truncating fractional part' and round up by one
((uptime=${uptime%\.*}+1))