How to delete duplicate text from a file?Search & replace back slashes to forward slashes in windowsSed...

A Missing Symbol for This Logo

How to delete duplicate text from a file?

What makes papers publishable in top-tier journals?

Website seeing my Facebook data?

How is it possible that the folder is there yet isnt in the same time?

Stuck on a Geometry Puzzle

Eww, those bytes are gross

Non-Cancer terminal illness that can affect young (age 10-13) girls?

Why is the size of a directory either 0 or 4096?

In harmony: key or the flow?

Is there a way to not have to poll the UART of an AVR?

How can I play a serial killer in a party of good PCs?

"Starve to death" Vs. "Starve to the point of death"

Possible issue with my W4 and tax return

Why zero tolerance on nudity in space?

Why maximum length of IP, TCP, UDP packet is not suit?

After checking in online, how do I know whether I need to go show my passport at airport check-in?

Why do all the books in Game of Thrones library have their covers facing the back of the shelf?

Existence of Riemann surface, holomorphic maps

What game did these black and yellow dice come from?

Can we "borrow" our answers to populate our own websites?

Confusion over units in force equation?

Difference in casting float to int, 32-bit C

Does it take energy to move something in a circle?



How to delete duplicate text from a file?


Search & replace back slashes to forward slashes in windowsSed error “sed: -e expression #1, char [#]: extra characters after command”replace long text with special characters with sedsed quotes and backslashes on cygwinHow to delete a line from a file that requires permission such as visudo using sed?How to replace line in file with pattern with sed?GnuWin32 sed how can I search and replace quotes? Win7 UKHow to add the filepath to a specified line of a file using bash script?Quotes in sed when used in bash scriptSed : unknown option to `s'













2















I tried to delete the tect with the following command



sed -i -e 's/<check-valid-connection-sql>select 1</check-valid-connection-sql>//g' standalone.xml


But its showing me error




sed: -e expression #1, char 69: unknown option to `s'




Can someone guide what is the issue?










share|improve this question







New contributor




subodh is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

























    2















    I tried to delete the tect with the following command



    sed -i -e 's/<check-valid-connection-sql>select 1</check-valid-connection-sql>//g' standalone.xml


    But its showing me error




    sed: -e expression #1, char 69: unknown option to `s'




    Can someone guide what is the issue?










    share|improve this question







    New contributor




    subodh is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.























      2












      2








      2








      I tried to delete the tect with the following command



      sed -i -e 's/<check-valid-connection-sql>select 1</check-valid-connection-sql>//g' standalone.xml


      But its showing me error




      sed: -e expression #1, char 69: unknown option to `s'




      Can someone guide what is the issue?










      share|improve this question







      New contributor




      subodh is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.












      I tried to delete the tect with the following command



      sed -i -e 's/<check-valid-connection-sql>select 1</check-valid-connection-sql>//g' standalone.xml


      But its showing me error




      sed: -e expression #1, char 69: unknown option to `s'




      Can someone guide what is the issue?







      linux sed






      share|improve this question







      New contributor




      subodh is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      share|improve this question







      New contributor




      subodh is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      share|improve this question




      share|improve this question






      New contributor




      subodh is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked 4 hours ago









      subodhsubodh

      1134




      1134




      New contributor




      subodh is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      subodh is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      subodh is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






















          1 Answer
          1






          active

          oldest

          votes


















          4














          The first character after s is used as a separator. You chose /, so the correct command would be:



          s/search/replace/flags



          The problem is you have extra / in your search part:



          <check-valid-connection-sql>select 1</check-valid-connection-sql>
          ^


          So sed parses it like this:



          Search:   <check-valid-connection-sql>select 1<
          Replace: check-valid-connection-sql>
          Flags: /g


          And / is not a correct flag.



          Use a different separator to fix this:



          s#<check-valid-connection-sql>select 1</check-valid-connection-sql>##g





          share|improve this answer
























          • Worked Like Charm.Thanks

            – subodh
            2 hours ago











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "3"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });






          subodh is a new contributor. Be nice, and check out our Code of Conduct.










          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1409456%2fhow-to-delete-duplicate-text-from-a-file%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          4














          The first character after s is used as a separator. You chose /, so the correct command would be:



          s/search/replace/flags



          The problem is you have extra / in your search part:



          <check-valid-connection-sql>select 1</check-valid-connection-sql>
          ^


          So sed parses it like this:



          Search:   <check-valid-connection-sql>select 1<
          Replace: check-valid-connection-sql>
          Flags: /g


          And / is not a correct flag.



          Use a different separator to fix this:



          s#<check-valid-connection-sql>select 1</check-valid-connection-sql>##g





          share|improve this answer
























          • Worked Like Charm.Thanks

            – subodh
            2 hours ago
















          4














          The first character after s is used as a separator. You chose /, so the correct command would be:



          s/search/replace/flags



          The problem is you have extra / in your search part:



          <check-valid-connection-sql>select 1</check-valid-connection-sql>
          ^


          So sed parses it like this:



          Search:   <check-valid-connection-sql>select 1<
          Replace: check-valid-connection-sql>
          Flags: /g


          And / is not a correct flag.



          Use a different separator to fix this:



          s#<check-valid-connection-sql>select 1</check-valid-connection-sql>##g





          share|improve this answer
























          • Worked Like Charm.Thanks

            – subodh
            2 hours ago














          4












          4








          4







          The first character after s is used as a separator. You chose /, so the correct command would be:



          s/search/replace/flags



          The problem is you have extra / in your search part:



          <check-valid-connection-sql>select 1</check-valid-connection-sql>
          ^


          So sed parses it like this:



          Search:   <check-valid-connection-sql>select 1<
          Replace: check-valid-connection-sql>
          Flags: /g


          And / is not a correct flag.



          Use a different separator to fix this:



          s#<check-valid-connection-sql>select 1</check-valid-connection-sql>##g





          share|improve this answer













          The first character after s is used as a separator. You chose /, so the correct command would be:



          s/search/replace/flags



          The problem is you have extra / in your search part:



          <check-valid-connection-sql>select 1</check-valid-connection-sql>
          ^


          So sed parses it like this:



          Search:   <check-valid-connection-sql>select 1<
          Replace: check-valid-connection-sql>
          Flags: /g


          And / is not a correct flag.



          Use a different separator to fix this:



          s#<check-valid-connection-sql>select 1</check-valid-connection-sql>##g






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered 3 hours ago









          gronostajgronostaj

          28.3k1471107




          28.3k1471107













          • Worked Like Charm.Thanks

            – subodh
            2 hours ago



















          • Worked Like Charm.Thanks

            – subodh
            2 hours ago

















          Worked Like Charm.Thanks

          – subodh
          2 hours ago





          Worked Like Charm.Thanks

          – subodh
          2 hours ago










          subodh is a new contributor. Be nice, and check out our Code of Conduct.










          draft saved

          draft discarded


















          subodh is a new contributor. Be nice, and check out our Code of Conduct.













          subodh is a new contributor. Be nice, and check out our Code of Conduct.












          subodh is a new contributor. Be nice, and check out our Code of Conduct.
















          Thanks for contributing an answer to Super User!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1409456%2fhow-to-delete-duplicate-text-from-a-file%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Why do type traits not work with types in namespace scope?What are POD types in C++?Why can templates only be...

          Will tsunami waves travel forever if there was no land?Why do tsunami waves begin with the water flowing away...

          Should I use Docker or LXD?How to cache (more) data on SSD/RAM to avoid spin up?Unable to get Windows File...