On Mon, Jan 03, 2011 at 07:08:51PM +0530, Gnanasekar Loganathan wrote: > i'm setting environment variable by set mycmd="knetbsd netbsd.g" > > if call my own command, end up with no argument error. > grub> myboot $mycmd > myboot: usage knetbsd <filename> > > if do echo $mycmd, getting the correct string > grub> echo $mycmd > knetbsd netbsd.g > > if i directly run, throw unknown command > grub>$mycmd > error: unknown command `knetbsd netbsd.g'. > > How do i pass 2 arguments from single env variable or how to run the > env as command?
I don't think this is possible right now. We would need to have some equivalent of the shell 'eval' builtin. The underlying pieces are present (e.g. grub_script_execute_sourcecode) but aren't exposed in the GRUB scripting interface. If you aren't able to add this extension to GRUB script yourself and propose a patch, I suggest reworking your code in some other form. -- Colin Watson [cjwat...@ubuntu.com] _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel