Pipes, Grep, Sort Commands: Linux Tutorial 9
HTML-код
- Опубликовано: 31 янв 2013
- www.guru99.com/linux-pipe-grep... 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 symbol is '|'
What is grep in Linux?
If you want to search a particular information the postal code from a text file you can use grep command on command line.
Syntax - grep search_string
What is sort command in Linux?
This command helps in sorting out the contents of a file alphabetically.
Syntax - sort Filename
Like, share and subscribe our channel for more videos.
Watch more videos on our RUclips channel at / @guru99com
READ this as a book on Amazon by viewing at amzn.to/2gZGjbE
Visit our website for more! www.guru99.com
Read our blogs in www.guru99.com/blog/
FACEBOOK! Would you prefer to watch more about us? Like our page for more / guru99com
TWITTER! Tweet for us on Twitter with #guru99 and follow us on / guru99com
LinkedIn! Follow us here / guru99
THANKS! We appreciate you reading this and hope you have a wonderful day!
Sincerely,
Guru99
Check out COMPLETE LinuxTutorials: ruclips.net/p/PLckPQEKYlbxebubMWdjcGR7K_ukm35ZjN
OMG so helpful. My professor could not even come close to how you taught this. WOW. THANKS!
Very clear and simple. I like the your style in explaining the subject.
Thank You! I was so confused by the "pipe" command until now
Thank you! Very concise, with just the necessary information. But please turn the music down.
Hello Guru, it's amazing tutorial. Thanks
Thanks a bunch!!!! Was having trouble using multiple commands with pipelines specifically: cat fruits | grep -v a | sort -r
This is really easy and informative lecturette. Thank you Guru
Really amazing and short video.
Very good.Keep up such a simple explanations.You just owned subscriber and like :)
very expressive lecture with details .. loved it...
Thanks for clear explanation
According to Kernigan the principle advantage of piping is that you don't end up with large intermediate files between commands. Each result is piped into the next command immediately for example the each entry in a directory from using ls (list) can be piped to another command immediately without having to wait for the whole directory inquiry to complete or be stored to file to input to the next command.
Thanks a lot ! Easy and simple!
Amazing i love it !!
Crystal clear ❤️ explanation
I needed to learn about grep, I came back for the music
@@sbamba3027 No offense.. they are from Elon musk family.. 😂😂😂😂😂
HUGE THANK YOU!!!
Thank you for sharing ! :D
A very clear and well-presented lesson
Great Videos!!
Super bro nice explanation
very clear, thx :)
very informative video :)
Thank you so much,🙏🙏🙏👌👌👌👌
Your tutorial is good but please remove the music which is not letting me to put concentration on the tutorial, Tnx
Thanks so much
AWESOME BACKGROUND MUSIC
hahahaha right!!
To be exact, the -i is for "--ignore-case: Ignore case distinctions in both the PATTERN and the input files."
nice explanation
good explanation
Thank you.
the grep command can display the results too without the cat command
Thanks
Learning :)
Hi, does anyone know a detailed explanation online for the use of pipes in Linux? :)
"use of pipes in Linux" search it on Google and you'll find detail explanation.
Can u plz explain how to use find
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
What is function of grep -v a i cant understand its lists a name strings or all one
ply do video its very important. i have to request so i want to how to installing samba and installing with linux
thank you...
I need help,
I want to sort in bash file,
Example....
a="10"
b="100"
C="1000"
I want to sort this
$a $b $c
How to sort ?? Please tell me!
Why use the cat with grep? Couldn't you just grep the file. grep "Avocado" /fruits
+ronin2167
I am so new to Linux you mustn't take what I say as gospel, ronin2167, but I tried your method and couldn't get it to work , but that is not because you can't find the "Avocado" without the cat command.
The syntax you've used for grep's search object is incorrect - you would need inverted commas rather than a forward-slash, ie.
grep "Avocado" "fruits"
rather than
grep "Avocado" /fruits
I don't know why that is.
You are right, though, that the "Avocado" can be grepped without cat, but in this video Guru99 uses them together mainly to illustrate how pipes work.
I hope that answers your question, given that questions beginning with "why" never fully bear fruit !*
* cf. Kurt Vonnegut's aliens in "Slaughterhouse Five"
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
You don't pipe cat in to less or grep if you have only one file.
1:29
The "pg" command is not exist in Terminal
Old video pg like so many other command have been changed by more powerful command like less
occult music
omg just say GREP lol
Nice video, but you can just say "grep" instead of "the G-R-E-P command" every time...
The music is extremely bothersome.
turn off the stupid background music
tholdesha
are u paying for him?
That's very calming idiot. I have learned a lot I can't bear any word against the guru99.
please ye gana hata lo video se dikkat hoti hai bhot