iPXE discussion forum
Question on iseq - Printable Version

+- iPXE discussion forum (https://forum.ipxe.org)
+-- Forum: iPXE user forums (/forumdisplay.php?fid=1)
+--- Forum: General (/forumdisplay.php?fid=2)
+--- Thread: Question on iseq (/showthread.php?tid=6769)



Question on iseq - MultimediaMan - 2012-11-14 09:08

Consider:

Code:
set ${some-thing} Some Device
echo ${some-thing}

iseq ${some-thing} Some Device && goto do-this-thing || goto do-not-do-this-thing

I get a syntax error from iseq: it doesn't appear that iseq can handle whitespaces, even though the variable can (and does). I've tried single quotes and double qoutes to encapsulate the whitespace: is there something else I can use?


RE: Question on iseq - robinsmidsrod - 2012-11-14 10:01

No, iseq does not support any quotes what so ever. You can work around it by setting the thing you want to compare against in another variable and do iseq ${var1} ${var2} && goto equal || goto not-equal


RE: Question on iseq - MultimediaMan - 2012-11-14 14:04

So something like this:
Code:
set ${some-thing} Some Device
echo ${some-thing}

set ${something-else} Some Device
echo ${someting-else}

iseq ${some-thing} ${something-else} && goto do-this-thing || goto do-not-do-this-thing

Cheers!