1
I got a script that uses for /f
in Windows. However, FreeDOS doesn't seem to support the syntax /f
and it is only supported in Windows emulated cmd.
for /f "tokens=4" %%i in ('all.bat') do set RESULT=%%i
This commands tells it to pick the fourth word and set it as a variable. I've tested it in cmd and it works, but now I need to put it into a bootable FreeDOS USB stick.
1Is there a reason you can't use a FreeDOS boot stick? – dsolimano – 2015-02-05T20:07:47.177
Sorry, it is a typo. I'm using FreeDOS but it doesn't support the /F syntax which apparently only works in cmd. I need to grep a line and set it as a variable. – lbanz – 2015-02-06T09:35:18.477
If your question is wrong, then [edit] it to correct it. – JdeBP – 2015-02-06T10:16:06.700
@lbanz: Is an MS-DOS USB stick not an option? – Karan – 2015-04-08T18:09:25.933