
标题: [文本处理] 如何用批处理提取计算机名并生成一个新的批处理 [打印本页]
作者: ufoo9946@qq.com 时间: 2021-5-16 21:57 标题: 如何用批处理提取计算机名并生成一个新的批处理
文本内容如下
miner.exe --algo ethash --server eth.2miners.com:2020 --user 0x5218597d48333d4a70cce91e810007b37e2937b5
想把user换成机器名称生成一个新的批处理执行 像这样
miner.exe --algo ethash --server eth.2miners.com:2020 --001 0x5218597d48333d4a70cce91e810007b37e2937b5
作者: Batcher 时间: 2021-5-16 22:09
回复 1# ufoo9946@qq.com - @echo off
- cd /d "%~dp0"
- (for /f "tokens=1-7" %%a in ('type "1.txt"') do (
- echo %%a %%b %%c %%d %%e --%computername% %%g
- ))>"2.txt"
复制代码
请参考Q-04和Q-05把bat文件和txt文件都保存为ANSI编码:
https://mp.weixin.qq.com/s/6lbb97qUOs1sTyKJfN0ZEQ
欢迎光临 批处理之家 (http://bbs.bathome.net/) |
Powered by Discuz! 7.2 |