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
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))