2010-07-31 260 views

回答

1

您可以使用sed -i替換一些不好的話。

find www.web.com -type f -exec sed -i 's/word1\|word2\|word3//ig' {} + 

word1,word2,word3等是要刪除的單詞。

3

如果您想要從wget中提取頁面內的正文,請輸入sed

例如:

wget -k -m -r -q -t 1 -O - http://www.web.com/ | sed 's/cat/dog/g' > output.html 

使用-O -標誌輸出寫入stdout,並-q標誌,使在安靜模式下運行wget

還沒有一個shell atm來檢查我的語法,但這應該讓你在正確的道路上!