MaxTyutyunnikov / grub4dos-chenall

Automatically exported from code.google.com/p/grub4dos-chenall
0 stars 0 forks source link

%fred%2 in batch file issue #205

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
!BAT
set COMMA=
set OP=
if not "%MAKEACT%%%DOLBA%%%LEAVE23%%%LEAVE3%"=="" set OP=$[0107]\x20   
(OPTIONS: 
set OP=%OP%a=Make-Active && set COMMA=, 
set OP=%OP%%%COMMA%LBA=Adjust-LBA && set COMMA=, 
set OP=%OP%%%COMMA%23=Leave-Ptn2&3 && set COMMA=, 
set OP=%OP%%%COMMA%3=Leave-Ptn3
echo -e %OP%) %redir%

What is the expected output? What do you see instead?

expect
a=Make-Active, LBA=Adjust-LBA, 23=Leave-Ptn2&3, 3=Leave-Ptn3)

actual
a=Make-Active, LBA=Adjust-LBA%COMMA3=Leave-Ptn2&3%COMMA=Leave-Ptn3)

What version of the product are you using? On what operating system?
all latest versions

Please provide any additional information below.

works OK in .cfg file

%2 and %3 are being interpreted as argument parameters??

Is this a bug or just a feature?

Original issue reported on code.google.com by Steve6375 on 24 Sep 2014 at 9:11

GoogleCodeExporter commented 8 years ago
set OP=%OP%%%COMMA%3=Leave-Ptn3
change to
set OP=%OP%%%COMMA%%3=Leave-Ptn3

because %n will replace with argument when scan line. '%%' will replace with '%'

Original comment by chenall.cn on 25 Sep 2014 at 6:43

GoogleCodeExporter commented 8 years ago
OK

Original comment by Steve6375 on 26 Sep 2014 at 6:04

GoogleCodeExporter commented 8 years ago

Original comment by chenall.cn on 3 Oct 2014 at 3:57