slitaz-dev-tools annotate 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
rev   line source
postmaster@96 1 #!/bin/sh
postmaster@96 2
postmaster@96 3 MAIN_DIALOG='
postmaster@96 4 <window title="edf" window_position="1" decorated="false" width-request="600">
postmaster@96 5 <vbox>
postmaster@96 6 <text use-markup="true"><label>"<b>Enhanced df</b>"</label></text>
postmaster@96 7 <text height-request="10"><label>""</label></text>
postmaster@96 8 <tree>
postmaster@96 9 <label>Device|Mount point|Total size|Occupied|Occ.ratio|Free</label>
postmaster@96 10 '
postmaster@96 11 I=$IFS; IFS=$'\n'
postmaster@96 12 for line in `df -h | tail -n +2 | grep ^/dev/ | sed -e "s/ \+/|/g"`
postmaster@96 13 do
postmaster@96 14 device=`echo $line | cut -d'|' -f1`
postmaster@96 15 total=`echo $line | cut -d'|' -f2`
postmaster@96 16 occupied=`echo $line | cut -d'|' -f3`
postmaster@96 17 free=`echo $line | cut -d'|' -f4`
postmaster@96 18 ratio=`echo $line | cut -d'|' -f5`
postmaster@96 19 mount=`echo $line | cut -d'|' -f6`
postmaster@96 20 MAIN_DIALOG=$MAIN_DIALOG"
postmaster@96 21 <item>$device|$mount|$total|$occupied|$ratio|$free</item>"
postmaster@96 22 done
postmaster@96 23 IFS=$I
postmaster@96 24 MAIN_DIALOG=$MAIN_DIALOG'
postmaster@96 25 </tree>
postmaster@96 26 <button ok></button>
postmaster@96 27 </vbox>
postmaster@96 28 </window>
postmaster@96 29 '
postmaster@96 30 export MAIN_DIALOG
postmaster@96 31
postmaster@96 32 gtkdialog -p MAIN_DIALOG
postmaster@96 33
postmaster@96 34