From: Siraaj Khandkar Date: Fri, 29 Jun 2018 16:20:27 +0000 (-0400) Subject: Rename var file to prev_file X-Git-Url: https://git.xandkar.net/?a=commitdiff_plain;h=bd61022dea50d93a4423cd6517092f656c709944;p=khatus.git Rename var file to prev_file --- diff --git a/bin/khatus_show b/bin/khatus_show index a5fbae8..ad5b060 100755 --- a/bin/khatus_show +++ b/bin/khatus_show @@ -22,10 +22,10 @@ memory=$( total=$2; used=$3; cache=$6; - file = "/home/siraaj/var/run/status/memory_used_percentage"; + prev_file = "/home/siraaj/var/run/status/memory_used_percentage"; curr = round(used / total * 100); - getline prev < file; - print curr > file; + getline prev < prev_file; + print curr > prev_file; if (curr > prev) { direction = ">"; } else if (curr < prev) { @@ -46,9 +46,9 @@ disk=$( $1 == "/dev/mapper/kubuntu--vg-root" { curr = $5; sub("%$", "", curr); - file = "/home/siraaj/var/run/status/disk_space_used_percentage"; - getline prev < file; - print curr > file; + prev_file = "/home/siraaj/var/run/status/disk_space_used_percentage"; + getline prev < prev_file; + print curr > prev_file; if (curr > prev) { direction = ">"; } else if (curr < prev) {