#!/bin/bash # output summary of most recent ESP logs generated by summarizeESP # First argument is the number of most recent log summaries to output # if ommitted, output the summary of only the most ESP log summary. # #set -x : ${logBase:=/LRAUV/Logs} recent=${1--1} for log in `ls -r $logBase/*/ESP.log | head $recent`; do summary=${log/.log}.sum cat $summary done