Find the answer to your Linux question:
Results 1 to 2 of 2

Thread: Sed command

Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Sed command

    I have a group of xml files and I need to insert 3 parameters just after this line in each file:
    ---------------Pattern to be searched for-------------------------
    <!--The following configuration is a test configuration-->

    ---------------Parameters to be added---------------------------



    Can anyone help me implement this with the sed command? Thanks in advance.

  2. #2
    Linux Engineer Javasnob's Avatar
    Join Date
    Jul 2005
    Put this in a file:
    Where target is what you're inserting after, and Insertion is what you're inserting. To run, use this:
    sed -f file changeMe
    Where file has your sed commands in it, and changeMe is the file to change.
    Flies of a particular kind, i.e. time-flies, are fond of an arrow.

    Registered Linux User #408794

Posting Permissions

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