[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: missing arguments for script functions
From: |
Andrei Borzenkov |
Subject: |
Re: missing arguments for script functions |
Date: |
Thu, 31 Mar 2016 16:49:54 +0300 |
On Thu, Mar 31, 2016 at 11:28 AM, Olaf Hering <address@hidden> wrote:
> Is this supposed to work?
>
> function f() {
This gives syntax error to me. But
function f {
echo $1
}
works.
> set x="$1"
> set y="$2"
>
> echo "${x} ${y}"
> }
>
> f "a" "b"
> f "c" "d"
>
> In my testing the positional arguments are not provided to f().
> At least when the code above is loaded via 'configfile "${var}"'.
>
> Olaf
>
> _______________________________________________
> Grub-devel mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/grub-devel