Batch file 使用双引号筛选文本
我试图过滤以下内容,但双引号让我困惑Batch file 使用双引号筛选文本,batch-file,filter,text-files,Batch File,Filter,Text Files,我试图过滤以下内容,但双引号让我困惑 (load "") 到目前为止,我掌握的代码是: find /v ""(load "")" < C:\acadlsip.txt | find /v ""(load "")" > acad.lsp find/v”“(load”“)”acad.lsp 使用具有以下内容的文件(thing.txt): this is a test. (load"") this is more of a test (load"") hello. 我运行了以下命令:
(load "")
到目前为止,我掌握的代码是:
find /v ""(load "")" < C:\acadlsip.txt | find /v ""(load "")" > acad.lsp
find/v”“(load”“)”acad.lsp
使用具有以下内容的文件(thing.txt
):
this is a test.
(load"")
this is more of a test
(load"")
hello.
我运行了以下命令:
find /v "(load"""")" < thing.txt
我猜你在找什么。这里要记住的是,在字符串中间输入“<代码>”“/COD>”(两个引号)作为一个引用来解释(在这个上下文中)。
我还将提到,为了将输出传输到另一个文件,您不需要运行同一个find两次。您可以改为使用以下选项:
find /v "(load"""")" < thing.txt > thing2.txt
find/v“(加载“”)”thing2.txt
请提供一个例子。。
find /v "(load"""")" < thing.txt > thing2.txt
findstr /v (load\"\") th1.txt > th2.txt