From: Colin Watson <cjwatson@ubuntu.com>
To: grub-devel@gnu.org
Subject: Re: Regarding ENV variable
Date: Tue, 4 Jan 2011 10:46:26 +0000 [thread overview]
Message-ID: <20110104104626.GA15515@riva.ucam.org> (raw)
In-Reply-To: <AANLkTikkfMzdQ+dwo1cAWDV8ApGXv+=1O0y5ZVeNVsDC@mail.gmail.com>
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 [cjwatson@ubuntu.com]
next prev parent reply other threads:[~2011-01-04 10:46 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-03 13:38 Regarding ENV variable Gnanasekar Loganathan
2011-01-04 10:46 ` Colin Watson [this message]
2011-01-04 12:30 ` BVK Chaitanya
2011-01-04 12:36 ` Andreas Born
2011-01-04 12:54 ` Colin Watson
2011-01-05 9:00 ` Gnanasekar Loganathan
2011-01-05 9:16 ` BVK Chaitanya
2011-01-05 9:21 ` Gnanasekar Loganathan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110104104626.GA15515@riva.ucam.org \
--to=cjwatson@ubuntu.com \
--cc=grub-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).