Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/windows/17.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Windows 直接从批处理文件中删除文本字符串_Windows_Batch File - Fatal编程技术网

Windows 直接从批处理文件中删除文本字符串

Windows 直接从批处理文件中删除文本字符串,windows,batch-file,Windows,Batch File,我正在尝试删除批处理文件中定义的变量,例如:%bad% 尽管有一个工具可以直接从文本文件中删除变量 如果需要,我可以使用GNUWin工具您可以使用sed for windows type somefile.txt | sed "s/bad text/good text/g" >> new-file.txt 你能告诉我们怎么对你没有帮助吗?它没有,没有用,我在评论中注明,你当时为什么接受它?你不必这么做。另外,您最后的评论是:谢谢,但它似乎不起作用。这无助于回答您的人了解问题所在。

我正在尝试删除批处理文件中定义的变量,例如:%bad%

尽管有一个工具可以直接从文本文件中删除变量


如果需要,我可以使用GNUWin工具

您可以使用sed for windows

type somefile.txt | sed "s/bad text/good text/g" >> new-file.txt

你能告诉我们怎么对你没有帮助吗?它没有,没有用,我在评论中注明,你当时为什么接受它?你不必这么做。另外,您最后的评论是:
谢谢,但它似乎不起作用。这无助于回答您的人了解问题所在。