0

While displaying more than one file with more, I don't want to display filenames along with the contents.

I only need to display the contents of the file. Is there any way to escape the filenames?

slhck
  • 223,558
  • 70
  • 607
  • 592

3 Answers3

2

Trivial

cat file1 file2 file3 ... filen | more
Ex Umbris
  • 1,169
  • 1
  • 8
  • 22
  • 2
    http://partmaps.org/era/unix/award.html Useless use of cat award! – Rob Apr 10 '12 at 12:36
  • 1
    @Rob Really? `cat` concatenates the files. What else do you suggest? – slhck Apr 10 '12 at 13:48
  • I don't know how I missed the "Don't display filenames". I think I opened it in a new tab, forgot about it, came back to it and skimmed. – Rob Apr 10 '12 at 15:05
1
cat file1 file2 | more

This is what you are looking for.

slhck
  • 223,558
  • 70
  • 607
  • 592
nims
  • 246
  • 1
  • 3
  • http://partmaps.org/era/unix/award.html Useless use of cat award! – Rob Apr 10 '12 at 12:36
  • I don't know how I missed the "Don't display filenames". I think I opened it in a new tab, forgot about it, came back to it and skimmed. – Rob Apr 10 '12 at 15:05
-1

more "filename with space" "filenames" filename\ also\ with\ spaces and.one.more.file is all you need, but you might consider using less instead of more. They say less is more.

Rob
  • 2,342
  • 2
  • 25
  • 33