# ------------------------------------------------------------------------ # Echo the last 10 lines of the apache error log unless an # argument is given in which case it will show that many # lines # ------------------------------------------------------------------------ logFile='/path/to/error.log' if [ $# -gt 0 ] ; then if [ $1 = 'f' ] ; then tail -f $logFile else numlines=$1 tail -n $numlines $logFile fi else tail $logFile fi exit 0