Date: Sat, 02 Jan 2021 21:07:53 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 251770] /bin/sh: false expansion Message-ID: <bug-251770-227-tNqKQnQSK2@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-251770-227@https.bugs.freebsd.org/bugzilla/> References: <bug-251770-227@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D251770 --- Comment #2 from Steffen (Daode) Nurpmeso <steffen@sdaoden.eu> --- Sorry for being too terse. It was just a simplemost reproducer without any further comments. Sorry. #?2|kent$ for s in dash bash mksh bosh; do $s -c 'du=3Dich wir=3D'"'"'hey '= "'"'$du; echo $wir'; done hey ich hey ich hey ich hey ich Hmmmm. Since issue 1123 is possibly not, you surely mean instead 75501 Variable assignments shall be performed as follows: 75502 =E2=80=A2 If no command name results, variable assignme= nts shall affect the current execution 75503 environment. 75504 =E2=80=A2 If the command name is not a special built-in= utility or function, the variable assignments 75505 shall be exported for the execution environment of the command and shall not affect the 75506 current execution environment except as a side-effect= of the expansions performed in step 75507 4. In this case it is unspecified: 75508 =E2=80=94 Whether or not the assignments are visibl= e for subsequent expansions in step 4 75509 =E2=80=94 Whether variable assignments made as side= -effects of these expansions are visible for 75510 subsequent expansions in step 4, or in the current shell execution environment, or 75511 both where 4 is 5495 4. Each variable assignment shall be expanded for tilde expansion, parameter expansion, 75496 command substitution, arithmetic expansion, = and quote removal prior to assigning the 75497 value. So .. this very exact behaviour is unspecified? If that is really true (i personally have hard times with standard texts), this issue can very well be closed. (FreeBSD sh is alone with this exact behaviour as far as i know, still..) --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-251770-227-tNqKQnQSK2>