sed 在一个文件夹中
我需要“sed”来处理某些批次;
现在有很多要求;
谁能告诉我如何将所有要求和 sed 本身放在一个目录中运行? [所以不需要安装,它可以工作]
因为我需要公开批处理文件,所有这些要求似乎为用户提供了很多工作......
i need 'sed' for some batch;
now there are a lot of requirements;
could anyone tell me how to put all the requirements and sed itself to run in one dir?? [so no need for install, that it works]
'Cause i need to get the batch file public, all that requirements seem to give a lot of work for the users...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您是在谈论分发 sed 二进制文件吗?
如果是这样,那么您可以在其上运行 ldd 以查看需要哪些共享库。
您还可以从源代码重新编译它以使用静态链接,并删除任何外部依赖项。
或者您可以修改脚本以使用 perl 或系统上已有的其他内容来替换 sed 功能。
Are you talking about distributing the sed binary?
If so, then you could run ldd on it to see which shared libraries are required.
You could also recompile it from source to use static linking, and remove any external dependencies.
Or you could modify your script to use perl or something else that is already on the system to replace the sed functionality.
对于您之前的问题,我参考了 Cygwin。
您可以将
cygwin1.dll
与 sed 一起复制到目录中它应该有效。这是讨论独立 cygwin 应用程序的设置的另一个问题。
它建议使用 UnixUtils 而不是 Cygwin。
I referred to Cygwin for your earlier question.
You can copy the
cygwin1.dll
along with sed into a directory and it should work.Here is another question discussing about Setup of standalone cygwin applications.
It suggests the use of UnixUtils instead of Cygwin.
没关系;;
我用其他东西来得到我想要的东西。
编辑:对于那些想知道如何在不安装 sed 的情况下执行此操作的人,只需使用 bat 到 exe 转换器将它们一起放入一个 EXE 文件中。 或者确保将 sed 放入批处理文件的运行目录中。
Never mind;;
i used something other to get what i wanted.
EDIT: For those who want to know how to do this without installing sed, just use a bat to exe converter to put them together into one EXE file. Or just make sure you put sed into the running directory of the batch file.