1834142 Members
2246 Online
110064 Solutions
New Discussion

tail question

 
SOLVED
Go to solution
Michael Murphy_2
Frequent Advisor

tail question

anyone know how to tail a range of files - like "tail *.out"? I try to run this and it only seems to get one file...
4 REPLIES 4
Rodney Hills
Honored Contributor
Solution

Re: tail question

How about-

echo *.out | xargs -n1 tail

HTH

-- Rod Hills
There be dragons...
Steven E. Protter
Exalted Contributor

Re: tail question

for FILE in filename*
do
tail $FILE
done

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
DIPAK KUMAR ROY
Frequent Advisor

Re: tail question

Write a script like...

for i in file1 file2 ....
do
tail $i
done


OR

for i in `ls file*`
do
tail $i
done


Thanks

Sathish C
Frequent Advisor

Re: tail question

you may try this

ls *.out | while read a
do
echo tailing $a
tail $a
done


Sathish C
Some cause happiness wherever they go; others, whenever they go