From 79211834987ee8bac48c80509a1cb15e4812c4ad Mon Sep 17 00:00:00 2001 From: erdgeist <> Date: Sun, 29 Sep 2013 04:34:41 +0000 Subject: Fix missing newline in df command --- minimunin | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/minimunin b/minimunin index 561e12a..b427c95 100755 --- a/minimunin +++ b/minimunin @@ -23,7 +23,7 @@ main() { # read commands in loop while read command arg; do - # chomp + # chomp and sanitize variables command=`printf %s "${command}" | /usr/bin/tr -cd '[:alnum:]_-. '` arg=`printf %s "${arg}" | /usr/bin/tr -cd '[:alnum:]_-. '` @@ -105,7 +105,7 @@ df) /bin/df -P -t noprocfs,devfs,fdescfs,linprocfs,linsysfs,nfs,nullfs | /usr/bin/tail -n +2 | while read fs blocks used avail cap mount; do fs=`printf "%s" ${fs} | /usr/bin/tr -c '[:alnum:]' _` - printf "%s %d" ${fs}.value $(( used * 512 )) + printf "%s %d\n" ${fs}.value $(( used * 512 )) done ;; *) @@ -335,7 +335,7 @@ EOF /bin/df -P -t noprocfs,devfs,fdescfs,linprocfs,linsysfs,nfs,nullfs | /usr/bin/tail -n +2 | while read fs blocks used avail cap mount; do fs=`printf "%s" ${fs} | /usr/bin/tr -c '[:alnum:]' _` - printf "%s %s" ${fs}.label ${mount} + printf "%s %s\n" ${fs}.label ${mount} done ;; *) -- cgit v1.2.3