Multiple tail programme

Kenneth Herron kherron at ms.uky.edu
Wed May 1 12:32:07 AEST 1991


colemanm at cheops.qld.tne.oz.au (Mark Coleman) writes:

>Sorry if this is a FAQ but I'm looking for a version of 'tail' that allows me
>display the updates to files from multiple files.

>e.g.  $ tail -f <file1> <file2> <file3>

#!/bin/sh
# mtail -- tail -f on multiple files at once

for file in $*
do
	tail -f $file &
done
exit 0

--------
The ability to specify arguments to the tail calls is left as an
excercise for the reader.
-- 
Kenneth Herron                                            kherron at ms.uky.edu
University of Kentucky                                        (606) 257-2975
Department of Mathematics 
             "P.S.:  Please excuse the lateness of my reply." -- Ringo Starr



More information about the Comp.unix.admin mailing list