标签: shell batch-file
如何编写循环遍历文本文件中每一行的批处理脚本,并将该行存储在循环中的变量中?
例如我有:
@echo off for /F "tokens=*" %%A in (C:\Users\pmandayam\git\devops\UserRegistrationServices\scripts\file.txt) do ( set var1=%%A echo %var1% )
由于某种原因,输出会多次打印echo is OFF.,而不是实际的行
echo is OFF.