Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Sometimes you need to use the output from a command more than once. To accomplish this, you can redirect the output of commands using some neat command-line tricks. Let’s look at the following commands:
| sort | Sorts the output of a command or file |
| wc | Provides a word or line count |
| cat | Displays the contents of a file |
| uniq | Lists all the unique lines in a file or command output |
| echo | Outputs or displays a string |
| cut | Divides a string or output |