开发者

Can sed be made recursive in for windows?

开发者 https://www.devze.com 2022-12-27 11:34 出处:网络
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

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" "{}" ;
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号