Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question

migrated from stackoverflow.com Apr 10 '12 at 12:01

This question came from our site for professional and enthusiast programmers.

add comment

3 Answers 3

Trivial

cat file1 file2 file3 ... filen | more
share|improve this answer
2  
partmaps.org/era/unix/award.html Useless use of cat award! –  Rob Apr 10 '12 at 12:36
    
@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
add comment
cat file1 file2 | more

This is what you are looking for.

share|improve this answer
    
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
add comment

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.

share|improve this answer
1  
That is not his question. –  Daniel Andersson Apr 10 '12 at 12:45
    
+1 for suggesting the right tool for the job. Especially when the tool is as widespread as less. –  l0b0 Apr 10 '12 at 12:49
    
Missed the "Don't want to display filename" in the question. Not sure how. –  Rob Apr 10 '12 at 14:42
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.