 This video is part of a series be sure to check out the link in the description to the full playlist and today We're gonna be playing around with the cat and echo command a little bit as echo is a command to echo text and cat short for concatenate Many times it's used to display the contents of file for an example. I have a file called file dot txt I can say cat dot txt a cat sorry cat file dot txt hit enter and we display the contents of that file on there I also have a file called File to dot txt, which just says this is a file to I can also put this together and say file dot txt And then file to dot txt and you can see that it displays the file Dot txt and then the file to dot txt but let's say I want to echo out some Information and put that before the command before the output of that file so like echo. This is a New line I can say that and then obviously I can go cat and put a new command file dot txt and It looks like I did it, but we did it in two separate commands And if we want to output both all of this to one file We would have to append multiple times. Let's just shorten it up a little bit and we can do that by piping information into cat So as I said before I can file or you can cat two files But what I can also do is cat concatenate the information from the output of another file So I'm going to say echo this is a new line And I'm gonna pipe that into cat and then I'm going to put this dash right here Now usually a dash like that by itself without any other arguments or anything Tends the count stand for taking the standard input. I'm sorry It's taking the standard output of a file and using as input right there So if I hit enter now, you can see that it has now taken my echo command and put it right there at the beginning of that Now I can also put it after and I can put it between files I can see file dot file two dot txt so you can see that even though I'm echoing first We're not displaying that information yet We're putting in to cat and we're putting the output of echo here in the place of this little dash here So we now have the output of file one The output of our echo command and the output of file two all concatenated together And of course this can go in another order. We can say file two first then dash and We can also put the dash at the end In whatever order we want and at that point we can pipe all this into a new Fire not pipe but redirect it all into a new txt file I can cat new dot txt and there you go We have the output from all three of these different locations. I thank you for watching I hope you found this useful if you did be sure to like and subscribe and share and comment on this video And if you enjoy my videos overall think about becoming a supporter over at patreon.com Ford slash Melix 1000 there should be a link in the description even a dollar a month would be much appreciated Thank you for watching, and I hope that you have a great day