diff options
| author | erdgeist <> | 2013-09-29 04:34:41 +0000 | 
|---|---|---|
| committer | erdgeist <> | 2013-09-29 04:34:41 +0000 | 
| commit | 79211834987ee8bac48c80509a1cb15e4812c4ad (patch) | |
| tree | 320123ba0e0e87826cf92b17760dc6eb1d18900d | |
| parent | 4dca59a9bc7619f89aad85f5f81ce8751934e2e4 (diff) | |
Fix missing newline in df command
| -rwxr-xr-x | minimunin | 6 | 
1 files changed, 3 insertions, 3 deletions
| @@ -23,7 +23,7 @@ main() { | |||
| 23 | # read commands in loop | 23 | # read commands in loop | 
| 24 | while read command arg; do | 24 | while read command arg; do | 
| 25 | 25 | ||
| 26 | # chomp | 26 | # chomp and sanitize variables | 
| 27 | command=`printf %s "${command}" | /usr/bin/tr -cd '[:alnum:]_-. '` | 27 | command=`printf %s "${command}" | /usr/bin/tr -cd '[:alnum:]_-. '` | 
| 28 | arg=`printf %s "${arg}" | /usr/bin/tr -cd '[:alnum:]_-. '` | 28 | arg=`printf %s "${arg}" | /usr/bin/tr -cd '[:alnum:]_-. '` | 
| 29 | 29 | ||
| @@ -105,7 +105,7 @@ df) | |||
| 105 | /bin/df -P -t noprocfs,devfs,fdescfs,linprocfs,linsysfs,nfs,nullfs | /usr/bin/tail -n +2 | | 105 | /bin/df -P -t noprocfs,devfs,fdescfs,linprocfs,linsysfs,nfs,nullfs | /usr/bin/tail -n +2 | | 
| 106 | while read fs blocks used avail cap mount; do | 106 | while read fs blocks used avail cap mount; do | 
| 107 | fs=`printf "%s" ${fs} | /usr/bin/tr -c '[:alnum:]' _` | 107 | fs=`printf "%s" ${fs} | /usr/bin/tr -c '[:alnum:]' _` | 
| 108 | printf "%s %d" ${fs}.value $(( used * 512 )) | 108 | printf "%s %d\n" ${fs}.value $(( used * 512 )) | 
| 109 | done | 109 | done | 
| 110 | ;; | 110 | ;; | 
| 111 | *) | 111 | *) | 
| @@ -335,7 +335,7 @@ EOF | |||
| 335 | /bin/df -P -t noprocfs,devfs,fdescfs,linprocfs,linsysfs,nfs,nullfs | /usr/bin/tail -n +2 | | 335 | /bin/df -P -t noprocfs,devfs,fdescfs,linprocfs,linsysfs,nfs,nullfs | /usr/bin/tail -n +2 | | 
| 336 | while read fs blocks used avail cap mount; do | 336 | while read fs blocks used avail cap mount; do | 
| 337 | fs=`printf "%s" ${fs} | /usr/bin/tr -c '[:alnum:]' _` | 337 | fs=`printf "%s" ${fs} | /usr/bin/tr -c '[:alnum:]' _` | 
| 338 | printf "%s %s" ${fs}.label ${mount} | 338 | printf "%s %s\n" ${fs}.label ${mount} | 
| 339 | done | 339 | done | 
| 340 | ;; | 340 | ;; | 
| 341 | *) | 341 | *) | 
