Re: Proposed new feature for bash: unbuffered pipes

2020-04-23 Thread Daniel Colascione
On April 22, 2020 6:32:07 PM wor...@alum.mit.edu (Dale R. Worley) wrote: The crux of the problem, IMHO, is to look at it from the right angle: Occasionally, the user desires that I/O through certain pipes should be unbuffered, that is, the stdio stream(s) that write into the pipe should be unbu

Cannot shadow local -r when assigning local to array in declaration

2020-04-23 Thread Ross Goldberg
Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: darwin19.3.0 Compiler: clang Compilation CFLAGS: -DSSH_SOURCE_BASHRC -Wno-parentheses -Wno-format-security uname output: Darwin Thrawn.local 19.4.0 Darwin Kernel Version 19.4.0: Wed Mar 4 22:28:40 PST 2020; roo

Unbuffered pipes: cases to be supported

2020-04-23 Thread Dale R. Worley
The cases I've found where bash allocates a pipe, and thus an unbuffered pipe may be wanted, are: 1. pipelines: command1 | command2 By analogy with the cases below, I think the demo should be amended to use this syntax: command1 >>| command2 and the parallel for redirecting both stdout and

Re: Proposed new feature for bash: unbuffered pipes

2020-04-23 Thread Daniel Colascione
On 4/23/20 4:39 PM, Dale R. Worley wrote: Andreas Schwab writes: See stdbuf(1). The limitation(s) of stdbuf are: It can only be applied to the standard I/O streams. It doesn't affect statically-linked executables. It only applies to a single executable, so if the command is a shell functio

Re: Proposed new feature for bash: unbuffered pipes

2020-04-23 Thread Dale R. Worley
Andreas Schwab writes: > See stdbuf(1). The limitation(s) of stdbuf are: It can only be applied to the standard I/O streams. It doesn't affect statically-linked executables. It only applies to a single executable, so if the command is a shell function or script, or creates subprocesses, it doe

Re: nameref pointing to array element

2020-04-23 Thread Chet Ramey
On 4/22/20 6:05 PM, Daniel Molina wrote: > Hello, > > Is the following an intended behavior? Undefined? A bug? > > $ a[1]=2; declare -n ref=a[1]; echo $ref $((ref)) > 2 0 Thanks for the report. It looks like a bug, even though the rules for evaluating strings in the expression evaluator are slig

Re: Proposed new feature for bash: unbuffered pipes

2020-04-23 Thread Andreas Schwab
See stdbuf(1). Andreas. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different."