Given

        set -- one "two three" four
        unset -v var
        IFS=    # null IFS

the unquoted expansion

        ${var=$*}

generates three words and assigns the last one ("four") to $var.

It should generate one word, consisting of the concatenation of the
positional parameters separated by the first character, without
separation since IFS is null, and assign that concatenated word to the
variable.

Test script:

        set -- one "two three" four
        unset -v var
        IFS=
        set -- ${var=$*}
        echo "var=$var"
        printf '[%s]\n' "$@"

Actual output:

var=four
[one]
[two three]
[four]

Expected output:

var=onetwo threefour
[onetwo threefour]

Thanks,

- M.

Reply via email to