sed 可以在 Windows 中递归吗?

发布于 2024-08-28 21:56:27 字数 166 浏览 1 评论 0原文

我正在使用 sed for windows 来搜索和替换一些 javascript 文件,并且我想知道是否使用其他实用程序可以使其递归工作。

I'm using sed for windows to do search and replace on some javascript files, and I was wondering if using some other utility I could make it work recursively.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

一袭水袖舞倾城 2024-09-04 21:56:27

是的,您可以,使用 for 循环与 dir /s 结合使用,或者您可以使用 针对 Windows 查找。例如

find c:\path -iname "*.txt" -exec sed "s/old/new/g" "{}" ;

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" "{}" ;
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文