Learn how to retrieve data from a file and use it as input to a command.
- [Narrator] In this movie, … we'll learn how to use a file as input to a command. … It's much less common to direct input to a command … than to direct the output from it. … It's not because file input is uncommon. … It's because it's so common that most commands take a file … as an argument, but for commands that don't, … we can direct input to them anyways. … And we can do that by using the less than operator. … Exactly the same as we saw with output, … but pointing in the other direction. … So I have the command and then the less than operator … and then the file that I want to send as input. … Of course, this has to be a file … that actually already exists … if I'm going to use it as input. … It may seem odd at first … to have the input come after the command, … but Unix wants it this way. … Unix wants the command to be the first thing on the line, … and then the input operator is that less than sign. … If it was on the other side, … it would be using the output operator, … which tells Unix to do something completely different. …
Skill Level Intermediate
1. Introduction to Unix
2. Files and Directories
3. Ownership and Permissions
4. Commands and Processes
5. Directing Input and Output
6. Configure Your Working Environment
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.