Find the answer to your Linux question:
Results 1 to 2 of 2
hi guys..i wanna delete lines with the word and regular expression backslash like \repdb\ but i type out like that sed "/\repdb\/d" text1.txt>text2.txt it doesnt work..where did i go wrong..kindly ...
  1. #1
    Just Joined!
    Join Date
    Sep 2007
    Posts
    25

    Unhappy sed noob need some help!

    hi guys..i wanna delete lines with the word and regular expression backslash like

    \repdb\

    but i type out like that

    sed "/\repdb\/d" text1.txt>text2.txt

    it doesnt work..where did i go wrong..kindly tell me thanks.

  2. #2
    Just Joined!
    Join Date
    Apr 2007
    Location
    Netherlands
    Posts
    5
    You tried:
    sed "/\repdb\/d" text1.txt>text2.txt

    For some reason sed seems to dislike the double quote '"'.
    Furthermore, you should tell sed to interprete the backslash as an ordinary character. Therefore, I think

    sed '/\\repdb\\/d' text1.txt>text2.txt

    will do the job.

    Paul Huygen

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...