[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: 问一个sed的问题



yes, me too.

Wing sun 写道:

我都用perl
perl -pi -e 's/xxx/yyyyyy/g' *.html



Ming Hua 写道:

On Wed, Nov 29, 2006 at 10:41:52AM +0800, jun yu wrote:
sed默认是输出到stdout里,但是当我需要对多个文件进行替换操作时,就有问
题了,比如:

sed -e 's/xxxxx/sssss/' *.html

html文件有很多个,不知道怎么样才能替换多个文件。

摘自 sed(1) 手册页:

      -i[SUFFIX], --in-place[=SUFFIX]

             edit files in place (makes backup if extension supplied)

Ming
2006.11.28






Reply to: