Directing output to a file


show more Directing output to a file provides you with in-depth training on IT. Taught by Kevin Skoglund as part of the Unix for Mac OS X Users show less
please wait ...

Directing output to a file

In the last movie I told you that the standard output in Unix is going to be to the screen and we can see that. Notice that I'm inside my user directory, inside Unix files and I'm just going to type sort and fruit.txt. This is the command we did before, just sorts this list of fruit. Now I didn't actually change the file itself, all right. Sort just took it and the output of that command was to my screen. Not back to that file. Just simply output it to the screen and that's what we're seeing there. What we want do now is change the output. We want it to go somewhere else.

The way we do that as we say sort fruit.txt and then after that we use the greater than sign or an arrow pointing to the right. Essentially that's the way we're directing the output and we want to direct it to a filename and the file doesn't have to exist already. We're going to create a new file, sorted_fruit.txt. So that's it. That's all there there is to it. We simply say our ins...

Directing output to a file
Video duration: 4m 13s 6h 35m Beginner

Viewers:

Directing output to a file provides you with in-depth training on IT. Taught by Kevin Skoglund as part of the Unix for Mac OS X Users

Subject:
IT
Software:
Mac OS X Unix
Author:
please wait ...