Linux command to replace string in LARGE file with another string

前端 未结 7 811
终归单人心
终归单人心 2021-01-02 13:33

I have a huge SQL file that gets executed on the server. The dump is from my machine and in it there are a few settings relating to my machine. So basically, I want every oc

7条回答
  •  臣服心动
    2021-01-02 13:44

    The sed command can do that. Rather than escaping the slashes, you can choose a different delimiter (_ in this case):

    sed -e 's_c://temp/_/home//some//blah/_' file1.txt > file2.txt
    

提交回复
热议问题