[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: sh vs. bash -xc 'a=b c=$a'
From: |
Chet Ramey |
Subject: |
Re: sh vs. bash -xc 'a=b c=$a' |
Date: |
Thu, 23 May 2024 09:07:55 -0400 |
User-agent: |
Mozilla Thunderbird |
On 5/22/24 10:57 PM, Oğuz wrote:
And some Bourne shells expand command substitutions first
$ (exit 5)
$ x=$? y=`exit 10`
$ echo $x
10
It's worse than that. The v7 sh performed assignments right to left.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU chet@case.edu http://tiswww.cwru.edu/~chet/
OpenPGP_signature.asc
Description: OpenPGP digital signature