stat_bar() { let multip="($_cgi_width-230-50)/100"; percent=$1; let bar="percent*multip"; let grey="(100-percent)*multip" echo '

  '$percent' %

' } sec_begin '$(lang de:"Eingehängte Partitionen" en:"Mounted partitions")' MPOINTS=$(mount|grep -E "^/dev/sd|^/dev/mapper/|^.* on .* type cifs"|cut -d" " -f3) if [ "$MPOINTS" ]; then for path in $MPOINTS; do dfrow=$(df -h | sed -n ':a;$!N;$!ba;s/\n */ /g;p' | grep " $path$") total="$( echo $dfrow | awk '{print $2}' | sed 's/k/ K/;s/M/ M/;s/G/ G/')" used="$( echo $dfrow | awk '{print $3}' | sed 's/k/ K/;s/M/ M/;s/G/ G/')" percent="$(echo $dfrow | awk '{print $5}' | sed 's/[^0-9]//')" device="$(echo $dfrow | awk '{print $1}')" echo "

$path ($device):
"$used"B $(lang de:"von" en:"of") "$total"B $(lang de:"belegt" en:"used")

" stat_bar $percent done else echo "
$(lang de:"keine gefunden" en:"none found")
" fi sec_end