2010-07-23 126 views

回答

1

在unix中,vim有一個選項可以做到這一點。

vim -c "argdo %s/http:\\site.com\/pageA/http:\\site2.com\/pageB/ge | update" *.html 
0

TextPadNotepad++這樣的東西呢?您可以打開所有的html文件,然後在所有打開的文檔中查找/替換。

+0

我想到了使用Notepad ++,但我們在這裏說幾頁。 – gnome 2010-07-23 23:30:28

0

在的Linux/Unix或cygwin的(或類似)

$ find topdir -name \*.html -print0 | 
    xargs -0 sed --in-place 
    -e 's~http://foo\.com/this/that\.html~http://foo.com/other/location/newfile.html~g' 

(爲了便於閱讀行)

編輯全部就地目錄下的 「TOPDIR」 文件替換「/這/那.html「網址與」/other/location/newfile.html「網址。