#!/bin/sh #adjust this LOGFILE=/usr/lib/powerchute/powerchute.dat #usage is third field of the df output, last (second) line LINE=`cat $LOGFILE | tail -1` echo $LINE | awk 'BEGIN{FS=","}{ print $3"\n"$5"\n"$4"\n"$6/14.02*100 }'