From 1a1bf2bcd5c47d3e3722ae76c59a36f56ee7985e Mon Sep 17 00:00:00 2001 From: Daniel Nichter Date: Thu, 2 Feb 2012 12:17:33 -0700 Subject: [PATCH] Update safeguards.sh in pt-stalk. --- bin/pt-stalk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/pt-stalk b/bin/pt-stalk index a7ded134..5d8fa048 100755 --- a/bin/pt-stalk +++ b/bin/pt-stalk @@ -517,8 +517,8 @@ check_disk_space() { local min_free_pct="${3:-0}" local bytes_margin="${4:-0}" - local used_bytes=$(cat "$file" | awk '/^\//{print $3 * 1024}'); - local free_bytes=$(cat "$file" | awk '/^\//{print $4 * 1024}'); + local used_bytes=$(cat "$file" | awk '/^\//{printf("%d",$3 * 1024)}'); + local free_bytes=$(cat "$file" | awk '/^\//{printf("%d",$4 * 1024)}'); local pct_used=$(cat "$file" | awk '/^\//{print $5}' | sed -e 's/%//g'); local pct_free=$((100 - $pct_used))