Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个 .tsv 文件,我想使用批处理文件在 tsv 文件第 3 行的一些文本“sampletext 1345678”之后搜索一串数字。我想将数字放入一个变量中,然后将该变量打印在一个临时文本文件中。我试过寻找这样的东西,但没有什么符合我想做的。
set "var=" for /f "skip=2tokens=2" %%i in (whatever.tsv) do if not defined var set var=%%i echo found %var%
应该完成这个(作为批处理文件片段)