Re: bash 5.1 heredoc pipes problematic, shopt needed

2022-04-28 Thread Ángel
On 2022-04-25 at 10:40 -0400, Chet Ramey wrote: > > > Perhaps BASH_COMPAT=5.0 could be extended to handle this. > > > > I think a shopt makes more sense. Forcing heredocs to be files > > although something legit to request, is more a caller workaround to > > bugs in called programs. > > Shell opt

Re: bash 5.1 heredoc pipes problematic, shopt needed

2022-04-28 Thread Chet Ramey
On 4/28/22 11:26 AM, Alexey wrote: I promised you more examples, and here they are: Very common case to build a list of files for further processing:   declare -a FILES   #1   FILES=(); time readarray -t FILES <<<"$(find "$d" -xdev -maxdepth 5 -type f)"   #2   # <<< act as a tmp file (due

Re: bash 5.1 heredoc pipes problematic, shopt needed

2022-04-28 Thread Alexey via Bug reports for the GNU Bourne Again SHell
Hello. On 2022-04-28 20:56, Greg Wooledge wrote: Second, none of your examples work with arbitrary filenames, which may contain newline characters. The solution to that is to use find -print0 and to read the NUL-delimited stream in the shell. I want to assure you (and others) that my point wa

Re: bash 5.1 heredoc pipes problematic, shopt needed

2022-04-28 Thread Greg Wooledge
On Thu, Apr 28, 2022 at 07:26:19PM +0400, Alexey via Bug reports for the GNU Bourne Again SHell wrote: > Hello. > > I promised you more examples, and here they are: > Very common case to build a list of files for further processing: > declare -a FILES > #1 > FILES=(); time readarray -t FILE

Re: bash 5.1 heredoc pipes problematic, shopt needed

2022-04-28 Thread Alexey via Bug reports for the GNU Bourne Again SHell
On 2022-04-26 01:05, Alexey via Bug reports for the GNU Bourne Again SHell wrote: On 2022-04-26 00:54, Chet Ramey wrote: On 4/25/22 4:33 PM, Alexey wrote: My key point that we have two choices for future:  - make read from pipe faster, or You mean the read builtin, right? I already explaine