[Toybox] [PATCH] sh: pass "\" to the later app

Rob Landley rob at landley.net
Sun Jul 23 06:20:13 PDT 2023


On 6/30/23 19:57, Rob Landley wrote:
>> On 6/12/23 19:40, Chet Ramey wrote:
>>> I wish you were not so reluctant. Look at how many things you've discovered
>>> that I decided were bugs based on our discussions.
>>
>> But since you asked, today's new question I wrestled with was

$ bash -c $'echo $LINENO\necho $(echo $LINENO\necho $LINENO\n); echo $LINENO'
0
3 4
3
$ bash -c $'echo $LINENO\necho $LINENO $(echo $LINENO\necho $LINENO\n); echo $LINENO'
0
1 1 2
3

Why does the 3 4 turn into 1 2? (Where does it get "3" from the
first time?)

Rob


More information about the Toybox mailing list