NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

bin/54292: sh local variable assignment broken



>Number:         54292
>Category:       bin
>Synopsis:       sh local variable assignment broken
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jun 12 21:10:00 +0000 2019
>Originator:     Christos Zoulas
>Release:        NetBSD 8.99.43
>Organization:
Disorganized, Dazed, and Disoriented, Inc.
>Environment:
System: NetBSD quasar.astron.com 8.99.43 NetBSD 8.99.43 (QUASAR) #24: Wed Jun 12 10:17:45 EDT 2019 christos%quasar.astron.com@localhost:/usr/src/sys/arch/amd64/compile/QUASAR amd64
Architecture: x86_64
Machine: amd64
>Description:
Shell local variable parsing issue.
>How-To-Repeat:
[3:44pm] 376>sh
[3:44pm] 377>cat f.sh
f() {
local x=$(echo 1 2 3)
echo $x
y=$(echo 1 2 3)
echo $y
}
$ . f.sh
$ f
local: 2: bad variable name
1
1 2 3
$ ^D
[3:44pm] 376>bash
bash-5.0$ . f.sh
bash-5.0$ f
1 2 3
1 2 3
bash-5.0$ exit
>Fix:
Please



Home | Main Index | Thread Index | Old Index