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

Комментарии • 61

  • @guru99com
    @guru99com  5 лет назад +4

    Check out COMPLETE LinuxTutorials: ruclips.net/p/PLckPQEKYlbxebubMWdjcGR7K_ukm35ZjN

  • @dvgdzga
    @dvgdzga Год назад +1

    OMG so helpful. My professor could not even come close to how you taught this. WOW. THANKS!

  • @cornlow
    @cornlow 8 лет назад +1

    Very clear and simple. I like the your style in explaining the subject.

  • @QueerBiNatureNYC
    @QueerBiNatureNYC 2 года назад

    Thank You! I was so confused by the "pipe" command until now

  • @trentarmstrong5000
    @trentarmstrong5000 10 лет назад +13

    Thank you! Very concise, with just the necessary information. But please turn the music down.

  • @mjc.5965
    @mjc.5965 10 лет назад +5

    Hello Guru, it's amazing tutorial. Thanks

  • @jazzyg7432
    @jazzyg7432 5 лет назад

    Thanks a bunch!!!! Was having trouble using multiple commands with pipelines specifically: cat fruits | grep -v a | sort -r

  • @abhijithsubash6160
    @abhijithsubash6160 3 года назад

    This is really easy and informative lecturette. Thank you Guru

  • @ahmedalali3528
    @ahmedalali3528 6 лет назад +1

    Really amazing and short video.

  • @footb4all565
    @footb4all565 8 лет назад +1

    Very good.Keep up such a simple explanations.You just owned subscriber and like :)

  • @poonamsaraogi1378
    @poonamsaraogi1378 3 года назад

    very expressive lecture with details .. loved it...

  • @tweakstuffz4423
    @tweakstuffz4423 Год назад

    Thanks for clear explanation

  • @TheGodlessGuitarist
    @TheGodlessGuitarist 2 года назад +1

    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.

  • @RaulSouza12w
    @RaulSouza12w 2 года назад

    Thanks a lot ! Easy and simple!

  • @krishnashakya2858
    @krishnashakya2858 6 лет назад +1

    Amazing i love it !!

  • @muralibunny8936
    @muralibunny8936 2 года назад

    Crystal clear ❤️ explanation

  • @johnNYgoesLA
    @johnNYgoesLA 6 лет назад

    I needed to learn about grep, I came back for the music

    • @mandarchincholkar7250
      @mandarchincholkar7250 4 года назад

      @@sbamba3027 No offense.. they are from Elon musk family.. 😂😂😂😂😂

  • @madinaakmal6284
    @madinaakmal6284 4 года назад

    HUGE THANK YOU!!!

  • @asgm1382
    @asgm1382 2 года назад

    Thank you for sharing ! :D

  • @renethomas5757
    @renethomas5757 8 лет назад

    A very clear and well-presented lesson

  • @annexgroup6878
    @annexgroup6878 2 года назад

    Great Videos!!

  • @raju7135
    @raju7135 6 лет назад +1

    Super bro nice explanation

  • @andywei5518
    @andywei5518 4 года назад

    very clear, thx :)

  • @kunalsoni7681
    @kunalsoni7681 3 года назад

    very informative video :)

  • @komalinshan9243
    @komalinshan9243 3 года назад

    Thank you so much,🙏🙏🙏👌👌👌👌

  • @MyGardenForYou
    @MyGardenForYou 7 лет назад +29

    Your tutorial is good but please remove the music which is not letting me to put concentration on the tutorial, Tnx

  • @saurabhgupta1595
    @saurabhgupta1595 3 года назад

    Thanks so much

  • @shizyninjarocks
    @shizyninjarocks 7 лет назад +9

    AWESOME BACKGROUND MUSIC

  • @raytry69
    @raytry69 4 года назад

    To be exact, the -i is for "--ignore-case: Ignore case distinctions in both the PATTERN and the input files."

  • @lakshmim02
    @lakshmim02 3 года назад

    nice explanation

  • @AK-gd6pe
    @AK-gd6pe 3 года назад

    good explanation

  • @nitinsai2563
    @nitinsai2563 3 года назад

    Thank you.

  • @Bodyskillz2011
    @Bodyskillz2011 7 лет назад

    the grep command can display the results too without the cat command

  • @paulmorrey733
    @paulmorrey733 5 лет назад

    Thanks

  • @brillrayel1103
    @brillrayel1103 2 года назад

    Learning :)

  • @DanielaBarrientos
    @DanielaBarrientos 9 лет назад +2

    Hi, does anyone know a detailed explanation online for the use of pipes in Linux? :)

    • @OOO-uo9lx
      @OOO-uo9lx 3 года назад

      "use of pipes in Linux" search it on Google and you'll find detail explanation.

  • @shraddhachavan1093
    @shraddhachavan1093 5 лет назад +1

    Can u plz explain how to use find

  • @vipulberiwal2919
    @vipulberiwal2919 7 лет назад

    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

  • @nasroseblogs4782
    @nasroseblogs4782 Год назад

    What is function of grep -v a i cant understand its lists a name strings or all one

  • @classcyber7569
    @classcyber7569 3 года назад

    ply do video its very important. i have to request so i want to how to installing samba and installing with linux
    thank you...

  • @salexkorsan8790
    @salexkorsan8790 2 года назад

    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!

  • @ronin2167
    @ronin2167 8 лет назад

    Why use the cat with grep? Couldn't you just grep the file. grep "Avocado" /fruits

    • @renethomas5757
      @renethomas5757 8 лет назад

      +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"

  • @20122017
    @20122017 10 лет назад +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

  • @TheJoseppa
    @TheJoseppa 2 года назад

    You don't pipe cat in to less or grep if you have only one file.

  • @MrRefael33
    @MrRefael33 4 года назад

    1:29
    The "pg" command is not exist in Terminal

    • @xrafter
      @xrafter 3 года назад

      Old video pg like so many other command have been changed by more powerful command like less

  • @punkpam100
    @punkpam100 8 лет назад +7

    occult music

  • @Quarker
    @Quarker 11 лет назад +17

    omg just say GREP lol

  • @vman049
    @vman049 4 года назад

    Nice video, but you can just say "grep" instead of "the G-R-E-P command" every time...

  • @blackrue
    @blackrue 6 лет назад

    The music is extremely bothersome.

  • @AmirSepasi
    @AmirSepasi 8 лет назад +27

    turn off the stupid background music

    • @kavirajks9046
      @kavirajks9046 6 лет назад

      tholdesha

    • @ziyamohammed635
      @ziyamohammed635 5 лет назад

      are u paying for him?

    • @AliAkbar-vo3te
      @AliAkbar-vo3te 5 лет назад

      That's very calming idiot. I have learned a lot I can't bear any word against the guru99.

  • @Aakashhoney278
    @Aakashhoney278 Год назад

    please ye gana hata lo video se dikkat hoti hai bhot