Can sed be made recursive in for windows?
I'm using sed for windo开发者_运维问答ws to do search and replace on some javascript files, and I was wondering if using some other utility I could make it work recursively.
yes you can, either use a for
loop coupled with dir /s
, or you can use find for windows. eg
find c:\path -iname "*.txt" -exec sed "s/old/new/g" "{}" ;
精彩评论