bug-bash
[Top][All Lists]
Advanced

[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:04:48 -0400
User-agent: Mozilla Thunderbird

On 5/22/24 6:56 PM, Dan Jacobson wrote:
It seems these should both make one line "+ a=b c=b" output,

for s in sh bash
do $s -xc 'a=b c=$a'
done

I mean they give the same results, but bash splits it into
two lines, so the user reading the bash -x output cannot tell
if one (correct) or two (incorrect) lines were used.

There's nothing incorrect about it. The bash output clearly tells you the
order of operations, which is the whole purpose of -x.

--
``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/

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]