5 Replies Latest reply on May 3, 2019 6:51 AM by Gaz in Oz

    delete character from file

    happy10319

      Hi,

      I have the following content in my file :

       

      Get cloud support with Ubuntu Advantage Cloud Guest:
          http://www.ubuntu.com/b &locked usiness/services/cloud

       

      I want to delete "&" from it.

      Then I run:

       

      echo $(sed 's/\&locked/locked/' my.txt) > my.txt

       

       

      Now I have only one line (instead of two) in my file:

       

      Get cloud support with Ubuntu Advantage Cloud Guest: http://www.ubuntu.com/b locked usiness/services/cloud

       

      How should I do to have two lines?

      Thank you.