grub-devel
[Top][All Lists]
Advanced

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

Re: Regarding ENV variable


From: Andreas Born
Subject: Re: Regarding ENV variable
Date: Tue, 04 Jan 2011 13:36:02 +0100

I just quickly tested this behaviour with bash (and busybox). With neither of 
them I needed to use eval. Although eval could be a nice feature, it may be 
better to consider adapting to this seemingly common behaviour.

Here's the output from bash:
$ blub="blub1 blub2"
$ touch $blub
$ ls $blub
blub1  blub2
$ 

Regards,
Andreas

----- Ursprüngliche Mitteilung -----
> 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]