- [Narrator] Hi, and welcome to
the next video of section four,
Printing the nth Word or Column in a File or Line.
In the previous video, we've learned
how to merge multiple files as columns.
In this video, we'll learn how to print multiple
words or column in a file or line.
We may have a file having a number of columns,
and only a few will actually be useful.
For example, in a list of students
in an order of the schools, we want to get,
for instance, the fourth highest scorer.
In this section, we will see how to do this.
The most widely used method is
to use alt for doing this task.
It can also be done using cut.
To print the fifth column, use the following command.
We can also print multiple columns
and insert our custom string in between columns.
For example, to print the permission and file name
of each file in a current directory,
use the following set of commands.
Awesome, we've successfully learned
about printing the nth word or column in a file or line.
In the next video, we'll learn
about printing text between line numbers or patterns.