15 amazing example of deleting lines from file using sed | Unix command

Поделиться
HTML-код
  • Опубликовано: 26 авг 2024
  • In this video we will discuss how to delete lines from a file using sed command.We will see 15 unique example.
    Learn Unix Command :
    1)cat command : • cat command in unix
    2)ls command : • ls command in unix
    3)mkdir and cd command : • mkdir and cd command
    4)cp command : • cp command in unix
    5)cut , paste and tr command : • Unix Command |cut | pa...
    6)sort command: • sort command in Unix |...
    7)uniq command : • uniq command in Unix |...
    8)sed command : • sed command in Linux |...
    9)Top 5 unix interview questions: • Top 5 Unix / Linux INT...
    10)grep command : • grep command in Unix
    11)15 amazing example in unix : • 15 Amazing Examples in...

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

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

    Excellent ..very useful

  • @anupravgupta2747
    @anupravgupta2747 3 года назад +1

    Excellent..!!

  • @RajeshKumar-qw8wf
    @RajeshKumar-qw8wf 4 года назад +1

    Amazing video

  • @vikasmahour6059
    @vikasmahour6059 Год назад +2

    Thanks for your vedios.
    I am stuck in a problem .
    My XMl FIle contains data like :

    1234


    2345


    8787987


    89898


    80098

    I want to arrange my xml file such that the tags and should be in a single line without space.

    1234


    2345

    8787987

    89898

    80098
    Tried many sed commands but no luck.Please help me to resolve it .

    • @rohanofelvenpower5566
      @rohanofelvenpower5566 9 месяцев назад

      Damn thats hard. I think your sed command needs to achieve at least 2-3 different tasks so multiple sed commands piped inti each other or cincataned with -e argument or maybe many other helper arguments used instead.
      I dont know how to do it just saying its very complex at first sight.
      Have you figured it out? Please paste the answer if youve found it. 😊

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

    How do you delete a duplicate lines ?

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

    Can you plz let us know how to delete the content permanently with sed command ? In video, it's not clearly audiable

  • @rohanofelvenpower5566
    @rohanofelvenpower5566 9 месяцев назад

    Thanks but not explaining logic behind. Rather its like youre quickly doing your homework for school :)
    So '$d' deletes the last line in the file. But is it in expanded form as '$//d' or '/$/d' ? 😅
    Or the last example in the video. '${/line/d;}' how does this work? Are square brackets a common regex concept? Why the ; after the d ?