sed and awk | Basics and Tips | Edit files without text editors | Writing scripts

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

КОМЕНТАРІ • 40

  • @DSPY1009
    @DSPY1009 2 роки тому +1

    Hi, great video. It help me a lot. Content in your video is massive. Great works.

    • @mmkr
      @mmkr  2 роки тому

      Glad I could help. Thanks for watching.

  • @42n8dzydoo
    @42n8dzydoo 3 роки тому +2

    Thank you for this great work!
    Really helped me a lot

    • @mmkr
      @mmkr  3 роки тому +2

      Glad to hear that 👍 You’re most welcome.

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

    Very very thanks sir.
    I have to see it on hd data, other wise not visible the small screen
    And also on mobile, when you type in the bottom of screen , it's not visible properly.

    • @mmkr
      @mmkr  3 роки тому +2

      You’re welcome. Glad to hear it was helpful for you.
      Thanks for the feedback. Yes, watching on a bigger screen with HD resolution provides better visibility.

    • @anuraganand8649
      @anuraganand8649 3 роки тому +2

      @@mmkr Really thankful to you sir🙏

  • @VenkataRamana-oc9hu
    @VenkataRamana-oc9hu 2 роки тому +1

    Really super video. Keep it up.....

    • @mmkr
      @mmkr  2 роки тому

      Thanks for watching.

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

    Hello,
    This is a very productive video.
    I have a question.
    Do u have all these commands with the example in some text format anywhere?
    It would be very helpful.
    Thanks

    • @mmkr
      @mmkr  3 роки тому +1

      Glad to hear that 👍
      Sorry, I don’t have them saved in a text file. I usually Google when I forget the syntax.

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

      @@mmkr thanks

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

    Very helpful.. please do video on STA it will be very helpful thanks

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

      Thank you.
      Ok, let me think about it later..

  • @alterguy4327
    @alterguy4327 3 роки тому +1

    Cool Stuff, Thankyou

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

      Most welcome

  • @vikasakinepally5656
    @vikasakinepally5656 3 роки тому +1

    Is it possible to print from line number 3 to n-5 using sed?, n is the last line number.

    • @mmkr
      @mmkr  3 роки тому +1

      Thanks for asking this question.
      I don’t think this is the optimal way, but it does work. Please try out the following.
      cat | sed -n -e ‘3,$p’ | tac | sed ‘1,5d’ | tac
      Also please let me know if you find an alternative way for this later. Thanks 😊

    • @vikasakinepally5656
      @vikasakinepally5656 3 роки тому +1

      @@mmkr Thanks this has worked and i tried another way using head that also worked.
      cat | head -n -5 | sed '1,3d'
      This video is really helpful.
      Thanks.

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

      Great. Thanks for sharing 👍

  • @amitrakholiya1138
    @amitrakholiya1138 3 роки тому +1

    Nice and very Helpful

    • @mmkr
      @mmkr  3 роки тому +1

      Thank you. Glad to hear that 👍

  • @User--jm5916
    @User--jm5916 2 роки тому

    Hello, why we r calling ' backslash / ' as escape please tell me

    • @mmkr
      @mmkr  2 роки тому

      Basically the word "escape" really means to temporarily escape out of parsing the text and go into another mode where the subsequent character is treated differently.

    • @User--jm5916
      @User--jm5916 2 роки тому +1

      @@mmkr ok sir thanks for your reply

    • @mmkr
      @mmkr  2 роки тому

      No problem

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

    Sir if we want to remove comments starting with # what should be the regex pattern...Not exactly deleting?

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

      Hi,
      If you want to remove lines (starting with a character #), please try out the following.
      sed ‘/^#/d’ file_name
      By the way, the above command just prints the output on to the standard output (screen). Once you verify the output content is fine, you can redirect the same into another file.
      (or) if you want to write the changes into the original file itself, please use the in-place edit option with the same expression.
      To know more about in-place edit option, please check out the video at 13:59
      Thanks

  • @User--jm5916
    @User--jm5916 2 роки тому

    how to print the first word after every “.” in the paragraph using sed

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

      Sorry, I do not quite understand your question here. If your are looking for removing “.” on each line, you could try the following.
      sed ‘s/\.//g’

    • @User--jm5916
      @User--jm5916 Рік тому

      @@mmkr thank you for your reply, my question is need to print the word after the " . " in one paragraph

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

      Do you mind sharing an example?

    • @User--jm5916
      @User--jm5916 Рік тому

      @@mmkr in one of the interview faced this question, I will share that question here

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

    Nice one

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

      Thank you!

  • @zaidi82
    @zaidi82 3 роки тому +2

    Your content is great but your explaination is vague. One tip: whenever write any expression explain every character which will help learner. All the best

    • @mmkr
      @mmkr  3 роки тому +1

      Noted. Thanks for sharing your feedback.

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

    super sir.

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

      Thank you.

  • @badalgupta2761
    @badalgupta2761 2 роки тому

    example are really good but explanation is very very bad .