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 YouTube channel at
READ this as a book on Amazon by viewing at
Visit our website for more! www.guru99.com
Read our blogs in
FACEBOOK! Would you prefer to watch more about us? Like our page for more
TWITTER! Tweet for us on Twitter with #guru99 and follow us on
LinkedIn! Follow us here
THANKS! We appreciate you reading this and hope you have a wonderful day!
Sincerely,
Guru99
Nguồn: https://codeigniterbrasil.com
Xem thêm bài viết khác: https://codeigniterbrasil.com/lap-trinh-linux/
Xem thêm Bài Viết:
- Hướng dẫn sử dụng hệ điều hành linux siêu tốc – bài 25 Xem cấu hình hệ thống (cpu, ram, hdd)
- Linux cat command summary with examples
- Cài nhiều hệ điều hành Windows và Linux trên một máy tính
- Hướng dẫn tạo USB Boot DLC2019 (NTFS / UEFI) Trên windows 10 ( sử dụng USB 32 GB )
- Hướng dẫn gỡ bỏ Ubuntu sạch sẽ nhất bằng lệnh trên Windows theo chuẩn UEFI-GPT
Guru99
April 21, 2020Check out COMPLETE LinuxTutorials: https://www.youtube.com/playlist?list=PLckPQEKYlbxebubMWdjcGR7K_ukm35ZjN
MES refael
April 21, 20201:29
The "pg" command is not exist in Terminal
Vivek Subramanian
April 21, 2020Nice video, but you can just say "grep" instead of "the G-R-E-P command" every time…
Faz
April 21, 2020G r e p? 😂
Ma Dee
April 21, 2020HUGE THANK YOU!!!
raytry69
April 21, 2020To be exact, the -i is for "–ignore-case: Ignore case distinctions in both the PATTERN and the input files."
Paul Morrey
April 21, 2020Thanks
shraddha chavan
April 21, 2020Can u plz explain how to use find
Jazzy G
April 21, 2020Thanks a bunch!!!! Was having trouble using multiple commands with pipelines specifically: cat fruits | grep -v a | sort -r
VariableStromtarife
April 21, 2020Useless use of cat
Raj y
April 21, 2020Super bro nice explanation
johnNYgoesLA
April 21, 2020I needed to learn about grep, I came back for the music <3
krishna shakya
April 21, 2020Amazing i love it !!
ruell black
April 21, 2020The music is extremely bothersome.
ahmed alali
April 21, 2020Really amazing and short video.
Vipul Beriwal
April 21, 2020error 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
My Garden
April 21, 2020Your tutorial is good but please remove the music which is not letting me to put concentration on the tutorial, Tnx
Bodyskillz2011
April 21, 2020the grep command can display the results too without the cat command
shizyninjarocks
April 21, 2020AWESOME BACKGROUND MUSIC
Patrick Williams
April 21, 2020The 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.
cornlow
April 21, 2020Very clear and simple. I like the your style in explaining the subject.
footb 4all
April 21, 2020Very good.Keep up such a simple explanations.You just owned subscriber and like 🙂
Rene Thomas
April 21, 2020A very clear and well-presented lesson
ronin2167
April 21, 2020Why use the cat with grep? Couldn't you just grep the file. grep "Avocado" /fruits
Parminder singh
April 21, 2020occult music
Amir Sepasi
April 21, 2020turn off the stupid background music
Daniela Barrientos
April 21, 2020Hi, does anyone know a detailed explanation online for the use of pipes in Linux? 🙂
Trent Armstrong
April 21, 2020Thank you! Very concise, with just the necessary information. But please turn the music down.
MJ C.
April 21, 2020Hello Guru, it's amazing tutorial. Thanks
Channel Ten two
April 21, 2020very 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
Quarker
April 21, 2020omg just say GREP lol