[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
${a:=b} expands to `b', not `a''s value
From: |
Oğuz |
Subject: |
${a:=b} expands to `b', not `a''s value |
Date: |
Wed, 20 Jan 2021 13:16:12 +0200 |
$ declare -l a
$ echo "${a:=X} $a"
X x
This doesn't jive with what the manual says.
`-l`:
> When the variable is assigned a value, all upper-case characters are
converted to lower-case.
`:=`:
> If parameter is unset or null, the expansion of word is assigned to
parameter. The value of parameter is then substituted.
Is this a bug or am I missing something here?
--
Oğuz