Codeigniterbrasil - Chuyên trang tin tức công nghệ hàng đầu
  • Home
  • Công Nghệ
  • Lập Trình Linux
  • Lập Trình PHP
  • Điện Thoại
No Result
View All Result
  • Home
  • Công Nghệ
  • Lập Trình Linux
  • Lập Trình PHP
  • Điện Thoại
No Result
View All Result
Codeigniterbrasil - Chuyên trang tin tức công nghệ hàng đầu
No Result
View All Result

Linux/Mac Terminal Tutorial: The Grep Command – Search Files and Directories for Patterns of Text

admin by admin
April 16, 2020
in Lập Trình Linux
20
Linux/Mac Terminal Tutorial: The Grep Command – Search Files and Directories for Patterns of Text



In this Linux/Mac terminal tutorial, we will be learning how to use the grep command. The grep command allows us to search files and directories for patterns of text. You can also pipe the output of one command into grep to get certain matches. It’s extremely useful once you learn the ins and outs. Let’s get started…

The code from this video can be found at:

Regular Expressions Tutorial:
Regular Expressions Tutorial (Python):

✅ Support My Channel Through Patreon:

✅ Become a Channel Member:

✅ One-Time Contribution Through PayPal:

✅ Cryptocurrency Donations:
Bitcoin Wallet – 3MPH8oY2EAgbLVy7RBMinwcBntggi7qeG3
Ethereum Wallet – 0x151649418616068fB46C3598083817101d3bCD33
Litecoin Wallet – MPvEBY5fxGkmPQgocfJbxP6EmTo5UUXMot

✅ Corey’s Public Amazon Wishlist

✅ Equipment I Use and Books I Recommend:

▶️ You Can Find Me On:
My Website –
My Second Channel –
Facebook –
Twitter –
Instagram –

#Linux #Mac

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
Previous Post

Phòng Áp lực âm là gì? - Hiểu rõ trong 5 phút

Next Post

Chinh phục kỳ thi vào 10 năm 2020 | Môn Toán | Phương pháp giải phương trình bậc hai

Next Post
Chinh phục kỳ thi vào 10 năm 2020 | Môn Toán | Phương pháp giải phương trình bậc hai

Chinh phục kỳ thi vào 10 năm 2020 | Môn Toán | Phương pháp giải phương trình bậc hai

Comments 20

  1. PraiseHymnProject says:
    2 years ago

    Such a useful and straight forward video! Awesome!

    Reply
  2. Matt Dooley says:
    2 years ago

    I have this issue, can anyone help me? So, I sam searching for the word "Christmas" in a text file by doing the following:
    grep "Christmas" filename.txt
    And I got back the entire text of the file, printed out entirely in terminal! Unlike the video above, where simply got the number of the lines where the word appears, which is what I want for "Christmas" in my text file. What am I doing wrong?

    Reply
  3. Brendan Metcalfe says:
    2 years ago

    Thanks!

    Reply
  4. Mathew Boyd says:
    2 years ago

    I am very new to bash and was wondering how you go back to the previous command once you run it. For Ex 1:50

    Reply
  5. ramkiran55 devireddy says:
    2 years ago

    grep -i "John Willims" names.txt
    How can I pass a string variable instead of "John Williams"

    Reply
  6. Maxwell Wibert says:
    2 years ago

    Unfortunately, it looks like homebrew has deprecated the –with-default-names option since the making of this video. Now in order to set gnugrep as the default grep you have to do some strange path manipulation in your bashrc/zshrc file. I don't fully understand how to do this, and was wondering if you might be able to explain the new method. I think you have to add a path to your gnubin in your rc file?

    Reply
  7. Sana Ali says:
    2 years ago

    Thank you for this very amazing and concise tutorial. You have summarized everything perfectly! Does . and ./* mean the same thing if I do grep r?

    Reply
  8. insanecbrotha says:
    2 years ago

    lol, the BRE for the phone numbers would be: grep "([[:digit:]]{3}-){2}[[:digit:]]{4}" names.txt

    Could be worse though: http://ergoemacs.org/misc/emacs_lisp_toothpick_syndrome.html

    Reply
  9. camelCase says:
    2 years ago

    Which font do you use in the terminal?

    Reply
  10. Vineet gupta says:
    2 years ago

    Could you please make video on DS by python

    Reply
  11. Ian Hopper says:
    2 years ago

    Corey is simply the best.

    Reply
  12. MD Hossain says:
    2 years ago

    I like that this guy just gets straight to the point and wastes no time. I like this man already!

    Reply
  13. o says:
    2 years ago

    how grep "function" in php files that resides on remote server or localhost?

    Reply
  14. George Ford says:
    2 years ago

    FYI – the "–with-default-names" option has been removed. For Mac users who still want to use GNU grep as grep, see this helpful link: https://stackoverflow.com/questions/59232089/how-to-install-gnu-grep-on-mac-os

    Reply
  15. Mickaël Riga says:
    2 years ago

    Great video ! Great explanation. I like that it goes beyond the basic use. Thank you for sharing.

    Reply
  16. B R Pawan Kumar Iyengar says:
    2 years ago

    Great video … thank you

    Reply
  17. CrushOfSiel says:
    2 years ago

    So glad I looked at this tutorial. I've known how to kind of use grep for a while. Some of these options are going to be super helpful to me in the near future. I should have looked in the man pages a long time ago!

    Reply
  18. Khuen Lau says:
    2 years ago

    Thanks for creating this video, have been searching on how bash commands filter text files, can't find anything helpful, glad I searched it on Youtube.

    Reply
  19. mehmet rasim inceoglu says:
    2 years ago

    This was very informative. Thank you for the video.

    Reply
  20. Dielle says:
    2 years ago

    You should make an awk tutorial!

    Reply

Leave a Reply Cancel reply

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

Tin Hot

Đập hộp Z590 Vision G

Trên tay Gigabyte Z590 Vision G – Sẵn sàng cho người sáng tạo nội dung

May 15, 2021
Cách khắc phục lỗi mất biểu tượng loa trong Windows 10

Cách khắc phục lỗi mất biểu tượng loa trong Windows 10

October 21, 2020
Mẹo và Thủ thuật Máy tính Mọi người Nên Biết

Mẹo và Thủ thuật Máy tính Mọi người Nên Biết

September 25, 2020
Cách nhập ảnh từ iPhone sang Mac

Cách nhập ảnh từ iPhone sang Mac

September 10, 2020
Test loa karaoke bluetooth Soundmax A-2120, có điều khiển từ xa | META.vn

Test loa karaoke bluetooth Soundmax A-2120, có điều khiển từ xa | META.vn

May 28, 2020
Review Bose Companion 50| Bộ loa vi tính cực "Xịn xò" đến từ Bose

Review Bose Companion 50| Bộ loa vi tính cực "Xịn xò" đến từ Bose

May 28, 2020
  • Liên Hệ
  • Chính Sách Bảo Mật

© 2022 JNews - Premium WordPress news & magazine theme by Jegtheme.

No Result
View All Result
  • Home
  • Công Nghệ
  • Lập Trình Linux
  • Lập Trình PHP
  • Điện Thoại

© 2022 JNews - Premium WordPress news & magazine theme by Jegtheme.