[Bug 257702] /bin/sh: different behavior when chaining variable assignments
Date: Mon, 09 Aug 2021 07:09:00 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=257702
Bug ID: 257702
Summary: /bin/sh: different behavior when chaining variable
assignments
Product: Base System
Version: 13.0-RELEASE
Hardware: Any
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: standards
Assignee: standards@FreeBSD.org
Reporter: dylan.araps@gmail.com
I am not sure if this is the right component to open this issue under.
Apologies in advance if this is the wrong place.
Take the following example code:
$ a=1 b=$a
Expected behavior (tested in: ash (busybox), dash, bash, zsh, mirbsd ksh,
openbsd ksh, yash, osh and pdsh):
# b is set to a which is 1
$ echo $b
1
Actual behavior (freebsd sh):
# just a newline
$ echo $b
Every other shell I have tried exhibits the "expected behavior". I do not know
if this is a standards compliance issue or just a difference in behavior
between freebsd sh and other shells.
--
You are receiving this mail because:
You are the assignee for the bug.