X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=blobdiff_plain;f=shell%2Fjob-cost.sh;h=d3ee81e894fa8d151f84b687d00d2731a0ad06a7;hb=refs%2Fchanges%2F23%2F62823%2F3;hp=2264728db7084775d4b9036c5d9effa8b0aacba7;hpb=3937b8cb2c1b6ba0997d5aeba1b38085e57a7d2f;p=releng%2Fglobal-jjb.git diff --git a/shell/job-cost.sh b/shell/job-cost.sh index 2264728d..d3ee81e8 100644 --- 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 ! 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))