Linux Commands Tutorial - sed basics

Поділитися
Вставка
  • Опубліковано 3 лис 2024

КОМЕНТАРІ • 38

  • @ErickPaquin
    @ErickPaquin 4 роки тому +13

    Great tutorial. But to clarify, the "-n" option is not for "negate". It simply will not print anything unless an explicit request to print is found. Different.

  • @ChrisCox-wv7oo
    @ChrisCox-wv7oo 2 місяці тому

    -r enables extended regular expressions. These included quantifiers like +, {}, and posix character classes like [[:alpha:]]
    Thanks for the tutorial!

  • @umersaeed6032
    @umersaeed6032 8 років тому +14

    id,name,description,participants
    1,"First Name", "First name description"," Seth, John, Frank"
    2,"Second Name", "Second Name Description", "Tom, Dick, Harry"
    3,"Third Name", "Third Name Description", "Frank, Dick, Seth"
    4,"Forth Name","Forth Name Description"," Seth, John, Frank"
    5,"Fifth Name","Fifth Name Description","Rank, Marry, Frank"
    6,"Sixth Name","Sixth Name Description","Tom, Harry, Frank"
    7,"Seventh Name","Seventh Name Description", "Seth, Marry, Dick, Harry"
    8,"Eighth Name","Eighth Name Description","Tom, Dick, Jones"
    9,"Ninth Name","Ninth Name Description"," Marry, John, Tom"

    • @johnwhite7700
      @johnwhite7700 4 роки тому +1

      id,name,description,participants
      1,"test1","description test 1","Frank,Tom,Dennis"
      2,"test2","description test 2","Julia,Frank,Tim"
      3,"test3","description test 3","Dennis,Jamie,Jim"
      4,"test4","description test 4","Tom,Tim,Frank,Julia"
      5,"test5","description test 5","Mike,Tom,Jamie"
      6,"test6","description test 6","John,Mike,Frank"
      7,"test7","description test 7","Julia,Ann,Dennis,Tom"
      8,"test8","description test 8","Frank,Jamie"
      9,"test9","description test 9","Ann,Tim"

  • @umersaeed6032
    @umersaeed6032 8 років тому +6

    I wonder why such a to the point and good video hasnt earned many views? Where are all the Linux Lovers???

    • @joshking9537
      @joshking9537 6 років тому +1

      Sadly, there are not many.

  • @ruifonseca6147
    @ruifonseca6147 3 роки тому +3

    Thank you for this tutorial, but I think it was not necessary to use the output ot the cat command as the input of the sed. You could have used sed at the very beginning of the command: sed -r '' my.csv

  • @H4EPiC
    @H4EPiC 6 років тому +3

    Your Voice perfectly fits my mood while i have to learn linux for work.

  • @shaheenodeh9858
    @shaheenodeh9858 Рік тому

    since this is a sed tutorial you could've only used sed command with providing the file name or path at the end of the command which would still give you the same output without the need to use cat command .

  • @KRoc
    @KRoc 8 років тому +3

    Thanks for the tutorial! Very good explanation and demonstration of sed.

  • @kshitijprasai7124
    @kshitijprasai7124 6 років тому +1

    Hey Man, let me know if you need help getting rid of the distracting white noise. Good tutorial.

  • @SophieGotraceMusic
    @SophieGotraceMusic 7 років тому +6

    Thanks for sharing. you saved me a lot of time.

  • @terabyter9000
    @terabyter9000 4 роки тому

    Thank you, this helped with better understanding which consequently helped me complete the TryHackMe website Linux Challenges room. My only question is why are you cat'ing into sed when you can just use sed itself: sed -n -r '2,4d' my.csv

  • @Krsherri
    @Krsherri 8 років тому +1

    Awesome job. thank you for explanation. i never understood sed command but you made it so simple to understand

  • @avinashraman5790
    @avinashraman5790 6 років тому

    Very good basics keep it up ... i did not waste my time watching this video ... worth time

  • @tarifadib
    @tarifadib 5 років тому

    amazing video. very good for someone new to this language.

  • @JonathanRookeMusic
    @JonathanRookeMusic 7 років тому

    Excellent, thanks. Thorough and clear.

  • @pravingaddam8541
    @pravingaddam8541 5 років тому

    Hi sir, i want to remove only particular line search like 'Frank' 'having more than 10 but here I want to delete Frank word in first 2 lines or randomly lines like 2,4 lines having word and I want to delete the same plz help mi in this

  • @HectorRodriguez-lf2rs
    @HectorRodriguez-lf2rs 3 роки тому

    Helped me a lot. Thanks

  • @elvyscruz
    @elvyscruz 4 роки тому

    Clear and concise

  • @mariusavram7823
    @mariusavram7823 3 роки тому

    Thank you! Very good explained video

  • @jermaineclarke8415
    @jermaineclarke8415 8 років тому

    Can you do a video showing calculations with sed?

  • @bismeetsingh352
    @bismeetsingh352 7 років тому

    sed -n -r '2,4p'? It should negate the printing right?So basically everything except 2,4 should be printed right????

    • @lambdanautic1383
      @lambdanautic1383  7 років тому +1

      As already stated in your other comment, you're right, "negate" is an inappropriate term for the "-n" flag, as it rather means "don't print any lines by default". Thanks for the hint :)

  • @souhaillepacifique7572
    @souhaillepacifique7572 5 років тому

    thank you so much for your time it s so helpful

  • @mjgritli
    @mjgritli 4 роки тому

    informative, thank you

  • @pellilisches8669
    @pellilisches8669 4 роки тому +2

    DANKE HAB MEIN AWK FERTIG EAAAAAAAAAAAAAAAASY

  • @albinenoch198
    @albinenoch198 7 років тому

    Sir actually, I like know may I use sed command for more than one string instead of a string..

    • @albinenoch198
      @albinenoch198 7 років тому

      Is it possible

    • @lambdanautic1383
      @lambdanautic1383  7 років тому +1

      You can specify multiple actions to sed via the '-e' switch, e.g. "sed -r -e 's/foo/bar/g' -e 's/ping/pong/g'" would replace all occurrences of "foo" with "bar" and also all occurrences of "ping" with "pong". Is that what you mean?

  • @bismeetsingh352
    @bismeetsingh352 7 років тому

    What does -n do?It doesnt seem like is negating to me.

    • @lambdanautic1383
      @lambdanautic1383  7 років тому

      You're right, "negation" is not the correct term for the "-n" flag, as it is more of a "don't print lines by default"

  • @abdulla_knl_vlogs4309
    @abdulla_knl_vlogs4309 5 років тому

    What is r flag in sed?

    • @lambdanautic1383
      @lambdanautic1383  5 років тому +2

      It enables Extended Regular Expressions, for example Quantifiers like "+" (for one or more occurrences of the preceding character) or curly braces, e.g. "{1,5}" (for one to five occurrences of the preceding char). These features are not being used in this video actually, so for the things explained in this video, you can omit the -r flag. I just always specify it out of habit.
      If you want to know more about Regular Expressions you might want to have a look at my video about that specific topic, ua-cam.com/video/AHn9HMTG9Yc/v-deo.html

  • @jazzuk93
    @jazzuk93 6 років тому

    awesome

  • @manojk1494
    @manojk1494 8 місяців тому

    7:43 😂👍

  • @NeoZondix
    @NeoZondix 7 років тому

    Thanks! :)

  • @climagabriel131
    @climagabriel131 4 роки тому

    3:23