到目前为止,这是我的代码:
FOR /f %%G IN (temp.file) DO (
echo %%G > temp
first_char.exe temp > letter
set /p myLetter =<letter
echo %myLetter%
)
first_char.exe
将输入文件中的第一个字符打印到标准输出。
它打印:
ECHO is off.
ECHO is off.
ECHO is off.
ECHO is off.
ECHO is off.
ECHO is off.
(因为我有 6 行文本temp.file
)。