catting contents of a file and seeing the file names

From: Brian E. Lavender (brian@brie.com)
Date: Mon Aug 02 1999 - 10:27:32 PDT


sometimes I want to look at the contents of numerous text files. If I do
$ cat *.txt | less
it will cat all the files in that directory, but I don't know exactly
which file I am looking at. Is there a way to cat a series of files and
have it so you see the file name at the beginning of each file shown?

file01.txt
This
is file one text

file02.txt
This is file
two
which has different text

file03.txt
file
three
is the next in the list

-- 
Brian Lavender
http://www.brie.com/brian/



This archive was generated by hypermail 2b29 : Fri Feb 25 2000 - 14:29:06 PST