#!/bin/sh # BatteryTimer.sh # 2008-02-11 # Chieh Cheng # http://www.CynosureX.com/ # GNU General Public License (GPL), Version 2, June 1991 logFile="BatteryTimer.txt" start=`date` echo "${start}" > "${logFile}" echo "${start}" while [ 1 ] do str=`date` printf "\r${str}" >> "${logFile}" printf "\r${str}" sleep 1 done