iPXE discussion forum

Full Version: Question on iseq
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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?
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
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!
Reference URL's