bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: export loses error


From: Stephane Chazelas
Subject: Re: export loses error
Date: Sun, 14 Feb 2021 09:03:56 +0000

2021-02-09 10:23:51 -0500, Chet Ramey:
[...]
> It's the assignment statement that's the oddball here; it's the only place
> where the exit status from a command substitution has any effect. This is a
> POSIX (maybe ksh) invention to provide assignment statements with a useful
> exit status.
[...]

It was already like that in the Bourne shell, the shell that
introduced command substitution in the late 70s.

Here on a PDP11 emulator running Unix V7:

PDP-11 simulator V3.8-1
Disabling XQ
@boot
New Boot, known devices are hp ht rk rl rp tm vt
: rl(0,0)rl2unix
mem = 177856
# false
# echo $?
1
# a=`false`
# echo $?
1

-- 
Stephane



reply via email to

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