slitaz-dev-tools diff baba-scripts/edf @ rev 238
tazwikiss: add min, max, cnt
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sun Feb 22 11:10:22 2015 +0100 (2015-02-22) |
parents | |
children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/baba-scripts/edf Sun Feb 22 11:10:22 2015 +0100 1.3 @@ -0,0 +1,34 @@ 1.4 +#!/bin/sh 1.5 + 1.6 +MAIN_DIALOG=' 1.7 +<window title="edf" window_position="1" decorated="false" width-request="600"> 1.8 + <vbox> 1.9 + <text use-markup="true"><label>"<b>Enhanced df</b>"</label></text> 1.10 + <text height-request="10"><label>""</label></text> 1.11 + <tree> 1.12 + <label>Device|Mount point|Total size|Occupied|Occ.ratio|Free</label> 1.13 +' 1.14 +I=$IFS; IFS=$'\n' 1.15 +for line in `df -h | tail -n +2 | grep ^/dev/ | sed -e "s/ \+/|/g"` 1.16 +do 1.17 + device=`echo $line | cut -d'|' -f1` 1.18 + total=`echo $line | cut -d'|' -f2` 1.19 + occupied=`echo $line | cut -d'|' -f3` 1.20 + free=`echo $line | cut -d'|' -f4` 1.21 + ratio=`echo $line | cut -d'|' -f5` 1.22 + mount=`echo $line | cut -d'|' -f6` 1.23 + MAIN_DIALOG=$MAIN_DIALOG" 1.24 + <item>$device|$mount|$total|$occupied|$ratio|$free</item>" 1.25 +done 1.26 +IFS=$I 1.27 +MAIN_DIALOG=$MAIN_DIALOG' 1.28 + </tree> 1.29 + <button ok></button> 1.30 + </vbox> 1.31 +</window> 1.32 +' 1.33 +export MAIN_DIALOG 1.34 + 1.35 +gtkdialog -p MAIN_DIALOG 1.36 + 1.37 +