Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: sed windows to find - replace in file  (Read 5268 times)

0 Members and 1 Guest are viewing this topic.

new_programmer

    Topic Starter


    Newbie

    • Experience: Beginner
    • OS: Windows 10
    sed windows to find - replace in file
    « on: June 23, 2017, 04:11:07 AM »
    hi,
    my need is to find a string in  a file (named file1) and substitute that string (string to substitute is testtest/) with all content of another file (named file2) and create a new file (called file3)


    what i've done is :

    %SED% -e "s/"test1/"//C:\User\file2" c:\User\file1   > C:\User\file3

    but what i get is only susbtitution of test1\ with the path of file 2, not the content.

    How can i solve?

    i've also tried to use get-content in powershell but it not integrate well with my final.exe file remaining powershell append or getting error "cannot  load module PSReadline console without PSReadline." so I think it is better to use SED


    Thanks for your preciuos support