On Sat, Aug 19, 2023, 16:42 jleivent wrote:
> bash: exec: 10: not found
> But even that shouldn't cause the shell to terminate if the
> target isn't found, so maybe this is two bugs?
>
> Repeat-By:
>
> exec {foo}>/tmp/foo
> exec "${foo}"<&-
>
Looks
On Sat, Aug 19, 2023 at 01:37:31PM -0400, jleivent wrote:
> Repeat-By:
>
> exec {foo}>/tmp/foo
> exec "${foo}"<&-
Remove the quotes and the $ and it should work.
exec {foo}<&-
The way you've got it is essentially:
exec "$foo" <&-
This does't make bash "crash". It'
Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -g -O2 -fstack-protector-strong -Wformat
-Werror=format-sec> uname output: Linux lapdog 6.1.0-11-amd64 #1 SMP
PREEMPT_DYNAMIC Debian 6.1.38-> Machine Type: x86_64-pc-l
When a nofork command substitution is in PS1 and ignoreeof is enabled,
(sufficiently repeated) EOF doesn't actually cause the shell to exit:
$ PS1='${ :;}$ ' IGNOREEOF=1 bash --norc
$ ^D
Use "exit" to leave the shell.
$ ^D
Use "exit" to leave the shell.
...