bugGNU GRUB - Bugs: bug #35890, "$@" in grub-script does...


You are not allowed to post comments on this tracker with your current authentication level.

bug #35890: "$@" in grub-script does not follow bash semantics

Submitted by:  Jordan Uggla <jordanu>
Submitted on:  Mon 19 Mar 2012 03:33:38 AM UTC  
Category:  None Severity:  Major
Priority:  5 - Normal Item Group:  None
Status:  None Privacy:  Public
Assigned to:  None Originator Name: 
Open/Closed:  Open Release: 
Release:  Bazaar - trunk Reproducibility:  None
Planned Release:  2.03+

Mon 19 Mar 2012 01:00:55 PM UTC, comment #2:

For the time being use $* for this usecase.

Vladimir Serbinenko <phcoder>
Project Administrator
Mon 19 Mar 2012 10:47:00 AM UTC, comment #1:

It's not about handling of $@ but that bash first checks whether command is an assignment and only then expands arguments.

Vladimir Serbinenko <phcoder>
Project Administrator
Mon 19 Mar 2012 03:33:38 AM UTC, original submission:

One should be able to put all arguments passed to a function into a single (string) variable with all_arguments="$@". With grub-script currently, only the first argument will be stored in $all. I assume that this happens because of the way constructs like for arg in "$@" are supported, but it does not match bash semantics. Example script which gives different results in bash and grub-script:

function get_all_arguments {
echo "$all_arguments"
echo "$@"

get_all_arguments "argument one" "argument two"

Jordan Uggla <jordanu>


No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by phcoder (Posted a comment)
  • -email is unavailable- added by jordanu (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.




    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-03-02 phcoder Planned ReleaseNone => 2.03+

    Back to the top

    Powered by Savane 3.3