sed swapping 2 lines 
How can i make use of the sed H,h,x,g,G etc commands to swap 2 lines? 
eg file

    START
    this is a dog
    this is a cat
    this is something else
    END

say i want to swap "this is a dog" with "this is something else"


this is what i have so far:

    /this is a dog/{
     h # put to hold space 
    }
    /this is something else/{
     # now i am stuck on what to do.
    }


thanks


sed swapping 2 lines 
===

How can i make use of the sed H,h,x,g,G etc commands to swap 2 lines? 
eg file

    START
    this is a dog
    this is a cat
    this is something else
    END

say i want to swap "this is a dog" with "this is something else"


this is what i have so far:

    /this is a dog/{
     h # put to hold space 
    }
    /this is something else/{
     # now i am stuck on what to do.
    }


thanks

