Thanks for Phil Baldwin, Steve Cooper, Olle Eriksson, Derek Gatherer,
Jose Reyes and Lucio Chiappetti
I used trhe following script, put it in a file and executed the file.
It gave me exactly what I wanted
Mohamed
from Phill:
could always do (in the directory with the logfiles)
for i in backup*.log
do
echo "$i" >> newfile
tail $i >> newfile
done
Mohamed Ahmed
----- Original Message -----
From: "Mohamed K. Ahmed" <mkahmed_at_vsc.teksystems.com>
Date: Monday, December 1, 2003 9:31 am
Subject: viewing files
> Dear Managers,
>
> I have about 50 files that have the same name except for some
> numbers
> as: backup_031201.log (the numbers change according to the date).
> I want to just look at the last 10 lines of each file. I don't
> want to
> issue the same command 50 times, I just want to give it one
> command and
> get what I want.
> I know that tail views the last 10 lines of a file, but when I
> issue
> the command # tail backup_03*.log or # tail backup_03????.log,
> it
> just gives me that last/new file available
>
> Any help???
> The system is ES40, 4 CPU, 4 GB mem, running Tru64 UNIX V 5.1B
>
> Mohamed
>
>
Received on Mon Dec 01 2003 - 14:59:57 NZDT