Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Development Tools Console Foundations Getting Started with the Console Reading Files

Jim is talking about concatenating with cat at 5:58 and this is where I lose him for a moment. What is he trying to say?

I get that you can print two different files together with cat, that I understand. But right before he shows us this, he shows us just one file, and I don't understand the point he is trying to make.

4 Answers

Marcin Baranczyk
Marcin Baranczyk
13,237 Points

Hi,

He is trying to say that cat allows you not only to print two files at the same time, but also to join them . I think he will show later hot to do it, but for example you can do it like this cat file1.txt file2.txt > files1&2.txt It will crate new file with content of file1.txt and file2.txt

I think that was Jim's point.

Cheers.

Jonathan Chua
Jonathan Chua
4,136 Points

Jim is showing us different ways to read a file in the console. Although the true purpose of the program "cat" is to combine two files together, it can also be used to print the contents of a single file in the command prompt. This is a quick way to view a file without the interactive functions that the programs "less" or "more" provide.

Damien Watson
Damien Watson
27,419 Points

Hey Kelly,

When he shows the one file "hello.txt" he is just trying to show the difference between 'less' and 'cat'. The difference being on a single file is that 'cat' just shows the full content of the file and returns you to the command line.

Hope this helps explain what he's doing. Cheers.

helmi al kindy
helmi al kindy
1,371 Points

Hi there, you can cross check whatever the instructors are saying with the video transcript. Video transcripts are below the videos just scroll down.