#!/bin/bash # BlueJ Compile Log Summary # Default name for compile log file. LOG=$HOME/.bluej/bluej-compilelog.txt # Did the user provide a filename on the command line? if (( $# > 0 )) then LOG=$1 fi # If it exists then gather the stats and show them. if [ -e $LOG ] then echo Compile Summary for $LOG DATETIME=`head -n1 $LOG | cut -f 1,2 -d ' '` echo First entry on $DATETIME echo Compile Errors: grep "Compile Error" $LOG | wc -l echo Total Compiles: grep "Compile Started" $LOG | wc -l else echo "Couldn't find:" $LOG echo "Tip: You can supply an alternate filename on the command line." fi