grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Regarding ENV variable


From: BVK Chaitanya
Subject: Re: Regarding ENV variable
Date: Tue, 4 Jan 2011 18:00:57 +0530

No, it is working as expected already; that is below code should
execute echo command and print "foo" already.

set cmd="echo foo"
$cmd


Gnanasekar, what is your grub version?  Please try with latest bzr version.



bvk.chaitanya



On Tue, Jan 4, 2011 at 4:16 PM, Colin Watson <address@hidden> wrote:
> 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                                       address@hidden
>
> _______________________________________________
> Grub-devel mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/grub-devel
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]