Pipes, Grep, Sort Commands: Linux Tutorial 9



http://www.guru99.com/linux-pipe-grep.html This tutorial explains pipes, grep and sort commands with examples.

Click on the time points below to view different sections!

0:07 What are Pipes in Linux?
1:12 ‘pg’ and ‘More’ commands with example
1:38 The ‘grep’ Command with example
3:05 The ‘sort’ Command with example
5:23 Summary

What is a Pipe in Linux?
The Pipe is a command in Linux that lets you use two or more commands such that output of one command serves as input to the next. The…

25 thoughts on “Pipes, Grep, Sort Commands: Linux Tutorial 9

  1. error and fruits are the random files. I am trying to redirect the lines which do not contain small 'a' and want to sort if in reverse order. However, the command is not working

    NOT WORKING – cat fruits | grep -v a > error | sort -r error
    WORKING – cat fruits | grep -v a | sort -r > error

    WHY ?? @GURU99

  2. The cat command in this tutorial is initially used to see the contents of the fruits file and the subsequent change to it's output as it passes through grep via a pipe. grep "Avocado" fruits or "fruits" is the syntax if you are in the same directory as the fruits file otherwise it is grep "Avocado" "/path/to/fruits file" if you are not.

  3. very good except the very annoying loud background music. I cant see the point in music while trying to learn something. maybe turn it down to a minimum. otherwise thumbs up for all the linux videos

Leave a Comment

Your email address will not be published. Required fields are marked *