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?

0

3 Answers 3

2

Trivial

cat file1 file2 file3 ... filen | more
3
  • 2
    partmaps.org/era/unix/award.html Useless use of cat award!
    – Rob
    Apr 10, 2012 at 12:36
  • 1
    @Rob Really? cat concatenates the files. What else do you suggest?
    – slhck
    Apr 10, 2012 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, 2012 at 15:05
1
cat file1 file2 | more

This is what you are looking for.

2
  • partmaps.org/era/unix/award.html Useless use of cat award!
    – Rob
    Apr 10, 2012 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, 2012 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.

3
  • 1
    That is not his question. Apr 10, 2012 at 12:45
  • +1 for suggesting the right tool for the job. Especially when the tool is as widespread as less.
    – l0b0
    Apr 10, 2012 at 12:49
  • Missed the "Don't want to display filename" in the question. Not sure how.
    – Rob
    Apr 10, 2012 at 14:42

You must log in to answer this question.